nitish24p / react-native-upi

A tiny module for Adding payments via UPI in your react native apps ❤️
MIT License
77 stars 30 forks source link

android crash after app pick images from camera/gallery #31

Open venkat-virtus opened 3 years ago

venkat-virtus commented 3 years ago

I'm trying to pick images from the camera or gallery, after picking app immediately crash.

Error at: com.upi.payment.UpiPaymentModule.onActivityResult(UpiPaymentModule.java:83)

Log: com.app E/AndroidRuntime: FATAL EXCEPTION: main Process: com.app, PID: 21492 java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=16845, result=0, data=null} to activity {com.app/com.app.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Callback.invoke(java.lang.Object[])' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:4845) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4886) at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Callback.invoke(java.lang.Object[])' on a null object reference at com.upi.payment.UpiPaymentModule.onActivityResult(UpiPaymentModule.java:83) at com.facebook.react.bridge.ReactContext.onActivityResult(ReactContext.java:275) at com.facebook.react.ReactInstanceManager.onActivityResult(ReactInstanceManager.java:703) at com.reactnativenavigation.react.ReactGateway.onActivityResult(ReactGateway.java:82) at com.reactnativenavigation.NavigationActivity.onActivityResult(NavigationActivity.java:88) at android.app.Activity.dispatchActivityResult(Activity.java:8110) at android.app.ActivityThread.deliverResults(ActivityThread.java:4838)

satyabrata-dash5 commented 3 years ago

i am facing same issue

snavtechnologies commented 1 year ago

I am also facing the same issue

anshidnm commented 9 months ago

I am also facing the same issue

Did you get any solution for this?