Error publishing in PlayStore | App bundle that was signed in debug mode?

Hello,

I am trying to publish a cht app to the PlayStore. I have uploaded the release.aab file to production release and this is the error I have.

You uploaded an APK or Android App Bundle that was signed in debug mode. 
You need to sign your APK or Android App Bundle in release mode.

A solution I have come across includes changing signingConfig signingConfigs.debug to signingConfig signingConfigs.release but this is already how the code is set up in the repo.

Is there something else I should be checking/updating?

1 Like

Hi @Kymoraa ,

I think switching to signingConfigs.release is correct. From looking at the latest cht-android code I think that’s what the stock app uses. Where did you see the signingConfigs.debug option?

Hello @gareth

Yes, the code has signingConfigs.release and not signingConfigs.debug but I am getting the error as shown above. Looking up the error online/stackoverflow, they say it is related to having signingConfigs.debug which is not the case for us since we don’t have that debug option. So I am not sure what is causing the issue

What command are you executing to build the bundle? Which “flavor” are you building? To help debugging this, can I see the source you’re using?

Hello @gareth

This is the release tag which my branch is based on: Release v1.0.1 · medic/cht-android · GitHub > Android v1.0.1

Based on this branch, there’s no flavor specification per se. Because these are the commands I executed:

  1. make org=new_brand flavor=New_brand assemble
  2. make org=new_brand flavor=New_brand bundle

Does this info suffice?

Hi again,

I think the issue is the make command isn’t signing the bundle. To sign it you need a key that’s only known to you. Please read through the documentation on Sign your app and see if that fixes it.

Please note, if you’re replacing an existing version then the key will need to be the same as the previous version. Whatever key you use make sure you keep it in a safe place so you can update the app in future.

Reading the docs @gareth
Thank you. I will keep you updated on the outcome

Happy to report that signing it with a different key resolved the error @gareth
So just as you mentioned, the make command is actually not signing the bundle.
Thanks for this!