nicklockwood / FXKeychain

[DEPRECATED]
Other
555 stars 74 forks source link

FXKeychain failed to retrieve data for key 'token', error: -34018 #31

Open kidsid49 opened 9 years ago

kidsid49 commented 9 years ago

This error comes sometimes while reading data from shared keychain by multiple apps. Can somebody explain what's causing this?

altyus commented 9 years ago

I'm having the same issue

joekh commented 9 years ago

me too FXKeychain failed to retrieve data for key

14lox commented 9 years ago

+1

14lox commented 9 years ago

Apple are aware of it... https://forums.developer.apple.com/thread/4743#14441

UPDATE: We have finally been able to reproduce the -34018 error on iOS 8.3. This is the first step in identifying the root cause and then coming up with a fix.

As usual, we can't commit to a release timeframe, but this has affected many developers and we really want to get this resolved.

In the meantime, for a workaround, try adding a small delay in application:didFinishLaunchingWithOptions and applicationDidBecomeActive: before accessing the keychain. However, we know this hasn't worked in at least one case. Now that we have a reproducible case, I can experiment with the delay and see if I can come up with a recommended value.```

Air-Craft commented 9 years ago

Is it only when accessing the keychain right at launch? I'm getting this well after the app launch...

emonster commented 9 years ago

Having the same issue. Is there a solution to this problem? Thanks

bmatthys commented 9 years ago

Having the same issue and the workaround that Apple provided with the delay is not working for me either. Hope there will be a fix in a new iOS version soon though.

maxoly commented 8 years ago

Having the same issue only when running in debug mode with Xcode with the device connected to the debugger.

sp3esu commented 8 years ago

Having the same issue only when running in debug mode with Xcode/AppCode with the device connected to the debugger...

piogab commented 8 years ago

Same issue here in iOS 9.2.1. When device is not connected to the debugger it works ok for me.

bimusiek commented 8 years ago

Same issue with iOS 10 and iPhone 7 simulator...

jboulter11 commented 8 years ago

@bimusiek and all others getting this issue:

If you're getting this issue now, it's likely because iOS 10 now requires a new entitlement for keychain usage. Here's the fix: https://forums.developer.apple.com/thread/60617

Go to your project target and under capabilities add Keychain Sharing to your app. It immediately resolved my issues.

bimusiek commented 8 years ago

@jboulter11 Yes, you are right. I forgot to reply here after I found the solution.

Confirmed, you have to enable Keychain Sharing, however for me this is not really the solution for people that do not want to share Keychain :) However, the fault is at Apple side.