Read from keychain results in errSecItemNotFound 25300
Asked Answered
Q

3

9

I store username & password using keychain, sometimes when I tried to get the password of the username, it told me errSecItemNotFound.

I keep that the password is always existed in keychain, so why it is not found?

Thanks.

Querulous answered 25/6, 2013 at 14:3 Comment(1)
Something I encountered is as follows. User name get first letter capitalized due to misconfiguration of email field. Ex. [email protected]. But when I make api request backend save it as [email protected] and I save [email protected] in the in keychain as account but I try to delete [email protected] when logout. Silly mistake. Hope this help someone.Veradia
H
1

Tony: that error is simply OSStatus error -34018 - client has neither application-identifier nor keychain-access-groups entitlements.

This could be happening as a result from using a nonstandard app signing method or some other problem with your entitlements. Make sure you're building simply out of Xcode and not using alternate signing methods unless you completely understand them.

Here answered 24/11, 2013 at 4:44 Comment(3)
I see that keychain access groups entitlements a re not being set, since no access group is required. However how can there be no application-identifier? What does that mean anyways? And yes I'm simply letting xcode handling the signing.Ondrej
Are you using a wildcard appid instead of a specific appid?Here
should be a specific app id. Strange thing is error can never be consistently reproduced.Ondrej
S
0

When reading the keychain, make sure you always build with a provisioning profile linked with the appId that used to create the keychain record.

Swot answered 23/11, 2013 at 7:40 Comment(1)
I'm seeing the OSStatus -34018 error frequently. Any idea what that means?Ondrej
A
0

@graver

http://opensource.apple.com/source/Security/Security-55471/sec/Security/SecBasePriv.h

errSecMissingEntitlement = -34018, /* Internal error when a required entitlement isn't present. */

Ariosto answered 12/12, 2014 at 7:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.