Keychain retrieval failure

We have uploaded the latest version of our application to App store last week. Many users have updated it go latest version also. But for some users, getting exceptions while retrieving data from keychain. And this is causing the app to crash while launching itself.

After doing some analysis, we found that most of users with kechain issue are using iOS 11.2.6 and latest devices like iPhone 7 & iPhone 8 plus.

Kindly help us on finding the root cause, if you are came across any such issues. We are using keychainItemWrapper v1.2.

But for some users, getting exceptions while retrieving data from keychain.

What error are they getting back from the keychain APIs?

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

They are getting the below exception:


*** Terminating app due to uncaught exception 'NSGenericException', reason: 'Keychain retrieve Error - Error Domain=NSCocoaErrorDomain Code=3840 "Cannot parse a NULL or zero-length data" UserInfo={NSDebugDescription=Cannot parse a NULL or zero-length data}'

That exception isn’t being raised by the keychain, which is a C API and thus returns error codes rather than raising Objective-C exceptions. You will have to dig into whatever keychain wrapper you’re using to uncover what’s going wrong at the API level.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks for your reply. We have turned OFF keychain sharing in this release. Will that cause any retrieval failure from Keychain.

We have turned OFF keychain sharing in this release. Will that cause any retrieval failure from Keychain.

It’s impossible to say without some more concrete details about what’s causing the problem in the first place.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"
Keychain retrieval failure
 
 
Q