Comments (18)
I'm also seeing this problem. Poking around in the code doesn't seem to be revealing much.
from fxkeychain.
This seems to help here: https://devforums.apple.com/message/973706#973706
from fxkeychain.
Can you try the latest version and see if that fixes it? Just found a bug that could have had all kinds of side effects, possibly including this one.
from fxkeychain.
I get this error also from time to time. I can't find a way to reproduce it though. My interface to Get and Set objects is pretty simple.
+ (BOOL)setObjectForThisDevice:(id)object forKey:(id)key
{
FXKeychain* keyChain = [[FXKeychain alloc] initWithService:[[NSBundle mainBundle] bundleIdentifier]
accessGroup:nil
accessibility:FXKeychainAccessibleAlwaysThisDeviceOnly];
return [keyChain setObject:object forKey:key];
}
+ (id)objectForThisDeviceForKey:(id)key
{
FXKeychain* keyChain = [[FXKeychain alloc] initWithService:[[NSBundle mainBundle] bundleIdentifier]
accessGroup:nil
accessibility:FXKeychainAccessibleAlwaysThisDeviceOnly];
return [keyChain objectForKey:key];
}
from fxkeychain.
I have same issue and I can reproduce it in 90% cases:
- Open app.
- Set value
- Put app into background
- Start timer with 10-20 sec timeout and in handler try to read the same value from keychain
- Lock phone
- Unlock phone
- Wait for timer hander
Environment: iOS 8.1 iPhone5S/6 with passcode
from fxkeychain.
@kronik what value are you using for the accessibility parameter?
from fxkeychain.
I'm having the same issue, both when I try to read from and store to the keychain. Happens intermittently but often enough. Steps to repro:
- Open app.
- Set value
- Put the app into the BG
- Let device go into sleep mode.
- Unlock phone and bring the app into the foreground.
- Try to access the value set in step 2.
For reference, I'm using 'FXKeychainAccessibleAlwaysThisDeviceOnly' as my accessibility option, and I'm using the 'defaultKeychain' singleton instance instead of my own.
EDIT: There's a long thread about error -34018 on the Apple Dev Forums: https://devforums.apple.com/thread/254300
from fxkeychain.
I'm also having this issue with the latest version of FXKeychain on actual devices. Happens when the app is in the background for an indefinite amount of time. I'm also experiencing the reverse problem where data that was stored and previously retrieved successfully suddenly starts returning NULL values.
from fxkeychain.
Any news on this? Getting this error on actual device and causing quite a big problem here...
from fxkeychain.
The conclusion I'm seeing everywhere is that this is a bug in Keychain, that there's no fix for for it, and that you just have to work around. The exact same bug was reported on SSKeychain and he closed it with a message to that effect :-/
I'm sorry, I know that's a terrible answer, but I don't have much to add. If it would be useful for me to surface the error, or handle it in a different way so you are better able to recover, let me know, but it seems that's all I can do until/unless Apple fixes it.
from fxkeychain.
This is really bad. Any idea when it started occurring? After iOS8?
from fxkeychain.
Seems to have been an issue in iOS 7 as well. People claimed it was fixed and re-introduced various times, but it may just be because it was sporadic and hard to reproduce consistently.
from fxkeychain.
All right thanks Nick.
Hating Apple these days...
from fxkeychain.
I just add my experience. Since I have updated to XCode 6.3 I am getting this error almost regularly. Before I did not see the error at all. What is the workaround for this issue?
from fxkeychain.
Help. It always return "FXKeychain failed to retrieve data for key" error, any way to solve?
from fxkeychain.
Hi everyone, i just found out the this only happens when im running the app directly from xcode.
from fxkeychain.
Hi All, This is True, I have this issue when I am testing the app with debugger (directly from Xcode) but it works charming without connecting to Xcode.
from fxkeychain.
Running app in simulator just doesn't work at all...always got this error -34018, but work fine in real devices, really weird
from fxkeychain.
Related Issues (20)
- dataWithPropertyList returns nil on NSDictionary HOT 6
- Old-style plist parser HOT 5
- A few notes on thread safety would be great! HOT 2
- Updating key fails in simulator with ios 7.1B5 (works fine on device) HOT 3
- Would there be any benefit in providing a "resetKeychain" API (or similar)? HOT 5
- classes not properly 'inflating' HOT 3
- QUERY: allKeys? HOT 4
- fail to store HOT 3
- Getting last status
- iCloud Keychain r/w support
- Add "description" method
- Shared Keychain iOS 8 Simulator on Yosemite HOT 3
- Possible to set accessibility in app delegate HOT 2
- Expected a type / Unknown property attribute 'nullable' errors HOT 5
- FXKeychain failed to retrieve data for key 'token', error: -34018 HOT 13
- How to prevent keychain items from being synced with iCloud KeyChain? HOT 1
- I suppose that move info.plist out of FXKeychain folder
- Add tvOS, watchOS as supported platforms in podspec HOT 1
- Clear keychain after reinstall HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fxkeychain.