0

I uploaded one Android App in Google Play Console. After some days I updated as well. Now after I bought a new laptop, so I installed Android Studio. I run the signing report to get SHA-1, because I wanted to add SHA-1 in Google APIs. After that I release the APK with same old .jks and same credentials[password & key alias].

Now when I try to upload as a update in Google Play Console then I'm getting this:

Upload failed
You uploaded an APK that is not signed with the upload certificate. You must use the same certificate. The upload certificate has fingerprint:
[ SHA1: E4:DC:C1:E9:E91..........:A0:EB:24 ]
and the certificate used to sign the APK you uploaded have fingerprint:
[ SHA1: 46:BC:09:BE:12......3:A4:34:EF ]

What I troubleshoot:

  • Clean Build
  • Invalidate cache and restart
  • Tried with App Bundle and App release signed APK Signature V1 and V2
  • Upgraded versionCode and versionName everytime I tried to upload in Google Play Console.
  • Had a research and tried to understand others answers who having a same problem.

But No luck! Please help.

  • Are you sure it is the "same old .jks"? Use `keytool -list -v -keystore {path_to_keystore} -alias {alias_name}` to output its contents and SHA-1 specifically. You either sign APK with a correct keystore or with an incorrect keystore. There is no third option. – Jenea Vranceanu Jul 31 '20 at 09:53
  • @JeneaVranceanu path_to_keystore means .jks file path? –  Jul 31 '20 at 10:00
  • As my opinion this is not possible. I'm pretty sure you are not using the previous key store. You must have to use the previous key store to update the app on playstore. – Sk Suraj Jul 31 '20 at 10:01
  • @SychiSingh, correct. – Jenea Vranceanu Jul 31 '20 at 10:01
  • @JeneaVranceanu is this correct? keytool -list -v -keystore C:\Users\xxx\AndroidStudioProjects\abc\www.jks -alias key0 –  Jul 31 '20 at 10:03
  • Should be correct if the path and alias are correct. – Jenea Vranceanu Jul 31 '20 at 10:04
  • @JeneaVranceanu searching for this: 'keytool' is not recognized as an internal or external command, I'm using win 10 –  Jul 31 '20 at 10:05
  • Follow [this response](https://stackoverflow.com/a/4830283/7210237). – Jenea Vranceanu Jul 31 '20 at 10:11
  • @JeneaVranceanu Hey! I generated with that keytool command. Now what to do? –  Jul 31 '20 at 10:19
  • Use `keytool -list -v -keystore` command as aforementioned. – Jenea Vranceanu Jul 31 '20 at 10:19
  • @JeneaVranceanu I read the comment but still I'm not getting what to do? –  Jul 31 '20 at 10:23
  • Use this command to print to the command line SHA1 of your `www.jks` keystore. And compare it with the error presented in the issue. Does it match the wrong SHA1 or the right SHA1? – Jenea Vranceanu Jul 31 '20 at 10:25
  • @JeneaVranceanu It is matching with this line in question: [ SHA1: 46:BC:09:BE:12......3:A4:34:EF ] –  Jul 31 '20 at 10:26
  • It's the wrong certificate. It should've been `E4:DC:C1:E9:E91..........:A0:EB:24` – Jenea Vranceanu Jul 31 '20 at 10:27
  • @JeneaVranceanu Any other possibilities? Like I might used same .jks is used for other app which is now unpublished –  Jul 31 '20 at 10:30
  • @JeneaVranceanu for that Is there ay setting to change in google play console? same signing key/certificate something? –  Jul 31 '20 at 10:31
  • @SkSuraj Okay, I got to know that I lost the jks. Now I have doubts: If I'll contact support team, what will happen? Also, In console, is is possible that I remove published app and add new one? it's okay if I'll lose download. But I don't want to loose package name, because with that package name I created firebase project. –  Jul 31 '20 at 16:04
  • @JeneaVranceanu Okay, I got to know that I lost the jks. Now I have doubts: If I'll contact support team, what will happen? Also, In console, is is possible that I remove published app and add new one? it's okay if I'll lose download. But I don't want to loose package name, because with that package name I created firebase project. –  Jul 31 '20 at 16:04
  • @SychiSingh If you forgot the previous signing key don't worry. Now you can reset your signing key in play console. You just need to follow some steps. More details here https://stackoverflow.com/a/47613539/10844305 – Sk Suraj Jul 31 '20 at 16:51
  • @SkSuraj I'm telling that I lost "same old.jks" file. Can I still able to do? –  Jul 31 '20 at 17:50
  • @SychiSingh Yes you can. You have to generate a new signing key. And tell play console support team to replace the old key with the new key. Then you can update your app on play store with the new signing key. – Sk Suraj Aug 01 '20 at 02:54
  • @SkSuraj Okay. thanks –  Aug 01 '20 at 11:42
  • @SkSuraj Can you please help me? https://stackoverflow.com/questions/63196982/how-can-i-get-exact-sub-category-name-about-a-place-from-google-places-api-in-an –  Aug 01 '20 at 11:46

1 Answers1

0

Following the discussion in comments

Currently used certificate has next SHA1: 46:BC:09:BE:12......3:A4:34:EF.

It's the wrong certificate. SHA1 should've been E4:DC:C1:E9:E91..........:A0:EB:24.

Make sure you use the old certificate with which you've signed your APK and uploaded for the first time. If the old certificate is lost and you cannot restore it you will not be able to upload updates anymore. Sad, but true.

The next is not the fix of the issue but good to know

Opt in to app signing by Google Play to make Google Play store your certificate and handle signing. This way you have a much much lower chance of losing your certificate. And you will also be able to change the private key used for signing if it is lost or compromised. Huge improvement!

If you lost your private upload key or your private key has been compromised, you can create a new one and contact the Google Play support team to reset the key.

Jenea Vranceanu
  • 4,530
  • 2
  • 18
  • 34
  • Okay, I got to know that I lost the jks. Now I have doubts: If I'll contact support team, what will happen? Also, In console, is is possible that I remove published app and add new one? it's okay if I'll lose download. But I don't want to loose package name, because with that package name I created firebase project. –  Jul 31 '20 at 15:00
  • @SychiSingh, If you contact the support team they won't be able to help. You should be able to unpublish the application from the store BUT users who installed the app will be able to use it until they manually remove it and **you will not be able to completely remove the app from the Play Market**. And that means you will not be able to upload the same application with the same package name. – Jenea Vranceanu Jul 31 '20 at 16:06
  • What is the solution then? Because that package name is associated with Firebase project –  Jul 31 '20 at 18:35
  • If the keystore is lost - create new keystore, create new Firebase project, change package name. No other solution is available in that case. – Jenea Vranceanu Jul 31 '20 at 18:50
  • "DB in Firebase" - probably you can download it and upload to a new project. Not sure exactly as I've used it not so often. – Jenea Vranceanu Jul 31 '20 at 19:56
  • Can you help me here? https://stackoverflow.com/questions/63196982/how-can-i-get-exact-sub-category-name-about-a-place-from-google-places-api-in-an –  Jul 31 '20 at 20:08
  • @SychiSingh Don't worry about your database. You can take backup easily from firebase. Export your db as json, and later import your db from json. That's it. And by the way, you don't need to actually create another firefase project. You can use the same for your app. You're not changing the package name. You're changing the signing key. – Sk Suraj Aug 01 '20 at 02:57