expo build:android fails with `Cannot read property 'errors' of undefined`

After running expo build:android and uploading own keystore receive error Cannot read property 'errors' of undefined. Could anyone help me with that?

Expo diagnostics result:

Expo CLI 3.15.5 environment info:
System:
OS: macOS High Sierra 10.13.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
Yarn: 1.15.2 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.15.3/bin/npm
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
expo: ~36.0.0 => 36.0.2
react: ~16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz => 0.61.4
react-navigation: ^4.0.10 => 4.0.10
npmGlobalPackages:
expo-cli: 3.15.5

I have the same issue.

Expo diagnostics:

Expo CLI 3.15.5 environment info:
System:
OS: macOS Mojave 10.14.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.16.1 - /usr/local/bin/node
Yarn: 1.21.1 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
IDEs:
Xcode: 11.3/11C29 - /usr/bin/xcodebuild
npmPackages:
expo: ^36.0.0 => 36.0.2
react: 16.8.3 => 16.8.3
react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4
react-navigation: ^3.11.0 => 3.11.0
npmGlobalPackages:
expo-cli: 3.15.5

Yes. I have the same issue too.

Console output
user@iMac bsgold-app % EXPO_DEBUG=true expo build:android
Checking if there is a build in progress...


? Would you like to upload a keystore or have us generate one for you?
If you don't know what this means, let us handle it! :)
 true
? Path to keystore: /Users/user/Downloads/file.jks
? Keystore Alias: ****
? Keystore Password: [hidden]
? Key Password: [hidden]

Cannot read property 'errors' of undefined
TypeError: Cannot read property 'errors' of undefined
    at Object.updateCredentialsForPlatform (/@expo/xdl@57.6.4/src/credentials/Credentials.ts:135:21)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at AndroidBuilder.collectAndValidateCredentials (/expo-cli@3.15.5/src/commands/build/AndroidBuilder.ts:204:9)
    at AndroidBuilder.run (/expo-cli@3.15.5/src/commands/build/AndroidBuilder.ts:30:5)
    at AndroidBuilder.command (/expo-cli@3.15.5/src/commands/build/BaseBuilder.ts:29:7)
    at Command.<anonymous> (/expo-cli@3.15.5/src/exp.ts:85:7)
expo diagnostics output
  Expo CLI 3.15.5 environment info:
    System:
      OS: macOS 10.15.2
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 13.7.0 - ~/.nvm/versions/node/v13.7.0/bin/node
      npm: 6.13.7 - ~/.nvm/versions/node/v13.7.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.5 AI-191.8026.42.35.6010548
      Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^36.0.0 => 36.0.2
      react: 16.9.0 => 16.9.0
      react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4
      react-navigation: ^3.11.1 => 3.13.0
    npmGlobalPackages:
      expo-cli: 3.15.5
npm install -g expo-cli@3.15.3

Apparently, a bug in the new version

1 Like

Same issue :frowning:

Expo diagnostics:

  Expo CLI 3.15.5 environment info:
    System:
      OS: macOS Mojave 10.14.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 10.15.3 - ~/.nvm/versions/node/v10.15.3/bin/node
      Yarn: 1.21.1 - /usr/local/bin/yarn
      npm: 6.14.3 - ~/.nvm/versions/node/v10.15.3/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.5 AI-191.8026.42.35.6010548
      Xcode: 11.3/11C29 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^36.0.0 => 36.0.2
      react: 16.9.0 => 16.9.0
      react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4
      react-navigation: ^4.3.3 => 4.3.3
    npmGlobalPackages:
      expo-cli: 3.15.5

Console output:

Cannot read property 'errors' of undefined
TypeError: Cannot read property 'errors' of undefined
    at Object.updateCredentialsForPlatform (/@expo/xdl@57.6.4/src/credentials/Credentials.ts:135:21)
    at process._tickCallback (internal/process/next_tick.js:68:7)
make: *** [build-android] Error 1

Edit: Going back with npm install -g expo-cli@3.15.4 fix the problem for me

1 Like

Same issue with version 3.17.11 going back to 3.15.4 as @rigter suggests fixes it
my diagnostics

 expo diagnostics

  Expo CLI 3.17.11 environment info:
    System:
      OS: macOS Mojave 10.14.6
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 12.10.0 - /usr/local/bin/node
      Yarn: 1.17.3 - /usr/local/bin/yarn
      npm: 6.14.4 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    IDEs:
      Android Studio: 3.5 AI-191.8026.42.35.5977832
      Xcode: 11.2/11B52 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^36.0.0 => 36.0.2 
      react: ^16.9.0 => 16.9.0 
      react-native: https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz => 0.61.4 
      react-navigation: ^4.1.1 => 4.1.1 
    npmGlobalPackages:
      expo-cli: 3.17.11

you can work around this with the latest expo-cli version by using EXPO_LEGACY_API=true expo build:android - a fix is in progress

2 Likes

Tried EXPO_LEGACY_API=true… but didn’t work. I had to downgrade to 3.15.4 as well to get expo build:android -c working

Looking into this now.

Delete this file

\.expo\packager-info.json

and run again

expo build:android

This should be fixed by upgrading to the most recent expo-cli or prepending ‘EXPO_LEGACY_API=true’ to you command. Thanks for letting us know!