Coder Social home page Coder Social logo

Comments (18)

sgoodwin avatar sgoodwin commented on June 3, 2024

I'm also seeing this problem. Poking around in the code doesn't seem to be revealing much.

from fxkeychain.

sgoodwin avatar sgoodwin commented on June 3, 2024

This seems to help here: https://devforums.apple.com/message/973706#973706

from fxkeychain.

nicklockwood avatar nicklockwood commented on June 3, 2024

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.

MPiccinato avatar MPiccinato commented on June 3, 2024

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.

kronik avatar kronik commented on June 3, 2024

I have same issue and I can reproduce it in 90% cases:

  1. Open app.
  2. Set value
  3. Put app into background
  4. Start timer with 10-20 sec timeout and in handler try to read the same value from keychain
  5. Lock phone
  6. Unlock phone
  7. Wait for timer hander

Environment: iOS 8.1 iPhone5S/6 with passcode

from fxkeychain.

nicklockwood avatar nicklockwood commented on June 3, 2024

@kronik what value are you using for the accessibility parameter?

from fxkeychain.

edgartronic avatar edgartronic commented on June 3, 2024

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:

  1. Open app.
  2. Set value
  3. Put the app into the BG
  4. Let device go into sleep mode.
  5. Unlock phone and bring the app into the foreground.
  6. 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.

bonebox avatar bonebox commented on June 3, 2024

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.

sarperdag avatar sarperdag commented on June 3, 2024

Any news on this? Getting this error on actual device and causing quite a big problem here...

from fxkeychain.

nicklockwood avatar nicklockwood commented on June 3, 2024

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 :-/

soffes/SAMKeychain#52

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.

sarperdag avatar sarperdag commented on June 3, 2024

This is really bad. Any idea when it started occurring? After iOS8?

from fxkeychain.

nicklockwood avatar nicklockwood commented on June 3, 2024

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.

sarperdag avatar sarperdag commented on June 3, 2024

All right thanks Nick.

Hating Apple these days...

from fxkeychain.

elviin avatar elviin commented on June 3, 2024

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.

kitgary avatar kitgary commented on June 3, 2024

Help. It always return "FXKeychain failed to retrieve data for key" error, any way to solve?

from fxkeychain.

rashidasgari avatar rashidasgari commented on June 3, 2024

Hi everyone, i just found out the this only happens when im running the app directly from xcode.

from fxkeychain.

sa19gh84 avatar sa19gh84 commented on June 3, 2024

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.

TienVu-PW avatar TienVu-PW commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.