Search code examples
macoskeychainevernotesskeychain

Evernote sdk for mac can't write to keychain anymore


I wrote a Mac OSX application using the Evernote Mac OSX SDK. It ran for over a year without issues, but now all of the sudden I can't get my Evernote authentication credentials stored. Every time I log in through the popup in my app I see the following in the logs:

OAuth Step 1 - Time Running is: 0.229743
OAuth Step 3 - Time Running is: 0.392775
Error saving to keychain: Error Domain=com.samsoffes.sskeychain Code=-25299 "The operation couldn’t be completed. (com.samsoffes.sskeychain error -25299.)" -25299

Has anyone got an idea what this might be? As far as I can tell their SDK hasn't changed in nearly 2 years so that can't be it.


Solution

  • I just read here: https://github.com/soffes/sskeychain/issues/11 and it seems that you already have the credentials stored.

    Error 25299 from Security framework: errSecDuplicateItem = -25299, /* The specified item already exists in the keychain. */

    I think is a sskeychain issue, I hope this helps you to investigate more.

    Edit: Go to Keychain Access and look for www.evernote.com application password. Delete it and try again in your app and see if works now.