Currently for my latest release more than 90% of crashes are from the below error.
Version "react-native-otp-verify": "^1.1.8"
Location OtpVerifyModule.java line 195 in com.faizal.OtpVerify.OtpVerifyModule.onActivityResult
Exception java.lang.NullPointerException
Message Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null object reference
this is the stack trace
Fatal Exception: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=10001, result=-1, data=Intent { (has extras) }} to activity {com.healthplix.patient/com.healthplix.patient.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null object reference
at android.app.ActivityThread.deliverResults(ActivityThread.java:6112)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:6151)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2820)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:328)
at android.app.ActivityThread.main(ActivityThread.java:9156)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
Caused by java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null object reference
at com.faizal.OtpVerify.OtpVerifyModule.onActivityResult(OtpVerifyModule.java:195)
at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:375)
at com.facebook.react.ReactInstanceManager.onActivityResult(ReactInstanceManager.java:822)
at com.facebook.react.ReactDelegate.onActivityResult(ReactDelegate.java:107)
at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:136)
at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:70)
at android.app.Activity.dispatchActivityResult(Activity.java:9339)
at android.app.ActivityThread.deliverResults(ActivityThread.java:6105)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:6151)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2820)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:328)
at android.app.ActivityThread.main(ActivityThread.java:9156)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:586)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)
Currently for my latest release more than 90% of crashes are from the below error.
Version
"react-native-otp-verify": "^1.1.8"
Location
OtpVerifyModule.java line 195 in com.faizal.OtpVerify.OtpVerifyModule.onActivityResult
Exception
java.lang.NullPointerException
Message
Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null object reference
this is the stack trace
any idea how to fix this?