[Solved] Android key does not match what Google Play has expects

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Message
Author
User avatar
Ajeb
Newbie
Posts: 15
Joined: Thu Feb 07, 2019 7:22 am
Projects: FLY : Forever Loving You (2)
Deviantart: AjebFLY
itch: ajeb
Contact:

Re: Android key changing every time I build a new app bundle for Google Play

#16 Post by Ajeb »

After testing out the nightly fix version, nothing changed, I'm still getting the same message. This time around, I've tried to recover all the keystore files from my old laptop in case an old project keystore was somehow used when I first built my app on it in 2021 before switching laptops, but none of the android.keystore files (2) change the error code I get. Since I've successfully made releases pre-bundle era with my backed up android.keystore file from 2021, this means the bundle.keystore file is definitely the problem. I've made a deep search on my current laptop for all bundle.keystore files (which is the only device I've used to generate bundle keys), but the one I've had in my folders and the one I've backed up everywhere is the only one on here. The only progress I've made was to find the secret User>AppData>Roaming>RenPy>backups>keys folder which had different bundle.keystore backups: the one I've used for 4 different successful releases last year, and the ones generated in the last 10 days for testing purposes.
I'm lost because even though everything points towards a wrong bundle.keystore file being used, this is the only one that's ever been used and generated on my computer, and one that has been responsible for four successful .aab releases last year. Unfortunately cannot get to below 100 Mo without my project looking atrocious to try a simple .apk release but I'm sure the android.keystore file has no issue.

PyTom wrote: Mon May 22, 2023 8:18 am if someone is willing (and this is a big ask), I'd like to work with someone willing to send me their keystores, and the hashes that google is giving them. (That aren't matching.) I'll need the keystore files (and the full paths to those files), the local.properties and bundle.properties files, and the errors that google play is giving. Please PM me this information (And if sharing files via google drive, my user is renpytom@gmail.)
I've contacted Google Play Developer support and will update here if they're of any help. If they can't do anything, I'll happily send you everything I can unless Imperf3kt's files can help you find the issue (they seem like two unrelated issues despite the error message being the same, so I'll most likely get in touch anyway unless Google Play can help)
Thanks a lot for your willingness to help!
Image
Image

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Android key does not match what Google Play has expects

#17 Post by PyTom »

Can someone try backing up the bundle.keystore file in your game's base directory, and then copying bundle.keystore from rapt into the game's base directory?

Ren'Py 8.1 migrated the keystore files from rapt/ into the game itself. During development, there was an issue with this migration. What I'm sort of thinking is that the file might have been migrated using one of the 8.1 nightlies or prereleases, which had a problem. Repeating the migration process (just copying over the file) will likely fix the issue.

If that doesn't work, I'd like the full rapt/ directory, and the android.keystore and bundle.keystore files from the game's base directory. (Along with a screenshot of the error google is giving you.)
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3807
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Android key does not match what Google Play has expects

#18 Post by Imperf3kt »

Copying files over manually did not change anything.
I did try this before, but having just tried it again, I am positive google still complains about the key being wrong.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Zetsubou
Miko-Class Veteran
Posts: 522
Joined: Wed Mar 05, 2014 1:00 am
Completed: See my signature
Github: koroshiya
itch: zetsuboushita
Contact:

Re: Android key does not match what Google Play has expects

#19 Post by Zetsubou »

I haven't tried uploading to the play store, but checking the certificate fingerprints locally would indicate that it's working correctly for me.

I ran

Code: Select all

gradlew signingReport
on renpy 7.5.3 and noted the sums for :app:signingReport release variant.
Then copied the bundle.keystore to renpy 8.1.0 and tried running signingReport for that version.
The sums matched.

I then built a bundle of The Tutorial in 8.1.0 with that keystore and checked the sums with

Code: Select all

keytool -printcert -jarfile com.test.question-release.aab
The sums matched what was indicated on signingReport.

If the sums aren't matching then it might be worth running signingReport and checking the release variant to see which keystore it's pointing to.
Maybe something is caching a different keystore, or using one from the backups directory Ajeb mentioned?
For reference I'm testing on Ubuntu 20.04. I haven't tested on Windows or OSX.
Finished games
-My games: Sickness, Wander No More, Max Massacre, Humanity Must Perish, Tomboys Need Love Too, Sable's Grimoire, My Heart Grows Fonder, Man And Elf, A Dragon's Treasure, An Adventurer's Gallantry
-Commissions: No One But You, Written In The Sky, Diamond Rose, To Libertad, Catch Canvas, Love Ribbon, Happy Campers, Wolf Tails

Working on:
Sable's Grimoire 2

https://zetsubou.games

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Android key does not match what Google Play has expects

#20 Post by PyTom »

Question - what was the last release you did a successful upload to google play with? Did you ever upload an apk, or apk/oob combo?

What I'm seeing here is that the last upload was done using the android.keystore key, while the new upload is being done with the bundle.keystore key. I don't really understand what's going on here. There are a few possibilities.

* An early version of Ren'Py created a .aab with the .apk key.
* The game was uploaded as a .apk, and then turned into a .aab, and google is only now enforcing that the two need to use the same key.
* Something else.

In any case, I think the fix might be:

1) Back up the bundle.keystore file (which is now in the base directory of your project - not in rapt/).
2) Copy (in your base directory) android.keystore to bundle.keystore.
3) Build.

I'm pretty confident this is the problem peoples' games are experiencing, but I'm still not 100% sure why.

Thank you to everyone who trusted me enough to send games and key material.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3807
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Android key does not match what Google Play has expects

#21 Post by Imperf3kt »

The first version I uploaded to Google play was made using Ren'Py 8.0.3.22090809
I had a previous version on google play under a different package name, but I had to upload a new package under a different name. That was the first and only version that succeeded to upload to google play, the first update I tried to upload fails with the above issue.

Thanks for looking into it though. After trying your suggestion, I can confirm google accepted an updated package
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Ajeb
Newbie
Posts: 15
Joined: Thu Feb 07, 2019 7:22 am
Projects: FLY : Forever Loving You (2)
Deviantart: AjebFLY
itch: ajeb
Contact:

Re: [Solved] Android key does not match what Google Play has expects

#22 Post by Ajeb »

THANK YOU!!! It didn't even click that maybe the android.keystore file could have been used for the bundle.keystore file... but it was as simple as that.

The first version of my game was uploaded as an apk with Ren'Py 7.4.4 shortly after its release. I think at some point it magically accepted a lone .apk file that was over 100 Mo, but I did upload several apk/oob combos, and several .aab files afterwards as well. It's either because of the keystores in main folder change or because I had to uninstall and reinstall Ren'Py at some point and use my keystore backups that I'm realising only one year after my latest release that the generated bundle.keystore file was actually never used.

Thank you so much for your help, it means a lot!!!
PyTom wrote: Fri May 12, 2023 12:15 am Are you on the current prerelease? There had been an issue where it used the apk key as the bundle key, but that's since been fixed.
And re-reading the thread I realise that you had given the solution from the get-go but I somehow missed it... Sorry for wasting your time!
Image
Image

Qualia
Newbie
Posts: 18
Joined: Sun Feb 17, 2019 5:55 pm
Contact:

Re: [Solved] Android key does not match what Google Play has expects

#23 Post by Qualia »

Hello everyone, I've encountered the same problem as Ajeb and Imperf3kt but haven't been able to solve it yet.

I'm not sure I quite understand what PyTom means with this: 2) Copy (in your base directory) android.keystore to bundle.keystore.

I've tried to copy the Android keystore file into the game directory, but it didn't work. I've then tried to copy the bundle keystore file into the game directory, but it didn't work either. I've tried to rename them as well, but it still doesn't work and I get the same error message (same as Ajeb).

Could you please help me get what I've missed? Thank you very much in advance for your assistance!

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3807
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: [Solved] Android key does not match what Google Play has expects

#24 Post by Imperf3kt »

You did copy the files found in the rapt folder of your renpy install, to the BASE directory, right?
You also need to copy Android.keystore twice and rename one of the files bundle.keystore, overwriting bundle.keystore in your project's BASE directory (do not overwrite any files in your renpy install folder)

Before doing all this, be sure to make backups of all the files as these keystore files are extremely important and must not be lost.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

Qualia
Newbie
Posts: 18
Joined: Sun Feb 17, 2019 5:55 pm
Contact:

Re: [Solved] Android key does not match what Google Play has expects

#25 Post by Qualia »

Thank you! We've tried what you said, but unfortunately, we still face the same error... We don't understand and have no idea how to to fix this. :cry:

Qualia
Newbie
Posts: 18
Joined: Sun Feb 17, 2019 5:55 pm
Contact:

Re: [Solved] Android key does not match what Google Play has expects

#26 Post by Qualia »

Just a precision, we managed to do it for one of our apps, which worked just fine. But the problem still stands for our huge app over 100mo. The same procedure doesn't work, probably because there's this bundle thing now for apps over 100mo.

If anyone's got an idea... we'd be thankful!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]