Intermittent -34018 errors from users in the field

This thread is the place to post if:

  • you’re encountering -34018 errors being returned by the Security framework

  • the problem is intermittent, that is, it shows up very occasionally on user devices in the field but is otherwise hard to reproduce

IMPORTANT Error -34018 has other causes. Before posting here, make sure to read the Error -34018 errSecMissingEntitlement pinned post.

Apple has been tracking an issue where Security framework APIs can return -34018 on some user devices in the field. The typical observed behaviour is:

  • After running successfully for a while, your app starts receiving -34018 from various Security APIs, most commonly the keychain APIs.

  • Those errors persist until the app is terminated and relaunched (or the device is restarted).

  • The problem shows up intermittently on a small percentage of user devices in the field.

  • The problem only affects iOS-based platforms (iOS, watchOS, tvOS).

Apple has been working hard to investigate this issue and believes we have fixed some of its root causes. However, it is a complex problem and it’s possible that there could be others. If you’re still seeing this problem on the latest iOS release, feel free to post your experiences to this thread.

Note This thread is the continuation of an older thread here on DevForums; I’ve locked that old thread for reasons explain in the last post on that thread.

That thread was itself a continuation of an even older thread on the old DevForums, which became read-only when the old DevForums was decommissioned.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Hi there,

I'm keeping an iPhone SE 1st gen on a non-recent i0S version (iOS 15.2 currently) to perform some quality tests with my app and got a sporadic occurence of the -34018 error.

My app uses Firebase Auth with a shared access group. The access group is shared with both the app's Intent extension, and another iOS app (which itself also includes a widget extension and a WatchOS app extension accessing the same group for user authentication).

I got the sporadic -34018 error (reported through the Firebase Auth logs) in the following context:

  • iPhone SE physically connected to my Macbook
  • XCode 14.1 RC building the app and running it on the iPhone SE
  • iPhone SE was busy fetching debug symbols while XCode was ready to request launch of the app
  • app finally got launched after symbols fetch was completed

This is a sporadic occurence and I have no authentication / shared access group issue otherwise. I however do not have the proper analytics capacities to know if such error sometimes happen on the field.

Adding that before performing this Build+Run action, I manually launched a previous version on my app on the device and got no keychain issue.

good

helo

Intermittent -34018 errors from users in the field
 
 
Q