You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m experiencing a crash in the RNGooglePayModule at com.busfor.RNGooglePayModule$1.onActivityResult, specifically related to the requestPaymentPromise object being null. The crash occurs when the onActivityResult method is triggered, and it tries to access requestPaymentPromise.reject(), resulting in a NullPointerException. This appears to be happening when the Google Pay activity result returns RESULT_CANCELED or RESULT_ERROR, and requestPaymentPromise hasn’t been set.
Caused by java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.reject(java.lang.String, java.lang.String)' on a null object reference
at com.busfor.RNGooglePayModule$1.onActivityResult(RNGooglePayModule.java:xx)
Proposed Solution: To address this, I would suggest adding a null check for requestPaymentPromise within the onActivityResult method to avoid calling .reject() on a null reference. However, since this would require modifying the library code, it introduces maintenance risks and may not be ideal without your review.
Request: Could you please look into this issue? It would be great if a fix could be implemented, or if guidance could be provided on a recommended approach to handle this.
Caused by java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.reject(java.lang.String, java.lang.String)' on a null object reference
at com.busfor.RNGooglePayModule$1.onActivityResult(RNGooglePayModule.java:63)
at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:338)
at com.facebook.react.ReactInstanceManager.onActivityResult(ReactInstanceManager.java:821)
at com.facebook.react.ReactDelegate.onActivityResult(ReactDelegate.java:90)
at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:133)
at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:70)
at android.app.Activity.dispatchActivityResult(Activity.java:9139)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5973)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:6019)
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:144)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:101)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2724)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:255)
at android.os.Looper.loop(Looper.java:364)
at android.app.ActivityThread.main(ActivityThread.java:8979)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1053)
Thank you
The text was updated successfully, but these errors were encountered:
Hello Team,
I’m experiencing a crash in the RNGooglePayModule at com.busfor.RNGooglePayModule$1.onActivityResult, specifically related to the requestPaymentPromise object being null. The crash occurs when the onActivityResult method is triggered, and it tries to access requestPaymentPromise.reject(), resulting in a NullPointerException. This appears to be happening when the Google Pay activity result returns RESULT_CANCELED or RESULT_ERROR, and requestPaymentPromise hasn’t been set.
Caused by java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.reject(java.lang.String, java.lang.String)' on a null object reference
at com.busfor.RNGooglePayModule$1.onActivityResult(RNGooglePayModule.java:xx)
Proposed Solution: To address this, I would suggest adding a null check for requestPaymentPromise within the onActivityResult method to avoid calling .reject() on a null reference. However, since this would require modifying the library code, it introduces maintenance risks and may not be ideal without your review.
Request: Could you please look into this issue? It would be great if a fix could be implemented, or if guidance could be provided on a recommended approach to handle this.
Caused by java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.reject(java.lang.String, java.lang.String)' on a null object reference
at com.busfor.RNGooglePayModule$1.onActivityResult(RNGooglePayModule.java:63)
at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:338)
at com.facebook.react.ReactInstanceManager.onActivityResult(ReactInstanceManager.java:821)
at com.facebook.react.ReactDelegate.onActivityResult(ReactDelegate.java:90)
at com.facebook.react.ReactActivityDelegate.onActivityResult(ReactActivityDelegate.java:133)
at com.facebook.react.ReactActivity.onActivityResult(ReactActivity.java:70)
at android.app.Activity.dispatchActivityResult(Activity.java:9139)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5973)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:6019)
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:144)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:101)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2724)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:255)
at android.os.Looper.loop(Looper.java:364)
at android.app.ActivityThread.main(ActivityThread.java:8979)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1053)
Thank you
The text was updated successfully, but these errors were encountered: