-
Notifications
You must be signed in to change notification settings - Fork 418
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
Fatal Exception: NSInvalidArgumentException *** setObjectForKey: object cannot be nil (key: v_Data) #961
Comments
@brad36 Are you able to reproduce this on |
Hi Bharath, no not yet, haven't really tried, or had 3.2 in production. We are planning to upgrade to 3.2 within the next couple of months, so when that goes into production, if its still an issue, we should see it come up in Crashlytics eventually |
@brad36 Thanks for checking. We've made some bug fixes in that area in |
We are still seeing this in 3.2, stacktrace is eerily similar, so it looks like the problem is still there: 3 |
Can confirm this also happens on 3.2. I have typically seen this when a user has logged in successfully and then used the logout switch in settings. On next launch the app attempts to set the lockout to 0 and fails with exc_bad_access |
#0 0x00000001973dbbd0 in objc_msgSend () |
@bhariharan should we file as a new issue? or you can re-open this one? |
@akhileshgupta as requested I’ve added more debugging and it only seems to happen when the real device (iPad Air A1475, iOS 8.2) is connected to Xcode and running in debug. Even then, it does not always happen but it once it happens, it tends to keep happening for a period of time until I give up scratching my head and delete the container from the device. I have enabled SFLogger and gone through multiple login/logout cycles with the device running on it’s own and detached from Xcode (6.2) and I haven’t seen the error since. Very odd and it may well be Xcode related but I’m not 100%. What I do know is, when it crashes, the value passed to writeLockoutTimeToKeychain is always 0 and is converted to an NSData value of <0000 0000>. It crashes at the point where it tries to execute the following step: if (data != nil) |
We've seen it only when not connected to Xcode. It seems to be on install when there is no salesforce login there. |
Also, it seems to happen more on devices that are not logged into salesforce (and have not been) and where the app is running in the background (e.g. Background Fetch) |
Similar crash was happened. Crash log: |
Is there a possibility for this to happen when the device is locked, so that keychain is not really accessible? |
Got the following error running SDK3.0 on iOS7.1.2
Fatal Exception: NSInvalidArgumentException *** setObjectForKey: object cannot be nil (key: v_Data)
0 CoreFoundation 0x2eda6ecb exceptionPreprocess + 130
1 libobjc.A.dylib 0x39980ce7 objc_exception_throw + 38
2 CoreFoundation 0x2ece217f -[__NSDictionaryM setObject:forKey:] + 818
3 iPath 0x001f4699 -[SFKeychainItemWrapper setObject:forKey:]
4 iPath 0x001f5189 -[SFKeychainItemWrapper setValueData:]
5 iPath 0x00325bd7 +SFSecurityLockout writeLockoutTimeToKeychain:
6 iPath 0x00322483 +SFSecurityLockout upgradeSettings
7 iPath 0x00321ed3 +SFSecurityLockout initialize
8 libobjc.A.dylib 0x39981559 _class_initialize + 572
9 libobjc.A.dylib 0x39985a0f lookUpImpOrForward + 130
10 libobjc.A.dylib 0x39985983 _class_lookupMethodAndLoadCache3 + 34
11 libobjc.A.dylib 0x3998a8b9 _objc_msgSend_uncached + 24
12 iPath 0x0034c8e9 -SalesforceSDKManager savePasscodeActivityInfo
13 iPath 0x0034bfbb -SalesforceSDKManager handleAppBackground:
14 CoreFoundation 0x2ed68f01 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 12
15 CoreFoundation 0x2ecdcd69 _CFXNotificationPost + 1720
16 Foundation 0x2f6c8cc5 -[NSNotificationCenter postNotificationName:object:userInfo:] + 72
17 UIKit 0x3165b511 -[UIApplication _handleApplicationSuspend:eventInfo:] + 912
18 UIKit 0x315dd213 -[UIApplication handleEvent:withNewEvent:] + 890
19 UIKit 0x315dcdd9 -[UIApplication sendEvent:] + 72
20 iPath 0x0030bead -SFApplication sendEvent:
21 UIKit 0x316413e5 _UIApplicationHandleEvent + 616
22 GraphicsServices 0x33c14b55 _PurpleEventCallback + 608
23 GraphicsServices 0x33c1473f PurpleEventCallback + 34
24 CoreFoundation 0x2ed71807 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 34
25 CoreFoundation 0x2ed717a3 __CFRunLoopDoSource1 + 346
26 CoreFoundation 0x2ed6ff6f __CFRunLoopRun + 1406
27 CoreFoundation 0x2ecda729 CFRunLoopRunSpecific + 524
28 CoreFoundation 0x2ecda50b CFRunLoopRunInMode + 106
29 GraphicsServices 0x33c136d3 GSEventRunModal + 138
30 UIKit 0x3163b871 UIApplicationMain + 1136
31 iPath 0x0010fc0b main (main.m:33)
32 libdyld.dylib 0x39e7eab7 start + 2
The text was updated successfully, but these errors were encountered: