payfort / flutter-amazonpaymentservices

Flutter package for Amazon Payment Services native mobile SDKs
MIT License
2 stars 4 forks source link

Flutter app crashes on FlutterAmazonpaymentservices.normalPay() #7

Open husnain067 opened 1 year ago

husnain067 commented 1 year ago

W/mple.psg_selle( 2582): Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (greylist, reflection, allowed) W/mple.psg_selle( 2582): Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (greylist, reflection, allowed) W/mple.psg_selle( 2582): Accessing hidden method Ljava/lang/invoke/MethodHandles$Lookup;->(Ljava/lang/Class;I)V (greylist, reflection, allowed) D/AndroidRuntime( 2582): Shutting down VM E/AndroidRuntime( 2582): FATAL EXCEPTION: main E/AndroidRuntime( 2582): Process: com.example.psg_seller, PID: 2582 E/AndroidRuntime( 2582): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1166, result=-1, data=Intent { cmp=com.example.psg_seller/com.payfort.fortpaymentsdk.presentation.init.InitSecureConnectionActivity (has extras) }} to activity {com.example.psg_seller/com.example.psg_seller.MainActivity}: java.lang.IllegalStateException: Reply already submitted E/AndroidRuntime( 2582): at android.app.ActivityThread.deliverResults(ActivityThread.java:5015) E/AndroidRuntime( 2582): at android.app.ActivityThread.handleSendResult(ActivityThread.java:5056) E/AndroidRuntime( 2582): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51) E/AndroidRuntime( 2582): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) E/AndroidRuntime( 2582): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) E/AndroidRuntime( 2582): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) E/AndroidRuntime( 2582): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime( 2582): at android.os.Looper.loop(Looper.java:223) E/AndroidRuntime( 2582): at android.app.ActivityThread.main(ActivityThread.java:7656) E/AndroidRuntime( 2582): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 2582): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) E/AndroidRuntime( 2582): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) E/AndroidRuntime( 2582): Caused by: java.lang.IllegalStateException: Reply already submitted E/AndroidRuntime( 2582): at io.flutter.embedding.engine.dart.DartMessenger$Reply.reply(DartMessenger.java:430) E/AndroidRuntime( 2582): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler$1.error(MethodChannel.java:272) E/AndroidRuntime( 2582): at com.amazon.flutter_amazonpaymentservices.FlutterAmazonpaymentservicesPlugin$2.onFailure(FlutterAmazonpaymentservicesPlugin.java:185) E/AndroidRuntime( 2582): at com.payfort.fortpaymentsdk.FortSdk.onActivityResult(FortSdk.kt:185) E/AndroidRuntime( 2582): at com.payfort.fortpaymentsdk.FortSdk$registerCallback$2.onActivityResult(FortSdk.kt:132) E/AndroidRuntime( 2582): at com.payfort.fortpaymentsdk.callbacks.FortCallback.onActivityResult(FortCallback.kt:23) E/AndroidRuntime( 2582): at com.amazon.flutter_amazonpaymentservices.FlutterAmazonpaymentservicesPlugin.lambda$onAttachedToActivity$1(FlutterAmazonpaymentservicesPlugin.java:101) E/AndroidRuntime( 2582): at com.amazon.flutter_amazonpaymentservices.FlutterAmazonpaymentservicesPlugin$$ExternalSyntheticLambda0.onActivityResult(Unknown Source:0) E/AndroidRuntime( 2582): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEngineConnectionRegistry.java:805) E/AndroidRuntime( 2582): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult(FlutterEngineConnectionRegistry.java:428) E/AndroidRuntime( 2582): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:807) E/AndroidRuntime( 2582): at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:724) E/AndroidRuntime( 2582): at android.app.Activity.dispatchActivityResult(Activity.java:8304) E/AndroidRuntime( 2582): at android.app.ActivityThread.deliverResults(ActivityThread.java:5008) E/AndroidRuntime( 2582): ... 11 more I/Process ( 2582): Sending signal. PID: 2582 SIG: 9 Lost connection to device.


zaafi commented 1 year ago

@husnain067 Remove payfort_plugin, ..

PSanghaniHorizontal commented 10 months ago

We face same issue. Please guide for the root cause of this.

Although with the same implementation payment is getting successful. Only when we cancel the transaction this is happening.

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1166, result=-1, data=Intent { cmp=com.difc.difcapp.uat/com.payfort.fortpaymentsdk.presentation.init.InitSecureConnectionActivity (has extras) }} to activity {com.difc.difcapp.uat/com.difc.MainActivity}: java.lang.NullPointerException E/AndroidRuntime(12062): at android.app.ActivityThread.deliverResults(ActivityThread.java:5526) E/AndroidRuntime(12062): at android.app.ActivityThread.handleSendResult(ActivityThread.java:5565) E/AndroidRuntime(12062): at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67) E/AndroidRuntime(12062): at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45) E/AndroidRuntime(12062): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) E/AndroidRuntime(12062): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) E/AndroidRuntime(12062): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443) E/AndroidRuntime(12062): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime(12062): at android.os.Looper.loopOnce(Looper.java:205) E/AndroidRuntime(12062): at android.os.Looper.loop(Looper.java:294) E/AndroidRuntime(12062): at android.app.ActivityThread.main(ActivityThread.java:8176) E/AndroidRuntime(12062): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(12062): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552) E/AndroidRuntime(12062): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) E/AndroidRuntime(12062): Caused by: java.lang.NullPointerException E/AndroidRuntime(12062): at com.payfort.fortpaymentsdk.FortSdk.onActivityResult(FortSdk.kt:183) E/AndroidRuntime(12062): at com.payfort.fortpaymentsdk.FortSdk$registerCallback$2.onActivityResult(FortSdk.kt:134) E/AndroidRuntime(12062): at com.payfort.fortpaymentsdk.callbacks.FortCallback.onActivityResult(FortCallback.kt:23) E/AndroidRuntime(12062): at com.amazon.flutter_amazonpaymentservices.FlutterAmazonpaymentservicesPlugin.lambda$onAttachedToActivity$1(FlutterAmazonpaymentservicesPlugin.java:110) E/AndroidRuntime(12062): at com.amazon.flutter_amazonpaymentservices.FlutterAmazonpaymentservicesPlugin$$ExternalSyntheticLambda0.onActivityResult(Unknown Source:0) E/AndroidRuntime(12062): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEngineConnectionRegistry.java:813) E/AndroidRuntime(12062): at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.onActivityResult(FlutterEngineConnectionRegistry.java:432) E/AndroidRuntime(12062): at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:853) E/AndroidRuntime(12062): at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:884) E/AndroidRuntime(12062): at android.app.Activity.dispatchActivityResult(Activity.java:8943) E/AndroidRuntime(12062): at android.app.ActivityThread.deliverResults(ActivityThread.java:5519) E/AndroidRuntime(12062): ... 13 more