paypal / PayPal-iOS-SDK

Accept credit cards and PayPal in your iOS app
Other
973 stars 368 forks source link

NSInvalidArgumentException: 'data parameter is nil' #523

Closed plu closed 7 years ago

plu commented 7 years ago

General information

Issue description

In our Unit Test we see some assert happening inside your SDK:

Process:               Kleinanzeigen [50590]
Path:                  /Users/USER/Library/Caches/*/Kleinanzeigen.app/Kleinanzeigen
Identifier:            Kleinanzeigen
Version:               7.5.0 (4779)
Code Type:             X86-64 (Native)
Parent Process:        launchd_sim [38594]
Responsible:           Kleinanzeigen [50590]
User ID:               502

Date/Time:             2017-04-20 06:34:23.433 +0200
OS Version:            Mac OS X 10.12.4 (16E195)
Report Version:        12
Anonymous UUID:        A84D28F7-1E8A-78F2-51CE-26A754FFD0CC

Time Awake Since Boot: 830000 seconds

System Integrity Protection: disabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'data parameter is nil'
terminating with uncaught exception of type NSException
abort() called
CoreSimulator 375.21 - Device: iPhone 5s - Runtime: iOS 10.3 (14E269) - DeviceType: iPhone 5s

Application Specific Backtrace 1:
0   CoreFoundation                      0x00000001174b3b0b __exceptionPreprocess + 171
1   libobjc.A.dylib                     0x0000000116f1f141 objc_exception_throw + 48
2   CoreFoundation                      0x000000011751c625 +[NSException raise:format:] + 197
3   Foundation                          0x0000000111f86df3 +[NSJSONSerialization JSONObjectWithData:options:error:] + 67
4   Kleinanzeigen                       0x000000010e7738b5 +[PPRiskUtility getDefaultConfig] + 115
5   Kleinanzeigen                       0x000000010e7743db -[PPRiskConfiguration initWithDefaultConfig] + 110
6   Kleinanzeigen                       0x000000010e777cd7 -[PPRiskComponent initWithAppGuid:withAPNSToken:withConfigurationURL:withSourceApp:withSourceAppVersion:withStartAsyncServiceFlag:withDisableRemoteConfigFlag:withPairingId:withAdId:withNetworkAdapterBlock:] + 1556
7   Kleinanzeigen                       0x000000010e7775fa __91+[PPRiskComponent initWithAppGuid:withSourceApp:withSourceAppVersion:withAdditionalParams:]_block_invoke + 151
8   libdispatch.dylib                   0x0000000118355792 _dispatch_client_callout + 8
9   libdispatch.dylib                   0x0000000118340a8d dispatch_once_f + 69
10  Kleinanzeigen                       0x000000010e77755a +[PPRiskComponent initWithAppGuid:withSourceApp:withSourceAppVersion:withAdditionalParams:] + 1348
11  Kleinanzeigen                       0x000000010e741b80 -[PayPalMobile init] + 215
12  Kleinanzeigen                       0x000000010e740bd5 __30+[PayPalMobile sharedInstance]_block_invoke + 41
13  libdispatch.dylib                   0x0000000118355792 _dispatch_client_callout + 8
14  libdispatch.dylib                   0x0000000118340a8d dispatch_once_f + 69
15  Kleinanzeigen                       0x000000010e740ba9 +[PayPalMobile sharedInstance] + 45
16  Kleinanzeigen                       0x000000010e755eaf -[UINavigationController(PayPal) payPalServiceManager] + 69
17  Kleinanzeigen                       0x000000010e6f3b60 -[PayPalPaymentViewController initWithPayment:configuration:delegate:] + 456
18  Kleinanzeigen                       0x000000010e32355b -[EBKPayPalService newPaymentViewControllerWithOrder:] + 379
bluk commented 7 years ago

Hello, are you consistently getting this exception with this version only?

plu commented 7 years ago

Yes. It started when we updated to Xcode 8.3.2.

bluk commented 7 years ago

2.17.0 should fix this issue. If not, please leave a comment and if you can tell if this only occurs in UI tests, if there are any non-normal linker settings (e.g. Swift whole module optimization), or any other details. Thanks.

plu commented 7 years ago

Thank you for the quick fix, 2.17.0 does fix the issue for us!