Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in HttpClientTask #579

Closed
kober32 opened this issue Apr 4, 2024 · 1 comment
Closed

Crash in HttpClientTask #579

kober32 opened this issue Apr 4, 2024 · 1 comment

Comments

@kober32
Copy link
Member

kober32 commented Apr 4, 2024

Reported by our client.

It looks like the connection parameter in logRespose might be null here:

https:/wultra/powerauth-mobile-sdk/blob/develop/proj-android/PowerAuthLibrary/src/main/java/io/getlime/security/powerauth/networking/client/HttpClientTask.java#L308

Stacktrace:

java.lang.RuntimeException: An error occurred while executing doInBackground()
    at android.os.AsyncTask$4.done(AsyncTask.java:415)
    at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:381)
    at java.util.concurrent.FutureTask.setException(FutureTask.java:250)
    at java.util.concurrent.FutureTask.run(FutureTask.java:269)
    at io.getlime.security.powerauth.sdk.impl.DefaultExecutorProvider$SerialExecutor$1.run(DefaultExecutorProvider.java:68)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
    at java.lang.Thread.run(Thread.java:1012)
   Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.net.URL java.net.HttpURLConnection.getURL()' on a null object reference
    at io.getlime.security.powerauth.networking.client.HttpClientTask.logResponse(HttpClientTask.java:315)
    at io.getlime.security.powerauth.networking.client.HttpClientTask.doInBackground(HttpClientTask.java:215)
    at android.os.AsyncTask$3.call(AsyncTask.java:394)
    at java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at io.getlime.security.powerauth.sdk.impl.DefaultExecutorProvider$SerialExecutor$1.run(DefaultExecutorProvider.java:68) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) 
    at java.lang.Thread.run(Thread.java:1012) 
@hvge
Copy link
Member

hvge commented Apr 4, 2024

This may happen when the failure occurs very early in the function. The fix should be backported also to release/1.7.x branch.

@hvge hvge closed this as completed in c1795ec Jun 5, 2024
hvge added a commit that referenced this issue Jun 5, 2024
Android: Fix #579: Crash in HttpClientTask logging
hvge added a commit that referenced this issue Jun 6, 2024
Android: Fix #579: Crash in HttpClientTask logging
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants