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

Crash while fetching from keychain #188

Open
Spacelapp opened this issue Jun 26, 2015 · 7 comments
Open

Crash while fetching from keychain #188

Spacelapp opened this issue Jun 26, 2015 · 7 comments

Comments

@Spacelapp
Copy link

Any option to disable account storing in the keychain?

Here's the crash:
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected error while fetching accounts from keychain: 4294941988'

Best regards,
Lukas

@toto
Copy link
Contributor

toto commented Jun 26, 2015

No, and it does not feel like a good idea to do that. Can you investigate the cause of the crash?

@Spacelapp
Copy link
Author

@sirnacnud
Copy link
Contributor

I am running in to this same problem. I have a Today Widget extension that can update when the phone is locked and it makes a call to retrieve the accounts. I have been able to fix the assert by adding kSecAttrAccessibleAfterFirstUnlock, kSecAttrAccessible to the query for the Keychain item. I would create a pull request, but just adding this attribute will break keychain functionality for people already using the library. This is because the query is modified, so the old keychain item can't be deleted or retrieved with the new query. It seems like we would need to add some kind of update method that adds the kSecAttrAccessible attribute to the existing keychain entry and then the new query should work.

@senryxie
Copy link

Any clue about this 4294941988 error code? I just find the same issue from my App.
It's already using kSecAttrAccessibleAfterFirstUnlock for kSecAttrAccessible.

@krunalbhavsar
Copy link

I also facing same error:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Unexpected error while fetching accounts from keychain: 4294941988'

@shorbenko
Copy link

4294941988 is not the right error code value. This number is a result of usage %zd format during error printing.
The correct value is -25308.
errSecInteractionNotAllowed = -25308, /* User interaction is not allowed. */
You can check it by running following lldb command:

(lldb) po [NSString stringWithFormat:@"%zd",-25308]
4294941988

@adeadman
Copy link

I fixed it in my app by adding the "Keychain Access" entitlement under the Project settings->Targets, choosing the Capabilities tab. This allows it to work in iOS 10.1.

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

7 participants