Error while gathering & validating credentials

Error when running exp build:ios -c
I am using exp 47.3.7.
I have tried deleting provisioning profile and running it again.


[exp] Validating Credentials...
[exp] Error while gathering & validating credentials
[exp] {"result":"failure","reason":"Could not understand JSON reply from Ruby local auth scripts","rawDump":"/usr/local/lib/node_modules/exp/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.2.1-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/definition.rb:252:in `rescue in lock': There was an error while trying to write to Gemfile.lock. It is likely that  (Bundler::InstallError)\nyou need to allow write permissions for the file at path: \n/usr/local/lib/node_modules/exp/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.2.1-osx/lib/vendor/Gemfile.lock\n\tfrom /usr/local/lib/node_modules/exp/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.2.1-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/definition.rb:237:in `lock'\n\tfrom /usr/local/lib/node_modules/exp/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.2.1-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/environment.rb:34:in `lock'\n\tfrom /usr/local/lib/node_modules/exp/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.2.1-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/runtime.rb:44:in `setup'\n\tfrom /usr/local/lib/node_modules/exp/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.2.1-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler.rb:122:in `setup'\n\tfrom /usr/local/lib/node_modules/exp/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.2.1-osx/lib/ruby/lib/ruby/gems/2.2.0/gems/bundler-1.9.9/lib/bundler/setup.rb:18:in `<top (required)>'\n\tfrom /usr/local/lib/node_modules/exp/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.2.1-osx/lib/ruby/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'\n\tfrom /usr/local/lib/node_modules/exp/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.2.1-osx/lib/ruby/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'\n\tfrom /usr/local/lib/node_modules/exp/node_modules/@expo/traveling-fastlane-darwin/traveling-fastlane-1.2.1-osx/lib/ruby/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'\n"}
[exp] undefined
[exp] undefined


Hi, are your user permissions for your global node modules not the same as your user account?

You can also get exp via yarn global add exp and try using that installed version.

It was permissions! I used sudo exp build:ios -c instead. Thank you!

1 Like

running into the same issue with windows 7, trying to build ios. it used to work few days ago with previous exp release.

Tried uninstall and install exp with -g, running the build with -c flag

both “exp start” terminal and “exp build” are in administrator mode.

please help !!

exp: 47.3.17

C:\MyApp>exp build:ios -c
[exp] Checking if current build exists…

[exp] No currently active or previous builds for this project.
[exp] Removed existing credentials
[ { action: ‘ruby_dir’,
path: ‘C:\Users\Oren\AppData\Roaming\npm\node_modules\exp\node_modules\@expo\traveling-fastlane-linux\traveling-fastlane-1.2.3-linux-x86_64’
doesExist: false },
{ action: ‘app_management’,
path: ‘C:\Users\Oren\AppData\Roaming\npm\node_modules\exp\node_modules\@expo\traveling-fastlane-linux\traveling-fastlane-1.2.3-linux-x86_64
doesExist: true },
{ action: ‘fetch_cert’,
path: ‘C:\Users\Oren\AppData\Roaming\npm\node_modules\exp\node_modules\@expo\traveling-fastlane-linux\traveling-fastlane-1.2.3-linux-x86_64
doesExist: true },
{ action: ‘fetch_new_provisioning_profile’,
path: ‘C:\Users\Oren\AppData\Roaming\npm\node_modules\exp\node_modules\@expo\traveling-fastlane-linux\traveling-fastlane-1.2.3-linux-x86_64
doesExist: true },
{ action: ‘fetch_push_cert’,
path: ‘C:\Users\Oren\AppData\Roaming\npm\node_modules\exp\node_modules\@expo\traveling-fastlane-linux\traveling-fastlane-1.2.3-linux-x86_64
doesExist: true },
{ action: ‘validate_apple_certs’,
path: ‘C:\Users\Oren\AppData\Roaming\npm\node_modules\exp\node_modules\@expo\traveling-fastlane-linux\traveling-fastlane-1.2.3-linux-x86_64
doesExist: true },
{ action: ‘validate_apple_credentials’,
path: ‘C:\Users\Oren\AppData\Roaming\npm\node_modules\exp\node_modules\@expo\traveling-fastlane-linux\traveling-fastlane-1.2.3-linux-x86_64
doesExist: true },
{ action: ‘validate_apple_push_certs’,
path: ‘C:\Users\Oren\AppData\Roaming\npm\node_modules\exp\node_modules\@expo\traveling-fastlane-linux\traveling-fastlane-1.2.3-linux-x86_64
doesExist: true } ]
? How would you like to upload your credentials?
Expo handles all credentials, you can still provide overrides

We need your Apple ID/password to manage certificates and
provisioning profiles from your Apple Developer account.

Note: Expo does not keep your Apple ID or your Apple password.

? What’s your Apple ID?
? Password? *************
[exp] Validating Credentials…
[exp] Error while gathering & validating credentials
[exp] {“result”:“failure”,“reason”:“Could not understand JSON reply from Ruby local auth scripts”,“rawDump”:“C:\Windows\system32\bash.exe: /mnt/c/Users/
Oren/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.3-linux-x86_64/validate_apple_credentials: No
such file or directory\r\n”}
[exp] undefined
[exp] undefined

one more thing might be related, before this I got different error, which also gave me some hard moments, I fixed it by downloading bash package and copying bash.exe to windows/system32

Does not seem like WSL enabled on this machine. In an admin powershell, please run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

[exp] Error while gathering & validating credentials
[exp] {“errno”:-4058,“code”:“ENOENT”,“syscall”:“access”,“path”:“C:\Windows\system32\bash.exe”}
[exp] ENOENT: no such file or directory, access ‘C:\Windows\system32\bash.exe’
[exp] Error: ENOENT: no such file or directory, access ‘C:\Windows\system32\bash.exe’

copying some random bash to your file system is not the right way to fix this.

Remove that bash.exe, install Ubuntu from the Windows App store, open it at least once, and then run the command that was given to you, in an admin powershell:

 Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux


I am running on windows 7, Ubuntu from windows App Store is for windows 10.
What else can I try?

and the following also does not sound like good news :frowning:


Earlier today I created a build for iOS with success. I then upgraded exp to 47.3.17 (I think I had 44 something before). After I did that, I was not able to build the app for iOS anymore. This is the exception I got:

[exp] Error while gathering & validating credentials [exp] Reason:You already have a current iOS Distribution certificate or a pending certificate request. Maximum number of certificates generated, raw:{"responseId":"a23d5c30-5869-43e1-9986-c03290c22dd4","resultCode":7460,"resultString":"Maximum number of certificates generated","userString":"You already have a current iOS Distribution certificate or a pending certificate request.","creationTimestamp":"2018-01-09T00:07:26Z","protocolVersion":"QH65B2","userLocale":"en_US","requestUrl":"","httpCode":200}

Has anyone had this problem before?

Windows 7 has been deprecated for 3 years now and the exp client now requires WSL to work as we have changed the code to now do all authentication on the client machine (your machine, not our servers).

This means you should go to your apple developer account and remove a distribution cert. Did you run -c at some point or stop exp build:ios earlier?

Ok, I will check when can I upgrade my os.

Meanwhile thanks for the fast response edgar.

Hi Edgar,

So, I moved to Mac, and managed to make some progress.
This is what I have doen so far:

  • Downloaded distribution and push certificates from Apple Developer
  • Export using Keychain to P12 with password.
  • Executed exp build:ios and selected “Expo handles all credentials, you can still provide overrides”

Checking for build:status - I got “iOS: There was an error with this build.”

And in the logs on Expo, I’m seeing the below:

Executing command: fastlane gym -n ee225b04-fc1c-443f-98b1-c643a8e929e4-unsigned.ipa --workspace /usr/local/turtle-agent/ios/Exponent.xcworkspace --scheme Exponent --archive_path /tmp/turtle/ee225b04-fc1c-443f-98b1-c643a8e929e4/ee225b04-fc1c-443f-98b1-c643a8e929e4.xcarchive --skip_build_archive true -i F6ABD23BF69AB39A917C72CC233901E9759B2D5E --export_options /tmp/turtle/ee225b04-fc1c-443f-98b1-c643a8e929e4/provisioning-ee225b04-fc1c-443f-98b1-c643a8e929e4/export-options.plist --export_method app-store --export_xcargs OTHER_CODE_SIGN_FLAGS="--keychain /tmp/turtle-agent/2f9ef4aa-f540-11e7-b275-0050568e6f20.keychain" -o /tmp/turtle/ee225b04-fc1c-443f-98b1-c643a8e929e4/ee225b04-fc1c-443f-98b1-c643a8e929e4-build --verbose
Unable to generate IPA.
unable to build and sign IPA
Executing command: security delete-keychain /tmp/turtle-agent/2f9ef4aa-f540-11e7-b275-0050568e6f20.keychain
Restoring keychain list...
Executing command: security list-keychains -s /private/tmp/turtle-agent/09bd1c3a-efbb-11e7-a706-0050568e6f20.keychain
Restored keychain list.

Here is a link to the log:

Will very much appreciate your help over here.

Thanks for your patience!

Revoking that cert ought to do it.

Revoking the distribution cert from apple developer account fixed it, thanks.

1 Like

Any chance you can assist with my follow up question above?

your teamID is missing. Do the same steps again but do exp build:ios -c.

Hi Edgar,

Thanks for helping here, we executed exp build:ios -c but build is still failing with the same log error.

Link to build:


The raw error we are getting is:

¸ "Error Domain=IDECodesignResolverErrorDomain Code=1 \"No signing certificate \"iOS Distribution\" found\" UserInfo=
{IDEProvisioningError_UserInfoKey_IDEProvisioningErrorSpecifier=iOS Distribution, 
NSLocalizedDescription=No signing certificate \"iOS Distribution\" found, 
NSLocalizedRecoverySuggestion=No \"iOS Distribution\" signing certificate matching team ID \"59YP5RE7KR\" with a private key was found., 
0x7f8ca455f550: teamID: 59YP5RE7KR, teamName: (null)>,, 
IDEProvisioningError_UserInfoKey_IDEProvisioningErrorAction=5}" INFO [2018-01-10 01:37:16.78]: ▸ )} INFO [2018-01-10 01:37:16.78]: ▸ error: exportArchive: No signing certificate "iOS Distribution" found INFO [2018-01-10 01:37:16.78]: ▸ Error Domain=IDECodesignResolverErrorDomain Code=1 "No signing certificate "iOS Distribution" found" UserInfo={IDEProvisioningError_UserInfoKey_IDEProvisioningErrorSpecifier=iOS Distribution, NSLocalizedDescription=No signing certificate "iOS Distribution" found, 
NSLocalizedRecoverySuggestion=No "iOS Distribution" signing certificate matching team ID "59YP5RE7KR" with a private key was found., 

Which to me suggests that the wrong teamID is being used with this particular certificate.

You are uploading your own? Can you let exp create everything?

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