Skip to content
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

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

Open
ciccilleju opened this issue Mar 3, 2020 · 1 comment
Open

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

ciccilleju opened this issue Mar 3, 2020 · 1 comment

Comments

@ciccilleju
Copy link

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

  • (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
    {
    self.viewController = [[MainViewController alloc] init];
    [BTAppSwitch setReturnURLScheme:@"com.nastydevops.singlefin.payments"];
    return [super application:application didFinishLaunchingWithOptions:launchOptions];

}

  • (BOOL)application:(UIApplication *)application
    openURL:(NSURL *)url
    options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
    if ([url.scheme localizedCaseInsensitiveCompare:@"com.nastydevops.singlefin.payments"] == NSOrderedSame) {
    return [BTAppSwitch handleOpenURL:url options:options];
    }
    return NO;
    }

@EnD

thank you!

@ciccilleju ciccilleju changed the title Cordova & iOS App Crashes Ionic 4, Cordova & iOS - the app crashes Mar 27, 2020
@kheber92
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants