Skip to content
This repository has been archived by the owner on Aug 24, 2019. It is now read-only.

error : Error Domain=com.samsoffes.sskeychain Code=-34018 "errSecDefault" UserInfo=0x174e60a00 {NSLocalizedDescription=errSecDefault} #105

Closed
wanyakun opened this issue Jul 8, 2015 · 13 comments
Labels

Comments

@wanyakun
Copy link

wanyakun commented Jul 8, 2015

Hi,

When i use the method follow:

+ (BOOL)setPassword:(NSString *)password forService:(NSString *)serviceName account:(NSString *)account error:(NSError *__autoreleasing *)error

it appear error:

error : Error Domain=com.samsoffes.sskeychain Code=-34018 "errSecDefault" UserInfo=0x174e60a00 {NSLocalizedDescription=errSecDefault}
@openboy2012
Copy link

this issue appeared when your app received memory warnning.

@ghazel
Copy link

ghazel commented Sep 23, 2015

I get the same error:

Error Domain=com.samsoffes.sskeychain Code=-34018 "errSecDefault" UserInfo=0x170862d80 {NSLocalizedDescription=errSecDefault}

@drewmclean
Copy link

I also get this error. And yes I also got a memory warning recently

@LeandroHub
Copy link

Hi! Any solution on this?

@LeandroHub
Copy link

I recently got this error but no memory warning. I think there was a problem with my app in my device and all the tests I had been doing. So I put this code inside application:didFinishLaunchingWithOptions method:

NSArray *accounts = [SSKeychain allAccounts];
    for (int i = 0; i < accounts.count ; i++) {
        [SSKeychain deletePasswordForService:Your_Service_Name account:[accounts objectAtIndex:i]];
    }

After launching the application all accounts associated with the specific service were deleted. Then I deleted the code and started using the app normally. No problems so far.

Hope this helps somebody.
Cheers!

@ONLYWeizf
Copy link

hello @wanyakun You solve this problem?

@XabierGoros
Copy link

Hello,

I came across this issue too and I don't know whether it's a coincidence or not but I got this error in two different iPhone 5s in a TestFlight environment app (not debugging or XCTests).

I've tried to research a bit but none of the workarounds have worked for me.

https://forums.developer.apple.com/thread/4743
http://stackoverflow.com/questions/22082996/testing-the-keychain-osstatus-error-34018

Any movement on that? Thanks.

@soffes
Copy link
Owner

soffes commented Mar 11, 2016

I haven't been able to reproduce this. Any ideas?

@leizh007
Copy link

Still occurs in Xcode8 beta3, Swift 3.0,

@Gois
Copy link

Gois commented Aug 8, 2016

@leizh007 I also got the same error on XCode 8 beta 4, but I solved it by enabling Keychain Sharing.

@mitisBlack
Copy link

Got this recently, it's an Apple problem (see forum link above). They mention things that increase the likelihood of this happening:

  • mem warning
  • debugger attached
  • access before app is visible
  • missing entitlements (this causes the error always)

Found out that also making many requests in a short amount of time greatly enhances the reproduction rate. Caching the data in mem for awhile to avoid the burst fixed it for me.

@YaoSu
Copy link

YaoSu commented Sep 20, 2016

@Gois Thank you very much!!! This works for me😊

@soffes
Copy link
Owner

soffes commented Sep 20, 2016

Glad you got it. Thanks for the write up @mitisBlack!

@soffes soffes closed this as completed Sep 20, 2016
Repository owner locked and limited conversation to collaborators Sep 20, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests