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

NullPointerException in Requester.sendAdException #680

Closed
linean opened this issue Sep 4, 2023 · 2 comments · Fixed by #692
Closed

NullPointerException in Requester.sendAdException #680

linean opened this issue Sep 4, 2023 · 2 comments · Fixed by #692
Assignees
Labels

Comments

@linean
Copy link
Contributor

linean commented Sep 4, 2023

Describe the bug
After recent update from 2.1.0 to 2.1.3 we've started to notice new NullPointerException coming from Requester.sendAdException. I hope the following stacktrace will help you to find it.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'void org.prebid.mobile.rendering.networking.ResponseHandler.onErrorWithException(java.lang.Exception, long)' on a null object reference
       at org.prebid.mobile.rendering.networking.modelcontrollers.Requester.sendAdException(Requester.java:152)
       at org.prebid.mobile.rendering.networking.modelcontrollers.Requester.makeAdRequest(Requester.java:169)
       at org.prebid.mobile.rendering.networking.modelcontrollers.Requester$1.adIdFetchCompletion(Requester.java:132)
       at org.prebid.mobile.rendering.utils.helpers.AdIdManager$FetchAdIdInfoTask.onPostExecute(AdIdManager.java:142)
       at org.prebid.mobile.rendering.utils.helpers.AdIdManager$FetchAdIdInfoTask.onPostExecute(AdIdManager.java:100)
       at android.os.AsyncTask.finish(AsyncTask.java:695)
       at android.os.AsyncTask.access$600(AsyncTask.java:180)
       at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loop(Looper.java:193)
       at android.app.ActivityThread.main(ActivityThread.java:6923)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
@jsligh jsligh self-assigned this Sep 19, 2023
@jsligh
Copy link
Collaborator

jsligh commented Sep 19, 2023

The responseHandler could be null so I'm surrounding it with null checks to make sure this error doesn't happen again.

@jsligh jsligh added the bug label Sep 19, 2023
@jsligh jsligh linked a pull request Sep 19, 2023 that will close this issue
@linean linean closed this as completed Sep 20, 2023
@YuriyVelichkoPI
Copy link
Contributor

@linean there is no need to close the issue manually. It will be closed once the PR is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants