Error while gathering & validating credentials: undefined

#1

When I try to build my app with exp build:ios, I get this error:

exp build:ios
[exp] Making sure project is set up correctly...
[exp] Your project looks good!
[exp] Checking if current build exists...

[exp] No currently active or previous builds for this project.
? 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.

\\Email and Password entered here

[exp] Validating Credentials...
[exp] Error while gathering & validating credentials
[exp] undefined
[exp] Set EXPO_DEBUG=true in your env to view the stack trace.

I have tried uninstalling then reinstalling exp. Building the app has worked many times before. I think the problem may be that I have to revoke the previous certificate on my apple dev account, but I am not sure. I am using exp version 49.0.1 in Windows Powershell. Also, this happened right after running exp build:ios -c because a different error told me to do so (I don’t have the previous error, sorry). Any help would be greatly appreciated!

0 Likes

#2

Hi, can you run it again with the environment variable EXPO_DEBUG=true?
Do you have WSL enabled and working?
And can you try:

bash.exe -c 'uname'
0 Likes

#3

I do have WSL enabled and I’m pretty sure it works because before it was giving me errors, saying that it was not enabled, and then after installing, it replaced that with the above error. bash.exe -c 'uname' returns Linux. And turning on EXPO_DEBUG=true returns this huge statement:

exp build:ios
[exp] There is a new version of exp available (49.0.3).
You are currently using exp 49.0.1
Run `npm install -g exp` to get the latest version
[exp] Making sure project is set up correctly...
[exp] Your project looks good!
[exp] Checking if current build exists...

[exp] No currently active or previous builds for this project.
[ { action: 'ruby_dir',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64',
    doesExist: false },
  { action: 'app_management',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\app_management',
    doesExist: true },
  { action: 'fetch_cert',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\fetch_cert',
    doesExist: true },
  { action: 'fetch_new_provisioning_profile',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\fetch_new_provisioning_profile',
    doesExist: true },
  { action: 'fetch_push_cert',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\fetch_push_cert',
    doesExist: true },
  { action: 'validate_apple_certs',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\validate_apple_certs',
    doesExist: true },
  { action: 'validate_apple_credentials',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\validate_apple_credentials',
    doesExist: true },
  { action: 'validate_apple_push_certs',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\validate_apple_push_certs',
    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? email
? Password? password
[exp] Validating Credentials...
[exp] Error while gathering & validating credentials
[exp] {"result":"failure","reason":"Could not understand JSON reply from Ruby based local auth scripts","rawDump":""}
[exp] undefined
[exp] undefined

I noticed that the only things missing are'ruby_dir' and 'app-management'. Is it a bad thing that there is nothing in the rawDump? If anyone knows why this is happening, and knew how to fix it, I would really appreciate it if you could help me out. Thanks so much for your help!

0 Likes

#4

Also, I’m not sure if this is would affect anything, but I am in the Windows Insider Program and am running with the Insider Preview build 17074.1002. If anyone knows why this is happening, and knew how to fix it, I would really appreciate it if you could help me out.

0 Likes

#5

Tried to build it again today with -c. Now, the app_management shows up, but ruby_dir is still false. Is that why it could not understand JSON reply from Ruby based local auth scripts, and why there is nothing in the raw_dump? If anyone knows why this is happening, and knows how to fix it, I would really appreciate it if you could help me out. Thanks so much for your help!

0 Likes

#6

@verseboxceo

Upgrade to the latest version and run with EXPO_DEBUG=true as environment variable. You’ll get a printout of a command that exp uses that you can copy paste and run directly if something messes up.

0 Likes

#7

Is the command [exp] Running: bash.exe -c PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /mnt/c/Users/user/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.5-linux-x86_64/validate_apple_credentials? I ran that, and it didn’t seem to do anything, and when I tried building the app after running that, it gave me the same errors (also tried running the command in Administrator).

Also, I checked with File Explorer and there is no ruby_dir folder at all. After looking at the errors, that seems like it may be a problem, but I’m defintely no expert.

0 Likes

#8

Do:

bash.exe -c 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /mnt/c/Users/user/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.5-linux-x86_64/validate_apple_credentials'

Also, did you change Users\\jaked\ to Users/user in your message?

What did this do? Can you let it run?

Do you have a file at user/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.5-linux-x86_64/validate_apple_credentials?

(There is no need to use commands as admin blindly…)

0 Likes

#9

The reason it wasn’t working before was becuase it was not a string. I should have noticed that! Anyways, running the command you mentioned returned this:

-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
You can also pass the password using the `FASTLANE_PASSWORD` environment variable
More information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
-------------------------------------------------------------------------------------
Username: personal email
-------------------------------------------------------------------------------------
Please provide your Apple Developer Program account credentials
The login information you enter will be stored in your macOS Keychain
You can also pass the password using the `FASTLANE_PASSWORD` environment variable
More information about it on GitHub: https://github.com/fastlane/fastlane/tree/master/credentials_manager
-------------------------------------------------------------------------------------
Password (for personal email): *******
{"result":"success","teams":[{"status":"active","teamId":"FE6WECBW79","type":"Individual","extendedTeamAttributes":{},"teamAgent":{"personId":104639623,"firstName":"name","lastName":"Hensley","email":"personal email","developerStatus":"active","teamMemberId":"YF3J6D9LJV"},"memberships":[{"membershipId":"9HJ8EY24R5","membershipProductId":"ad19","status":"active","inIosDeviceResetWindow":false,"inMacDeviceResetWindow":null,"inRenewalWindow":false,"dateStart":"12/14/17 15:40","dateExpire":"12/15/18 07:59","platform":"safari","name":"Apple Developer Program"}],"currentTeamMember":{"personId":104639623,"firstName":"personal","lastName":"Hensley","email":"personal email","developerStatus":"active","privileges":{},"roles":["AGENT","TEAM_ADMIN","MAC_PROGRAM_TEAM_ADMIN"],"teamMemberId":"YF3J6D9LJV"},"dateCreated":"12/14/17 15:40","name":"name Hensley"}]}

(I can message you the one with the actual info if that is needed. Wasn’t sure if posting real name and email on internet was a good idea. That is also why I changed jaked to user. Sorry!)

I do have the file at /AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.5-linux-x86_64/validate_apple_credentials.

Didn’t know to not run it as an Admin. I am not very experienced. Sorry about that!

0 Likes

#10

@verseboxceo (No worries, just better to not give programs admin access if they don’t need it. )

Can you try now just plain exp build:ios ?

0 Likes

#11

exp build:ios returns this:

exp build:ios
[exp] Making sure project is set up correctly...
[exp] Your project looks good!
[exp] Checking if current build exists...

[exp] No currently active or previous builds for this project.
[ { action: 'ruby_dir',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64',
    doesExist: false },
  { action: 'app_management',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\app_management',
    doesExist: true },
  { action: 'fetch_cert',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\fetch_cert',
    doesExist: true },
  { action: 'fetch_new_provisioning_profile',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\fetch_new_provisioning_profile',
    doesExist: true },
  { action: 'fetch_push_cert',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\fetch_push_cert',
    doesExist: true },
  { action: 'validate_apple_certs',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\validate_apple_certs',
    doesExist: true },
  { action: 'validate_apple_credentials',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\validate_apple_credentials',
    doesExist: true },
  { action: 'validate_apple_push_certs',
    path: 'C:\\Users\\jaked\\AppData\\Roaming\\npm\\node_modules\\exp\\node_modules\\@expo\\traveling-fastlane-linux\\traveling-fastlane-1.2.5-linux-x86_64\\validate_apple_push_certs',
    doesExist: true } ]
[exp] If you get errors about

'Maximum number of certificates generated' or 'duplicate profiles'

then consider going to developer.apple.com and revoking those certs or
the existing provisioning profile for this app
? 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? personal email
? Password? ********
[exp] Using {"appleId":"personal email","password":"password"} as Apple Credentials
[exp] Validating Credentials...
[exp] Running: bash.exe -c PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /mnt/c/Users/jaked/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.5-linux-x86_64/validate_apple_credentials personal email password
[exp] Error while gathering & validating credentials
[exp] {"result":"failure","reason":"Could not understand JSON reply from Ruby based local auth scripts","rawDump":""}
[exp] undefined
[exp] undefined

I really have no idea what could be wrong. Thank you so much for your awesome help!

0 Likes

#12

yea, I’m not clear yet either but we’re getting there:
Can you run:

bash.exe -c 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /mnt/c/Users/jaked/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.5-linux-x86_64/validate_apple_credentials YOUR_APPLE_ID YOUR_APPLE_PASSWORD'
0 Likes

#13

When I run that, it does not log anything. It just waits for about one second and then starts a new line with a new C:\Users\jaked\desktop\versebox>.

0 Likes

#14

That is odd.

And you are sure that

C:/Users/jaked/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.5-linux-x86_64/validate_apple_credentials

Exists? Can you post the contents of that file here?

0 Likes

#15

The contents of the file are:

#!/bin/bash

set -eu

# Figure out where this script is located.
SELFDIR="`dirname \"$0\"`"
SELFDIR="`cd \"$SELFDIR\" && pwd`"

export BUNDLE_GEMFILE="$SELFDIR/lib/vendor/Gemfile"
unset BUNDLE_IGNORE_CONFIG

export FASTLANE_DISABLE_COLORS=1
export FASTLANE_SKIP_UPDATE_CHECK=1
export FASTLANE_DISABLE_ANIMATION=1

script="$SELFDIR/lib/app/validate_apple_credentials.rb"

lib_loc="$SELFDIR/lib/app"

exec "$SELFDIR/lib/ruby/bin/ruby" -W0 -I"$lib_loc" -rpreload "$script" "$@"

Since it does exist, I wonder why that bash command won’t work?

0 Likes

#16

Well the script seems to be running.

Try running it again:

this command:

bash.exe -c 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /mnt/c/Users/jaked/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.5-linux-x86_64/validate_apple_credentials YOUR_APPLE_ID YOUR_APPLE_PASSWORD'

and then:

bash.exe -c 'echo $?`

also a bit more advanced but maybe post what output of strace usage is,

bash.exe -c 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin strace /mnt/c/Users/jaked/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.5-linux-x86_64/validate_apple_credentials YOUR_APPLE_ID YOUR_APPLE_PASSWORD'

(Might need to install strace on WSL layer with apt install strace)

0 Likes

#17

When I run the bash.exe -c 'echo $?', it returns: 0. Dont know what that means but I think it worked.

0 Likes

#18

Did you do that right after

bash.exe -c 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /mnt/c/Users/jaked/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.5-linux-x86_64/validate_apple_credentials YOUR_APPLE_ID YOUR_APPLE_PASSWORD'

?

It must be immediately after that command. It shows if the previous command was successful.

can you also try the strace based example?

0 Likes

#19

Here is the exact logs that I am getting when running both commands:

bash.exe -c 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /mnt/
c/Users/jaked/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane-1.2.5-
linux-x86_64/validate_apple_credentials email Password'
PS C:\Users\jaked\desktop\versebox> bash.exe -c 'echo $?'
0
PS C:\Users\jaked\desktop\versebox> bash.exe -c 'PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin strac
e /mnt/c/Users/jaked/AppData/Roaming/npm/node_modules/exp/node_modules/@expo/traveling-fastlane-linux/traveling-fastlane
-1.2.5-linux-x86_64/validate_apple_credentials email Password'
PS C:\Users\jaked\desktop\versebox> bash.exe -c 'echo $?'
0
PS C:\Users\jaked\desktop\versebox>

I did go into Ubuntu and run apt install strace before running the strace example. It said that it was already installed, so that was convinient. I do not know if it was on the WSL layer, I just opened Ubuntu and ran it in there at root@DESKTOP-A3E4UPR:~#.

(I’m running the commands in Powershell by the way. Is that okay or is this supposed to be run in something else like Ubuntu or Command Prompt?)

0 Likes

#20

Powershell is correct. Can you upgrade exp and show the latest error when $env:EXPO_DEBUG = 'true', just so we are on the same page (it has been updated recently)

(Also your strace is mispelled in the second command).

Also, is it possible for you to do this on a regular windows 10 machine, not with the Insider Program or the insider build? You don’t need to be on the insider program anymore to have WSL work.

0 Likes