Taracque / cordova-plugin-braintree

:credit_card: A Cordova plugin for the Braintree mobile payment processing SDK.
MIT License
27 stars 42 forks source link

Ionic 4, Cordova & iOS - the app crashes #79

Open ciccilleju opened 4 years ago

ciccilleju commented 4 years ago

Hello!

I'm doing an app with Ionic 4 and cordova-plugin-braintree version 0.5.1

With Android everything works fine.

With iOs i'm having trouble making it work:

I can access ythe paypal account, choose the card and the payment method but when i choose to pay the app crashes and i get this error:

2020-03-03 10:45:27.414499+0100 Single Fin App[53289:11332367] Connection 7: unable to determine interface type without an established connection 2020-03-03 10:45:27.414547+0100 Single Fin App[53289:11332367] Connection 7: unable to determine fallback status without a connection 2020-03-03 10:45:29.186 Single Fin App[53289:11316095] Untrusted SSL certificate chain. Refusing to communicate with PayPal servers. 2020-03-03 10:45:29.189591+0100 Single Fin App[53289:11332366] Task <01FE38F8-CD3E-478A-ADEE-5CFD2F8E8994>.<0> HTTP load failed, 0/0 bytes (error code: -999 [1:89]) 2020-03-03 10:45:36.659198+0100 Single Fin App[53289:11316095] CDVIonicKeyboard: updating frame 2020-03-03 10:45:39.434503+0100 Single Fin App[53289:11316095] CDVIonicKeyboard: updating frame 2020-03-03 10:45:43.809588+0100 Single Fin App[53289:11316095] CDVIonicKeyboard: updating frame 2020-03-03 10:45:49.196546+0100 Single Fin App[53289:11316095] CDVIonicKeyboard: updating frame 2020-03-03 10:45:55.487106+0100 Single Fin App[53289:11316095] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[3]' *** First throw call stack: ( 0 CoreFoundation 0x00000001036ed27e exceptionPreprocess + 350 1 libobjc.A.dylib 0x0000000101d00b20 objc_exception_throw + 48 2 CoreFoundation 0x000000010377fab1 _CFThrowFormattedException + 194 3 CoreFoundation 0x000000010378a4c6 -[NSPlaceholderDictionary initWithObjects:forKeys:count:].cold.4 + 38 4 CoreFoundation 0x000000010374ad97 -[NSPlaceholderDictionary initWithObjects:forKeys:count:] + 247 5 CoreFoundation 0x00000001036e912b +[NSDictionary dictionaryWithObjects:forKeys:count:] + 59 6 Single Fin App 0x0000000100b58ff8 -[BraintreePlugin getPaymentUINonceResult:] + 1928 7 Single Fin App 0x0000000100b58597 -[BraintreePlugin dropInViewController:didSucceedWithTokenization:] + 183 8 BraintreeUI 0x000000010106c610 -[BTDropInViewController informDelegateDidAddPaymentInfo:] + 140 9 BraintreeUI 0x000000010106e4b5 -[BTDropInViewController paymentButtonDidCompleteTokenization:fromViewController:error:] + 266 10 BraintreeUI 0x0000000101069256 44-[BTDropInViewController initWithAPIClient:]_block_invoke + 82 11 BraintreePayPal 0x0000000100fd4697 57-[BTPayPalDriver setAppSwitchReturnBlock:forPaymentType:]_block_invoke_3 + 254 12 libdispatch.dylib 0x0000000105d78dd4 _dispatch_call_block_and_release + 12 13 libdispatch.dylib 0x0000000105d79d48 _dispatch_client_callout + 8 14 libdispatch.dylib 0x0000000105d87de6 _dispatch_main_queue_callback_4CF + 1500 15 CoreFoundation 0x0000000103650049 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9 16 CoreFoundation 0x000000010364aca9 __CFRunLoopRun + 2329 17 CoreFoundation 0x000000010364a066 CFRunLoopRunSpecific + 438 18 GraphicsServices 0x0000000108bcdbb0 GSEventRunModal + 65 19 UIKitCore 0x000000010c0fdd4d UIApplicationMain + 1621 20 Single Fin App 0x0000000100b56811 main + 65 21 libdyld.dylib 0x0000000105e01c25 start + 1 22 ??? 0x0000000000000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

this is my AppDelegate file

@implementation AppDelegate

}

@end

thank you!

kheber92 commented 4 years ago

I'm getting the same error message. Using cordova-plugin-braintree version 0.5.1 with Ionic 4. Braintree is in sandbox mode.