abhimortal6 / flutter_payu_unofficial

Unofficial PayU Money Flutter Plugin supports Android & iOS.
MIT License
1 stars 1 forks source link

App is crashing when clicking on back button in image picker ( #2

Closed harichandu1 closed 3 years ago

harichandu1 commented 3 years ago

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=62442, result=0, data=Intent { (has extras) }} to activity {in.popmart.mobile/in.popmart.mobile.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.MethodChannel$Result.success(java.lang.Object)' on a null object reference E/AndroidRuntime(11003): at android.app.ActivityThread.deliverResults(ActivityThread.java:4846) E/AndroidRuntime(11003): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4887) E/AndroidRuntime(11003): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51) E/AndroidRuntime(11003): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) E/AndroidRuntime(11003): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) E/AndroidRuntime(11003): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2017) E/AndroidRuntime(11003): at android.os.Handler.dispatchMessage(Handler.java:107) E/AndroidRuntime(11003): at android.os.Looper.loop(Looper.java:214) E/AndroidRuntime(11003): at android.app.ActivityThread.main(ActivityThread.java:7397) E/AndroidRuntime(11003): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(11003): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) E/AndroidRuntime(11003): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935) E/AndroidRuntime(11003): Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.MethodChannel$Result.success(java.lang.Object)' on a null object reference E/AndroidRuntime(11003): at com.abhimortal6.flutter_payu_unofficial.FlutterPayuUnofficialPlugin.onActivityResult(FlutterPayuUnofficialPlugin.java:189) E/AndroidRuntime(11003): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEngineConnectionRegistry.java:739) E/AndroidRuntime(11003): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult(FlutterEngineConnectionRegistry.java:426) E/AndroidRuntime(11003): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:677) E/AndroidRuntime(11003): at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:616) E/AndroidRuntime(11003): at android.app.Activity.dispatchActivityResult(Activity.java:8110) E/AndroidRuntime(11003): at android.app.ActivityThread.deliverResults(ActivityThread.java:4839) E/AndroidRuntime(11003): ... 11 more W/.popmart.mobil(11003): No such thread for suspend: 0x71e6f2f6c8:Thread-15

abhimortal6 commented 3 years ago

Fixed in flutter_payu_unofficial: ^1.0.3. Please test and let me know

harichandu1 commented 3 years ago

Hi Abhi, I tested it, working fine. I asked my QA to test it. will let you know after testing. Thanks for the prompt response and for the fix. Could you please explain what caused the crash?? I checked the commit (fixed android plugin clash) . Could not understand completely.

abhimortal6 commented 3 years ago

Hi, Good to know it worked for you. It was plugin clash with image picker's activity result bindings. Image picker's result was landing on payu plugin's override. Closing this issue