Sign app with old keystore

  Expo CLI 3.17.24 environment info:
    System:
      OS: macOS 10.15.4
      Shell: 5.7.1 - /bin/zsh
    Binaries:
      Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
      Yarn: 1.10.1 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm
    IDEs:
      Android Studio: 3.6 AI-192.7142.36.36.6308749
      Xcode: 11.4/11E146 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^37.0.0 => 37.0.6
      react: 16.9.0 => 16.9.0
      react-native: https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz => 0.61.5
      react-navigation: ^4.0.10 => 4.3.7
    npmGlobalPackages:
      expo-cli: 3.17.24

Some years ago i made an APP with PhoneGap. Now I would like to replace it with one made with EXPO.
I have the keystore and the credentials.

I run the build, select I want to upload my own keystore! and I try to upload the resulted APK.

which result in an error:

Upload failed
You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s):
[ SHA1: ..... ]
and the certificate(s) used to sign the APK you uploaded have fingerprint(s):
[ SHA1: .... ]

any ideas?

can you compare output of expo fetch:android:hashes with ones available in play store(‘App signing’ tab)?

I think i managed to fix it.
Uploadind my keystore seems to work but for some reason it was still using an old ket.
I had to use the credentials manager command line to update it

Can you check what version of expo-cli are you using ?

Same a problem, I have my old keystore in 2016 and I get the same message in google play.

There was a bug in few recent versions of expo-cli, so if you cleared your credentials and specified keystore manually, it didn’t update(and generated new one on expo servers)

If you update to latest expo-cli and pass this keystore again to build command it should work

In my case, i was relying fully on expo. Issuing only the command expo build:android -t app-bundle. I haven’t generated my keystore before until today. Haven’t uploaded my keystore manually during the build.

I normally upload using expo upload:android --key <file> --track production --latest, I also tried uploading manually on Google Play.

When i checked the hashes, it was different from my Google Play Upload Certificate.

  1. I already updated my expo-cli to the latest version.
  2. When I tried to generate my keystore using expo fetch:android:keystore, the keystore contains different certificate from Google Play
  3. I tried expo credentials:manager and tried to upload the generated keystore, but still the same.
  4. I also tried this EXPO_LEGACY_API=true expo build:android

But I haven’t tried cleared credentials, I’m afraid I might do something wrong.

How can I fix this? For Android builds only, tried multiple builds already.

1 Like

did you change your slug? keystores in our credentials manager are tied to your username and app slug combo. if you change your slug back and fetch credentials you can upload those to use on your new slug

@notbrent
yeah, I changed my slug on my last build. That was my mistake, I never thought of that.

Anyway, I was able to upload now. Thanks man!

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