question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"found no keychain client entitlements" after upgrade

See original GitHub issue

I’m posting a new bug since this is happening after the “automate keychain sharing” changes earlier this year (#216).

I upgraded to the latest NS (3.1), firebase, firebase-plugin (4.0.3), pod, etc., and now I’m getting the error “found no keychain client entitlements”. Everything goes crazy after that.

To see if it had something to do with the latest NS, I cloned your demo app and ran it. It works. Then I ran tns update to update to NS 3.1. It still works. So, there must be something strange I’ve done (that may be unrelated to the upgrade).

To check that it’s not something weird left-over during the upgrade, I completely deleted my app and re-cloned it. Still get the same error.

Just before this started happening, I opened my platform/ios/XX.xcodeproj file in XCode (latest version, 8.3.3) and played around with it, looking at how to upload it for testing. It’s possible I did something there, but since it still happens when I tns platform clean ios and tns run ios it’s hard for me to see what it was. I am not yet an Apple Developer (waiting for some info before I join), so maybe I inadvertently changed something, but the simulator runs my app just fine – until I try to do anything with firebase.

I’m not sure where to look or what to try. Completely uninstall and reinstall XCode?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:27 (12 by maintainers)

github_iconTop GitHub Comments

5reactions
rich-jcommented, Sep 24, 2017

@davecoffin I had the same issue that you encountered where simulator builds need the entitlements file you mention but then device builds result in entitlement errors unless those entitlements are removed. I have found that when I use the following *.entitlements file, it works for both device and simulator builds:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>keychain-access-groups</key>
  <array>
    <string>$(AppIdentifierPrefix)com.Company.Product</string>
  </array>
</dict>
</plist>

Note - replace “com.Company.Product” with your bundle identifier.

This is the entitlements entry that Xcode puts in when you enable “Keychain Sharing” in the project’s capabilities. Additional details can be found in the Apple documentation Keychain Services Programming Guide - Access Groups which state that:

Xcode automatically adds the application-identifier entitlement to every app during code signing. This string is formed as the team identifier plus the bundle identifier.

Device builds work without specifying the entitlement because they are always signed and given the above entitlement. Unsigned simulator builds need to be explicitly given this entitlement.

1reaction
davecoffincommented, Sep 11, 2017

@gbonline I fixed this by adding an entitlements file to App_Resources/iOS. This will make it work on the emulator, but when you build on a device you need to remove the entitlements file. PITA, but thats the way I have to do it. Create a file called yourappname.entitlements, the contents should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.keystore.access-keychain-keys</key>
    <true/>
    <key>com.apple.keystore.device</key>
    <true/>
</dict>
</plist>
Read more comments on GitHub >

github_iconTop Results From Across the Web

-34018 A required entitlement isn'… | Apple Developer Forums
-34018 A required entitlement isn't present​​ I have created a new command line tool project, where I am trying to add a key...
Read more >
Unable to find keychain in entitlements.plist using MSAL and ...
Client.MsalClientException "The application does not have keychain access groups enabled in the Entitlements.plist.
Read more >
I'm getting a Keychain error message when signing in
To fix this issue, please try the following: Quit VPN Tracker; Open Keychain Access from Applications > Utilities; Select your login keychain; Choose...
Read more >
Mac OS X: Resetting your passwords in Keychain - UCI Health
1). Authenticate with your Keychain password if needed. Updated your password (diagram no.2); Click on the "Save Changes" when done ( ...
Read more >
KeychainAccess on CocoaPods.org
OSStatus error:[-34018] Internal error when a required entitlement isn't present, client has neither application-identifier nor keychain-access-groups ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found