razorpay / react-native-razorpay

React Native wrapper for Razorpay's mobile SDKs
https://www.npmjs.com/package/react-native-razorpay
MIT License
122 stars 107 forks source link

The react-native-razorpay app gets crashed once the success or failure message is clicked plz help #367

Closed jaysonfinny93 closed 2 years ago

jaysonfinny93 commented 2 years ago

i am using the android platform and it works well untill the final payment is done i mean if success or failure happens the app gets crashed the Payload is description: 'Credits towards consultation', image: '', currency: currency, key: testkey, amount: amount, name: 'Acme Corp', order_id: id,//Replace this with an order_id created using Orders API., prefill: { email: "test@test.com", contact:4567890987, name:'name' }, theme: { color: '#61b244' }

Vick-works commented 2 years ago

facing the same issue!

ppv94 commented 2 years ago

Facing the same issue In android.

vismaya-haridas commented 2 years ago

same issue here

vivekshindhe commented 2 years ago

@jaysonfinny93 @Vick-works @ppv94 @VISMAYAHARIDAS We noticed this issue. Releasing a patch for this ASAP. Will update here once it's done. Thank you for your patience.

Vick-works commented 2 years ago

@jaysonfinny93 @ppv94 @VISMAYAHARIDAS "2.2.7" - this version of react-native razorpay does not have this issue. try installing "npm i react-native-razorpay@2.2.7"

vivekshindhe commented 2 years ago

Thank you for your patience. Please do an npm install and it should take the latest SDK which has this issue resolved. Also please update the version back to 2.2.8. Thank you

jaysonfinny93 commented 2 years ago

Hi @vivekshindhe i have uninstalled my previous version and then reinstall with version 2.2.8 but still facing the same issue..plz help

ppv94 commented 2 years ago

Thanks @Vick-works react-native-razorpay - 2.2.7 works for me on both android & ios.

amityadav12239 commented 2 years ago

facing the same issue!

GTSConserve commented 2 years ago

facing the same issue, after updating 2.2.8

eramudeep commented 2 years ago

i am also facing the same issue. can anyone please provide a remedy @jaysonfinny93

ppv94 commented 2 years ago

@eramudeep downgrade your react-native-razorpay version to 2.2.7 this works for me.

SWEKanaramYadav commented 2 years ago

@vivekshindhe I am also facing the same issue.

kuldeepGomilestone commented 2 years ago

@ppv94 downgraded but still crashing for me also, I wonder if this has something to do with react-native-reanimated used by react-navigation's bottom navigation , because when I switched my branch to before bottom navigation and reanimated it started working, but I can't drop bottom navigation so still stuck with the crash

eramudeep commented 2 years ago

@eramudeep downgrade your react-native-razorpay version to 2.2.7 this works for me.

not worked for me :(

vivekshindhe commented 2 years ago

Hi all, we apologise for the delay in getting back to you about this. This was an issue with the Android SDK, which has since been resolved in the version v1.6.14. You can try reinstalling the react-native plugin, or do npm I again which will automatically resolve this issue for you. Thank you for your patience.

kuldeepGomilestone commented 2 years ago

@vivekshindhe still crashing i totally cleaned old plugin and re-installed the razorpay plugin still not working

vivekshindhe commented 2 years ago

@kuldeepGomilestone this may be because of the caching done by gradle. If you can open the android project inside your razorpay project in android studio, and sync files, it should start working. To verify, in the left hand side you see the project explorer in android studio. In the external libraries dropdown, you should see the version of the razorpay android sdk. It is com.razorpay:checkout. It should be of version 1.6.15. This should resolve your error

kuldeepGomilestone commented 2 years ago

@vivekshindhe , still facing the issue attached android studio screenshot , version is 1.6.15

image

vivekshindhe commented 2 years ago

@kuldeepGomilestone Do you have logs for this sir?

vivekshindhe commented 2 years ago

I'm testing on my end. Don't see this error anymore.

kuldeepGomilestone commented 2 years ago

@vivekshindhe attached the ADB logs sheet.

kuldeepGomilestone commented 2 years ago

10-29 13:44:50.582 1977 3225 E InputDispatcher: Window handle Window{c29d0d7 u0 com.mooo.partnerapp/com.mooo.partnerapp.MainActivity} has no registered input channel 10-29 13:44:54.794 29837 29837 I chatty : uid=10134(com.mooo.partnerapp) identical 2 lines 10-29 13:44:59.100 1977 2259 I ActivityTaskManager: START u0 {cmp=com.mooo.partnerapp/com.razorpay.CheckoutActivity (has extras)} from uid 10134 10-29 13:44:59.147 29837 29837 W System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.apps.nbu.paisa.inapp.client.api.PaymentsClient" on path: DexPathList[[zip file "/data/app/com.mooo.partnerapp-Vvplh7gI99N-HGOmqqeyUQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.mooo.partnerapp-Vvplh7gI99N-HGOmqqeyUQ==/lib/x86, /data/app/com.mooo.partnerapp-Vvplh7gI99N-HGOmqqeyUQ==/base.apk!/lib/x86, /system/lib, /system/product/lib]] 10-29 13:44:59.218 1977 2003 I ActivityManager: Start proc 599:com.google.android.webview:sandboxed_process0:org.chromium.content.app.SandboxedProcessService0:0/u0i1 for {com.mooo.partnerapp/org.chromium.content.app.SandboxedProcessService0:0} 10-29 13:44:59.415 1977 2002 W BroadcastQueue: Background execution not allowed: receiving Intent { act=rzp.device_token.share flg=0x10 } to com.mooo.partnerapp/com.razorpay.RzpTokenReceiver 10-29 13:45:00.584 1977 2259 E InputDispatcher: Window handle Window{5771c76 u0 com.mooo.partnerapp/com.razorpay.CheckoutActivity} has no registered input channel 10-29 13:45:00.811 29837 31606 I chatty : uid=10134(com.mooo.partnerapp) RenderThread identical 5 lines 10-29 13:45:00.857 29837 31606 I chatty : uid=10134(com.mooo.partnerapp) RenderThread identical 1 line 10-29 13:45:01.240 29837 31606 I chatty : uid=10134(com.mooo.partnerapp) RenderThread identical 8 lines 10-29 13:45:01.347 29837 31606 I chatty : uid=10134(com.mooo.partnerapp) RenderThread identical 4 lines 10-29 13:45:12.111 29837 29837 D com.razorpay.checkout: {"key":"NTZmNWIwNGZhODc1MmUyY2YxOTM5NmM0","events":[{"event":"ch:and_checkout:activity:init_start","timestamp":"1635495299","properties":{"local_order_id":"IF5B7UvES8qPNo","local_payment_id":"IF5B7UvES8Besw","merchant_app_name":"MoooFarm Partner","merchant_app_version":"1.0","merchant_app_build":1,"platform":"mobile_sdk","platform_version":"1.6.15","os":"android","os_version":"10","library":"CHECKOUTJS"}},{"event":"assist:and_error_log","timestamp":"1635495299","properties":{"error_message":"Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference","error_level":"critical","local_order_id":"IF5B7UvES8qPNo","local_payment_id":"IF5B7UvES8Besw","merchant_app_name":"MoooFarm Partner","merchant_app_version":"1.0","merchant_app_build":1,"platform":"mobile_sdk","platform_version":"1.6.15","os":"android","os_version":"10","library":"CHECKOUTJS","merchant_package":"com.mooo.partnerapp","merchant_key":"rzp_test_EdTO5Exir0g4JM"}},{"event":"assist:and_error_log","timestamp":"1635495299","properties":{"error_message":"No dash options defined","error_level":"error","local_order_id":"IF5B7UvES8qPNo","local_payment_id":"IF5B7UvES8Besw","merchant_app_name":"MoooFarm Partner","merchant_app_version":"1.0","merchant_app_build":1,"platform":"mobile_sdk","platform_version":"1.6.15","os":"android","os_version":"10","library":"CHECKOUTJS","framework":"react_native","merchant_package":"com.mooo.partnerapp","merchant_key":"rzp_test_EdTO5Exir0g4JM","merchant options":{"description":"Cattle Booking Charges","receipt":"4dedf810-3890-11ec-8bc8-8bc47563fdb6","name":"MoooFarm","prefill":{"name":"Kuldeep","email":"void@mooofarm.com","contact":"9555298353"},"amount":49900,"key":"rzp_test_EdTO5Exir0g4JM","currency":"INR","order_id":"order_IF5B6xbFECDTlZ","hidden":{"contact":true,"email":true},"config":{"display":{"blocks":{"hdfc":{"name":"Pay using apps","instruments":[{"method":"upi"},{"wallets":["phonepe","amazonpay","freecharge","mobikwik","airtelmoney","payzapp"],"method":"wallet"}]},"other":{"name":"Credit\/Debit cards","instruments":[{"method":"card"},{"method":"netbanking"}]}},"sequence":["block.hdfc","block.other"],"preferences":{"show_default_blocks":false}}},"redirect":true}}},{"event":"assist:and_error_log","timestamp":"1635495299","properties":{"error_message":"No value for theme","error_level":"error","local_order_id":"IF5B7UvES8qPNo","local_payment_id":"IF5B7UvES8Besw","merchant_app_name":"MoooFarm Partner","merchant_app_version":"1.0","merchant_app_build":1,"platform":"mobile_sdk","platform_version":"1.6.15","os":"android","os_version":"10","library":"CHECKOUTJS","framework":"react_native","merchant_package":"com.mooo.partnerapp","merchant_key":"rzp_test_EdTO5Exir0g4JM","merchant options":{"description":"Cattle Booking Charges","receipt":"4dedf810-3890-11ec-8bc8-8bc47563fdb6","name":"MoooFarm","prefill":{"name":"Kuldeep","email":"void@mooofarm.com","contact":"9555298353"},"amount":49900,"key":"rzp_test_EdTO5Exir0g4JM","currency":"INR","order_id":"order_IF5B6xbFECDTlZ","hidden":{"contact":true,"email":true},"config":{"display":{"blocks":{"hdfc":{"name":"Pay using apps","instruments":[{"method":"upi"},{"wallets":["phonepe","amazonpay","freecharge","mobikwik","airtelmoney","payzapp"],"method":"wallet"}]},"other":{"name":"Credit\/Debit cards","instruments":[{"method":"card"},{"method":"netbanking"}]}},"sequence":["block.hdfc","block.other"],"preferences":{"show_default_blocks":false}}},"redirect":true}}},{"event":"assist:and_perm:sms_already:not:granted","timestamp":"1635495299","properties":{"local_order_id":"IF5B7UvES8qPNo","local_payment_id":"IF5B7UvES8Besw","merchant_app_name":"MoooFarm Partner","merchant_app_version":"1.0","merchant_app_build":1,"platform":"mobile_sdk","platform_version":"1.6.15","os":"android","os_version":"10","library":"CHECKOUTJS","framework":"react_native","merchant_package":"com.mooo.partnerapp","merchant_key":"rzp_test_EdTO5Exir0g4JM","merchant options":{"description":"Cattle Booking Charges","receipt":"4dedf810-3890-11ec-8bc8-8bc 10-29 13:45:13.391 1977 2759 E InputDispatcher: Window handle Window{31c310d u0 com.mooo.partnerapp/com.razorpay.CheckoutActivity} has no registered input channel 10-29 13:45:13.891 1977 2259 E InputDispatcher: Window handle Window{ee737be u0 com.mooo.partnerapp/com.razorpay.CheckoutActivity} has no registered input channel 10-29 13:45:22.595 1977 2259 E InputDispatcher: Window handle Window{b8d7d2b u0 com.mooo.partnerapp/com.razorpay.CheckoutActivity} has no registered input channel 10-29 13:45:22.637 29837 29837 E AndroidRuntime: Process: com.mooo.partnerapp, PID: 29837 10-29 13:45:22.637 29837 29837 E AndroidRuntime: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=62442, result=1, data=Intent { (has extras) }} to activity {com.mooo.partnerapp/com.mooo.partnerapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null object reference 10-29 13:45:22.640 29837 29837 E WebEngage: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=62442, result=1, data=Intent { (has extras) }} to activity {com.mooo.partnerapp/com.mooo.partnerapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null object reference 10-29 13:45:22.650 29837 713 D com.razorpay.checkout: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=62442, result=1, data=Intent { (has extras) }} to activity {com.mooo.partnerapp/com.mooo.partnerapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void com.facebook.react.bridge.Promise.resolve(java.lang.Object)' on a null object reference 10-29 13:45:22.875 1977 6202 W ActivityTaskManager: Force finishing activity com.mooo.partnerapp/.MainActivity 10-29 13:45:22.970 1977 2061 W InputDispatcher: channel '1a6444a com.mooo.partnerapp/com.razorpay.CheckoutActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 10-29 13:45:22.971 1977 2061 E InputDispatcher: channel '1a6444a com.mooo.partnerapp/com.razorpay.CheckoutActivity (server)' ~ Channel is unrecoverably broken and will be disposed! 10-29 13:45:22.981 1977 2061 W InputDispatcher: channel 'f133bf0 com.mooo.partnerapp/com.mooo.partnerapp.MainActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9 10-29 13:45:22.982 1977 2061 E InputDispatcher: channel 'f133bf0 com.mooo.partnerapp/com.mooo.partnerapp.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed! 10-29 13:45:22.988 1977 2213 I ActivityManager: Process com.mooo.partnerapp (pid 29837) has died: vis+99 TOP 10-29 13:45:22.988 1977 4306 I WindowManager: WIN DEATH: Window{1a6444a u0 com.mooo.partnerapp/com.razorpay.CheckoutActivity} 10-29 13:45:22.988 1977 4306 W InputDispatcher: Attempted to unregister already unregistered input channel '1a6444a com.mooo.partnerapp/com.razorpay.CheckoutActivity (server)' 10-29 13:45:22.989 1977 4903 I WindowManager: WIN DEATH: Window{f133bf0 u0 com.mooo.partnerapp/com.mooo.partnerapp.MainActivity} 10-29 13:45:22.989 1977 4903 W InputDispatcher: Attempted to unregister already unregistered input channel 'f133bf0 com.mooo.partnerapp/com.mooo.partnerapp.MainActivity (server)' 10-29 13:45:23.378 1977 1996 W ActivityTaskManager: Activity top resumed state loss timeout for ActivityRecord{bf8fbf9 u0 com.mooo.partnerapp/.MainActivity t-1 f} 10-29 13:45:23.884 1977 2003 I ActivityManager: Start proc 731:com.mooo.partnerapp/u0a134 for service {com.mooo.partnerapp/com.google.android.datatransport.runtime.scheduling.jobscheduling.JobInfoSchedulerService} 10-29 13:45:24.393 731 731 I FirebaseCrashlytics: Initializing Firebase Crashlytics 18.2.3 for com.mooo.partnerapp 10-29 13:45:24.523 1977 2754 W ActivityManager: Background start not allowed: service Intent { cmp=com.mooo.partnerapp/com.webengage.sdk.android.ExecutorService (has extras) } to com.mooo.partnerapp/com.webengage.sdk.android.ExecutorService from pid=731 uid=10134 pkg=com.mooo.partnerapp startFg?=false 10-29 13:45:24.525 731 731 E WebEngage: Exception while starting service: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.mooo.partnerapp/com.webengage.sdk.android.ExecutorService (has extras) }: app is in background uid UidRecord{c6b2352 u0a134 TRNB idle change:idle|uncached procs:1 seq(0,0,0)} 10-29 13:45:24.576 731 731 E WebEngage: Exception while starting service: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.mooo.partnerapp/com.webengage.sdk.android.ExecutorService (has extras) }: app is in background uid UidRecord{c6b2352 u0a134 TRNB idle change:idle|uncached procs:1 seq(0,0,0)} 10-29 13:45:24.586 731 731 D SoLoader: adding application source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.mooo.partnerapp-Vvplh7gI99N-HGOmqqeyUQ==/lib/x86 flags = 0] 10-29 13:45:24.588 731 731 D SoLoader: adding backup source from : com.facebook.soloader.ApkSoSource[root = /data/data/com.mooo.partnerapp/lib-main flags = 1] 10-29 13:45:24.589 731 731 D SoLoader: Preparing SO source: com.facebook.soloader.DirectorySoSource[root = /data/app/com.mooo.partnerapp-Vvplh7gI99N-HGOmqqeyUQ==/lib/x86 flags = 0] 10-29 13:45:24.589 731 731 D SoLoader: Preparing SO source: com.facebook.soloader.ApkSoSource[root = /data/data/com.mooo.partnerapp/lib-main flags = 1] 10-29 13:45:24.591 731 731 V fb-UnpackingSoSource: locked dso store /data/user/0/com.mooo.partnerapp/lib-main 10-29 13:45:24.593 731 776 I FA : adb shell setprop debug.firebase.analytics.app com.mooo.partnerapp 10-29 13:45:24.593 731 731 I fb-UnpackingSoSource: dso store is up-to-date: /data/user/0/com.mooo.partnerapp/lib-main 10-29 13:45:24.593 731 731 V fb-UnpackingSoSource: releasing dso store lock for /data/user/0/com.mooo.partnerapp/lib-main 10-29 13:45:24.639 731 731 D SoLoader: libjscexecutor.so not found on /data/data/com.mooo.partnerapp/lib-main 10-29 13:45:24.639 731 731 D SoLoader: libjscexecutor.so found on /data/app/com.mooo.partnerapp-Vvplh7gI99N-HGOmqqeyUQ==/lib/x86 10-29 13:45:24.643 731 731 W System.err: at com.mooo.partnerapp.MainApplication.onCreate(MainApplication.java:76) 10-29 13:45:24.838 731 788 D SoLoader: libfbjni.so not found on /data/data/com.mooo.partnerapp/lib-main 10-29 13:45:24.839 731 788 D SoLoader: libfbjni.so found on /data/app/com.mooo.partnerapp-Vvplh7gI99N-HGOmqqeyUQ==/lib/x86 10-29 13:45:24.849 731 788 D SoLoader: libflipper.so not found on /data/data/com.mooo.partnerapp/lib-main 10-29 13:45:24.849 731 788 D SoLoader: libflipper.so found on /data/app/com.mooo.partnerapp-Vvplh7gI99N-HGOmqqeyUQ==/lib/x86 10-29 13:45:24.574 1977 2754 W ActivityManager: Background start not allowed: service Intent { cmp=com.mooo.partnerapp/com.webengage.sdk.android.ExecutorService (has extras) } to com.mooo.partnerapp/com.webengage.sdk.android.ExecutorService from pid=731 uid=10134 pkg=com.mooo.partnerapp startFg?=false 10-29 13:45:25.971 731 793 D SoLoader: libreactnativejni.so not found on /data/data/com.mooo.partnerapp/lib-main 10-29 13:45:25.971 731 793 D SoLoader: libreactnativejni.so found on /data/app/com.mooo.partnerapp-Vvplh7gI99N-HGOmqqeyUQ==/lib/x86

SWEKanaramYadav commented 2 years ago

@eramudeep downgrade your react-native-razorpay version to 2.2.7 this works for me.

not worked for me :(

@eramudeep downgrade your react-native-razorpay version to 2.2.7 this works for me.

vivekshindhe commented 2 years ago

@kuldeepGomilestone could you please share some reproducible steps for this? We tried reproducing the issue but it just didn't happen.

vivekshindhe commented 2 years ago

@iamkanaramyadav thank you for the support. Version 2.2.8 has been resolved and is working fine. Please update if necessary

kuldeepGomilestone commented 2 years ago

@vivekshindhe it is working now, the package react-native-k4l-video-trimmer was causing the issue, I upgraded this plugin and Razorpay is working now

vivekshindhe commented 2 years ago

@kuldeepGomilestone awesome. Closing the ticket.