New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App crash after card entry complete #83
Comments
Hey @SamuelKampen thanks for reporting this issue. To help us dig into this, can you confirm if this crash happens 100% of the time? Also, have you turned on any developer settings on your device? |
@SamuelKampen Can you also run |
@StephenJosey @okenshields [!] Android toolchain - develop for Android devices (Android SDK version 29.0.2) ! Doctor found issues in 6 categories. |
Here is a snippet of the code. It is just a shopping cart. @OverRide void _pay() { void _cardNonceRequestSuccess(CardDetails cardDetails) { void _cardEntryComplete() {} void _cardEntryCancel() {} |
Thanks for the info @SamuelKampen. I think I see the issue - Square doesn't support Flutter 1.12 yet. Google released this new version in December which broke many API changes. They state the following:
Until we upgrade our plugin to support 1.12, you'll need to use an older version of Flutter, unfortunately. |
Hey Stephen, |
I had the same error I solved it by downloading flutter v1.9.1 + hotfix. 6 / 68587a0 / 23/10/2019 in macOS catalina |
I am also facing the same issue, tried with both square_in_app_payments: ^1.3.0 and square_in_app_payments: ^1.2.3 I also tried to debug with Android Studio and found below logs in Logcat, making the app gets crashed. 2020-01-07 21:05:19.012 21510-21510/? E/AndroidRuntime: FATAL EXCEPTION: main
|
@SamuelKampen , 1.11 is not official release version of Flutter SDK. Please see https://flutter.dev/docs/development/tools/sdk/releases?tab=macos . v1.9.1 was the previous version. |
Thanks, @StephenJosey my issue has been resolved after downgrading the flutter version to on macOS Mojave. I have downgraded to Flutter version 1.9 hotfix.6. |
Hi @SamuelKampen, I guess you are using Windows, you need to downgrade to version 1.9. |
Thanks for the advice everyone. I am on Linux. I switched to 1.9.1+hotfix.6 and have an error when building the project |
I fixed the above issue by following the instructions here It works now! Thanks everyone. |
Hi Square team,
I am trying to use this plugin to process in app payments in my flutter app. I enter the test card details i.e. 411111111111 ... and then hit the save button once all card details are entered. The check mark appears and then the app crashes with the following error:
2020-01-02 21:39:06.053 7470-7470/com.phrasing.grocery_bullet E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.phrasing.grocery_bullet, PID: 7470
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=51789, result=-1, data=Intent { (has extras) }} to activity {com.phrasing.grocery_bullet/com.phrasing.grocery_bullet.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.app.Activity.getResources()' 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 virtual method 'android.content.res.Resources android.app.Activity.getResources()' on a null object reference
at sqip.flutter.internal.CardEntryModule.readCardEntryCloseExitAnimationDurationMs(CardEntryModule.java:215)
at sqip.flutter.internal.CardEntryModule.access$500(CardEntryModule.java:52)
at sqip.flutter.internal.CardEntryModule$1$1.onResult(CardEntryModule.java:86)
at sqip.flutter.internal.CardEntryModule$1$1.onResult(CardEntryModule.java:73)
at sqip.internal.CardEntryActivity$Companion.onActivityResult(CardEntryActivity.kt:596)
at sqip.CardEntry.handleActivityResult(CardEntry.kt:58)
at sqip.flutter.internal.CardEntryModule$1.onActivityResult(CardEntryModule.java:73)
at io.flutter.embedding.engine.FlutterEnginePluginRegistry$FlutterEngineActivityPluginBinding.onActivityResult(FlutterEnginePluginRegistry.java:634)
at io.flutter.embedding.engine.FlutterEnginePluginRegistry.onActivityResult(FlutterEnginePluginRegistry.java:367)
at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onActivityResult(FlutterActivityAndFragmentDelegate.java:546)
at io.flutter.embedding.android.FlutterActivity.onActivityResult(FlutterActivity.java:594)
at android.app.Activity.dispatchActivityResult(Activity.java:8110)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4838)
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) ### Describe your question
The text was updated successfully, but these errors were encountered: