expo build:android - Uploading keystore: unknown error occurred

I’ve been trying to upload my keystore for my Android build but always results in an “unknown error occurred”. I’ve tried expo-cli version 4.7.2, 4.7.1, 4.6.0, 4.5.2 to no avail.

This was working last week, so I figured downgrading versions would have fixed the issue but no such luck. Please advise.

DIAGNOSTIC

  Expo CLI 4.5.2 environment info:
    System:
      OS: Linux 4.14 Debian GNU/Linux 10 (buster) 10 (buster)
      Shell: 5.0.3 - /bin/bash
    Binaries:
      Node: 12.21.0 - /usr/local/bin/node
      Yarn: 1.22.5 - /usr/local/bin/yarn
      npm: 6.14.11 - /usr/local/bin/npm
    npmPackages:
      expo: ~40.0.0 => 40.0.1 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz => 0.63.2 
      react-native-web: ^0.15.6 => 0.15.6 
    npmGlobalPackages:
      expo-cli: 4.5.2
    Expo Workflow: managed

`COMMAND OUTPUT

✔ **Choose the build type you would like:** › app-bundle

Checking if there is a build in progress...

Accessing credentials on behalf of myTeam in project myProject

✔ **Would you like to upload a Keystore or have us generate one for you?**

**If you don't know what this means, let us generate it! :)** › I want to upload my own file

WARNING! In this mode, we won't be able to make sure that your credentials are valid.

Please double check that you're uploading valid files for your app otherwise you may encounter strange errors!

When building for IOS make sure you've created your App ID on the Apple Developer Portal, that your App ID

is in app.json as `bundleIdentifier`, and that the provisioning profile you

upload matches that Team ID and App ID.

✔ **Path to the Keystore file.** … ./path/to/keystore

✔ **Keystore password** … ********

✔ **Key alias** … myalias

✔ **Key password** … *******************

Couldn't validate the provided Android keystore because the 'keytool' command is not available. Make sure that you have a Java Development Kit installed. See https://openjdk.java.net (​https://openjdk.java.net​) to install OpenJDK.

An unknown error occurred.

From your error logs it says the 'keytool' command is not available. Make sure that you have a Java Development Kit installed. See https://openjdk.java.net (​https://openjdk.java.net​) to install OpenJDK. In order to generate an Android keystore, you will need the keytool binary, which will come with the Java Development Kit installation. You can go to install it at https://openjdk.java.net

I’ve received this “warning” before but was able to sign my build successfully as of last week. This only started happening this morning when trying to upload a new signing key for my build.

So after installing the OpenJDK, receiving same error but without the OpenJDK warning message.

✔ **Choose the build type you would like:** › app-bundle

Checking if there is a build in progress...

Accessing credentials on behalf of myTeam in project myProject

✔ **Would you like to upload a Keystore or have us generate one for you?**

**If you don't know what this means, let us generate it! :)** › I want to upload my own file

WARNING! In this mode, we won't be able to make sure that your credentials are valid.

Please double check that you're uploading valid files for your app otherwise you may encounter strange errors!

When building for IOS make sure you've created your App ID on the Apple Developer Portal, that your App ID

is in app.json as `bundleIdentifier`, and that the provisioning profile you

upload matches that Team ID and App ID.

✔ **Path to the Keystore file.** … ./pathtokeystore

✔ **Keystore password** … ********

✔ **Key alias** … myAlias

✔ **Key password** … ********************

An unknown error occurred.

If it helps I’m now running this using 4.7.2 version of expo-cli

That looks like an error from our servers, most likely from parsing your keystore. For a quick sanity check, can you try the following:
keytool -list -v -keystore [path-to-your-keystore] and input the keystore password ? The output of the command should list the alias of your keystore.

Please check that the passwords and the alias matches what you’ve been inputting. You can also see what you’ve currently got configured at Log In — Expo

Yup, I’ve confirmed that the alias is listed within my keystore and not expired.

We don’t have any credentials configured as of yet for this project as this would have been the first build that gets uploaded to the Expo dashboard.

Please let me know if you need anything else from me.

Oh, interesting! There are a couple things that would be immensely helpful for me get to the bottom of this:

  1. The name of the account and project, also the name of the account that is running the build command if that’s different. You can email me at quin@expo.io with the info if you are not comfortable posting it in the public forum :slight_smile:
  2. A way for me to reproduce your situation on my machine, short of you giving me your keystore. If you’ve generated the keystore on your machine, the commands you used to make the keystore, the type of keystore you’ve generated (jks, pkcs12), etc. Any step-by-step instructions would be very useful!

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