Google Console APK Upload - New App fails

209 Views Asked by At

Recently trying to create a new App and upload a brand new APK with self signed certificate (Not Google App Signing) Results in the following error

You uploaded an APK or Android App Bundle that is signed with a restricted certificate. You need to upload an APK or Android App Bundle signed with your own certificate.

I don't believe this error is entirely correct as I do sign the certificate myself locally, this seems like a recent change to our on boarding process and opt-in is now default for google app signing but our infrastructure doesn't have the right pipeline for this yet.

Is there any other things to verify and test, as I see the keystone file is still there and there's no build errors when it's being signed. Also this is a brand NEW application I don't understand why this error would occur for the initial upload since there's no other keys to check against.

I've searched the net but most issues appear to be happening in 2018 and this is more of a recent change that started to occur for us.

EDIT: This is using Cordova build tools not through Android Studio.

con

2

There are 2 best solutions below

0
Andrei On BEST ANSWER

I don't have a full answer as to Why it was failing, however right after the build for cordova build android --release that APK will upload. But If I use that APK in an emulator to test something first that APK is no longer valid to upload and I get the error pasted above.

basically in our pipeline I had to create a copy of the APK right before creating screenshots and then use the copied APK to upload onto google console.

1
Karan Dhillon On

Try to follow these trouble shoot steps and see if that will solve your issue:

Clear everything in the Release folder, present in app->build->outputs->apk->release.

Generate new signed apk which will get created in the same above mentioned directory.

Make sure you are bumping the version code.