-
Notifications
You must be signed in to change notification settings - Fork 129
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
Invalid client token crash, when tokenizeCreditCard call #152
Comments
Can you share a bit of code involving tokenization ? |
The crash is repeated in the this project example if you make an empty line in tokenizationKey variable. Thank you. |
Put it in a try/catch block and make sure the tokenizationKey is not empty. try { |
try/catch won't help, error from native code doesn't pop up to dart code. |
Hi, iOS application crashes when we calling the Braintree.tokenizeCreditCard function if you pass an invalid tokenization key(empty string for example) in the authorization field. You can check in your example by replacing the tokenizationKey variable with an empty string
`[BraintreeSDK] ERROR Invalid client token. Please ensure your server is generating a valid Braintree ClientToken.
[BraintreeSDK] ERROR BTClient could not initialize because the provided clientToken was invalid
flutter_braintree/FlutterBraintreeCustomPlugin.swift:77: Fatal error: Unexpectedly found nil while unwrapping an Optional value
flutter_braintree/FlutterBraintreeCustomPlugin.swift:77: Fatal error: Unexpectedly found nil while unwrapping an Optional value
frame #0: 0x000000018518debc libswiftCore.dylib
_swift_runtime_on_report libswiftCore.dylib
:-> 0x18518debc <+0>: ret
libswiftCore.dylib
: 0x18518dec0 <+0>: b 0x18518debc ; _swift_runtime_on_report libswiftCore.dylib
:0x18518dec4 <+0>: adrp x8, 461960
0x18518dec8 <+4>: ldrb w0, [x8, #0x2cc]
Target 0: (Runner) stopped.
Lost connection to device.
the Dart compiler exited unexpectedly.`
Flutter Channel stable, 3.16.7
Xcode 14.3
The text was updated successfully, but these errors were encountered: