sandeshnaroju / react-native-in-app-update

44 stars 17 forks source link

Fatal Exception: java.lang.NullPointerException #9

Open pushpender-singh-ap opened 2 years ago

pushpender-singh-ap commented 2 years ago

react: "16.13.1", react-native: "^0.64.0",

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.Activity.startIntentSenderForResult(android.content.IntentSender, int, android.content.Intent, int, int, int, android.os.Bundle)' on a null object reference
       at com.google.android.play.core.appupdate.c.startIntentSenderForResult(:9)
       at com.google.android.play.core.appupdate.d.startUpdateFlowForResult(:23)
       at com.google.android.play.core.appupdate.d.startUpdateFlowForResult(:9)
       at com.utkarshbharat.InAppUpdateModule.lambda$checkUpdate$0$InAppUpdateModule(InAppUpdateModule.java:75)
       at com.utkarshbharat.-$$Lambda$InAppUpdateModule$9R7UWhd-XeKj5hPtQF0RuJm94LU.onSuccess(:4)
       at com.google.android.play.core.tasks.e.run(:27)
       at android.os.Handler.handleCallback(Handler.java:883)
       at android.os.Handler.dispatchMessage(Handler.java:100)
       at android.os.Looper.loop(Looper.java:230)
       at android.app.ActivityThread.main(ActivityThread.java:7822)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:526)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)
AnupamPrakash commented 2 years ago

@pushpender-singh-ap Were to able to find any solution for this error?

pushpender-singh-ap commented 2 years ago

@AnupamPrakash still i am searching solution. If you know please let me know

sandeshnaroju commented 2 years ago

Sorry guys, I was busy with some other work. When are you calling checkUpdate? When is this error happening? Kindly give us more detail to understand.

AnupamPrakash commented 2 years ago
  1. Calling checkUpdate on app startup.
  2. Couldn't reproduce on local, this error is listed in the play console crashlytics.
sandeshnaroju commented 2 years ago

Where exactly are you calling checkUpdate? I am assuming that you are calling too early.

imsankalp commented 2 years ago

@AnupamPrakash @pushpender-singh-ap Did you get any solution for this error?

pushpender-singh-ap commented 2 years ago

@imsankalp not now we still looking for a solution.