IOS build: unable to create keychain

I’m trying to run expo build:ios, but I getting the error:

creating keychain...
creating new keychain...
unable to create keychain
fastlane exited with non-zero code: 1
Error: fastlane exited with non-zero code: 1
    at ChildProcess.completionListener (/usr/local/turtle-js/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:52:23)
    at Object.onceWrapper (events.js:482:26)
    at ChildProcess.emit (events.js:375:28)
    at ChildProcess.emit (domain.js:470:12)
    at maybeClose (internal/child_process.js:1055:16)
    at Socket.<anonymous> (internal/child_process.js:441:11)
    at Socket.emit (events.js:375:28)
    at Socket.emit (domain.js:470:12)
    at Pipe.<anonymous> (net.js:675:12)
    at spawnAsync (/usr/local/turtle-js/node_modules/@expo/xdl/node_modules/@expo/spawn-async/build/spawnAsync.js:17:21)
    at spawnAsyncThrowError (/usr/local/turtle-js/node_modules/@expo/xdl/build/detach/ExponentTools.js:201:45)
    at runFastlane (/usr/local/turtle-js/node_modules/@expo/xdl/build/detach/IosKeychain.js:189:51)
    at Object.createKeychain (/usr/local/turtle-js/node_modules/@expo/xdl/build/detach/IosKeychain.js:75:9)
    at Object.create (/usr/local/turtle-js/build/builders/utils/ios/keychain.js:33:54)
    at Object.buildArchive [as default] (/usr/local/turtle-js/build/builders/ios/archive.js:35:39)
    at Object.iosBuilder [as ios] (/usr/local/turtle-js/build/builders/ios/index.js:30:36)
    at async build (/usr/local/turtle-js/build/jobManager.js:181:33)
    at async processJob (/usr/local/turtle-js/build/jobManager.js:118:32)
    at async Object.doJob (/usr/local/turtle-js/build/jobManager.js:49:5)
    at async main (/usr/local/turtle-js/build/server.js:66:13)

Any idea?

Hi @gisele

Unfortunately there’s not much info in those logs for me to know what happened.

If you go to the credentials section for the project on, do you see anything suspicious there?

Also, it might be a good time to try switching to EAS Build, since expo build:ios is deprecated.

Thanks for the feedback!!!

Apparently everything is ok with the Build Credentials (Distribution Certificate and Provisioning Profile). Both expire in 26 days.

I’m going to upgrade to the EAS build, but I need to generate this build to fix a bug.

What information might be helpful in solving the problem?

If you have previously submitted this app to the App Store then I am pretty sure it should not be generating credentials again. Especially if they have not yet expired. :thinking:

In a previous build this was the log of the step where the error happens:

creating keychain...
creating new keychain...
Executing command: security show-keychain-info /private/tmp/xdl/XXXXXXXXXXXXXX.keychain
Keychain "/private/tmp/xdl/XXXXXXXXXXXXXXX.keychain" timeout=360000s
created new keychain
done creating keychain

So this step ran smoothly with those same credentials. The last build that worked was 19 hours ago.

It was probably some instability. After new build attempts, it worked!

1 Like

Oh, I see. It was creating a keychain, presumably using those credentials to do so. Not creating new credentials.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.