Skip to content

Instantly share code, notes, and snippets.

@niezbop
Last active August 21, 2019 08:11
Show Gist options
  • Save niezbop/3edcbd722228dd86d73a911f6dfd8535 to your computer and use it in GitHub Desktop.
Save niezbop/3edcbd722228dd86d73a911f6dfd8535 to your computer and use it in GitHub Desktop.
Bypassing Upload Error for .aab files on new applications for GooglePlay

Bypassing Upload Error for .aab files on new applications for GooglePlay

The issue

Overview

Soon after the introduction of Android App Bundles on GooglePlay, we switched our build pipeline from APK only to support and upload .aab files.

While this worked just fine for our existing project, we could start a new project with an Android App Bundle since we were faced with an "Upload Error (We could not save your changes. Please try again.)", and no further explanation. Trying again would lead to the same result.

Context

Issue encountered on July 29th, 2019

To put this issue Generate an empty .apk file, with your application bundle id, and sign it using your existing signing key

  • Create a new application on the GooglePlay Console, and opt-out "App signing., here is what our setup was like:
  • an Android signing key used to sign our apk builds in the past
  • existing projects using APK in the past, converted to AAB. One thing to note is that to be able to convert these projects, we had to opt-in "App Signing" by Google Play, and upload our upload key manually on the project (we used our signing key to be able to sign both .aab and .apk with the same key).
  • new applications to create, with "App Signing" by Google Play enabled to support Android App Bundles.

GooglePlay engineering team diagnosis

Since we didn't understand where the issue came from, we reached out to GooglePlay support, and the issue escalated to their engineering team. Here is the final answer that we received on this topic:

It looks like the problem is that your app signing key was created with DSA (which is not supported by Play) instead of RSA, so what you'll need to do is create a new key and use it to sign your bundle. This should allow you to submit the bundle for publishing.

The workaround

The reason for it

The recommended GooglePlay answer was not sufficient in our eyes, since we had been able to upload AAB files using the very same key, invalidating the following:

your app signing key was created with DSA (which is not supported by Play) instead of RSA

On the other hand, we did not want to spend resources adapting our build pipelines and maintaning two keys in parallel, since we want to be able to upload APK as well.

How to work around this issue?

Since our existing projects could be uploaded using our existing key, we did the following:

  • Generate an empty .apk file, with your application bundle id, and sign it using your existing signing key
  • Create a new application on the GooglePlay Console, and opt-out "App Signing".
  • Setup your application correctly (fill in the metadata, fill in the App Content form...)
  • Create an Internal Release with your .apk file
  • Publish your Internal Release. Your application is now associated to both the bundle id and your app signing key.
  • Opt-in the "App Signing" by GooglePlay, and upload your app signing key as its upload key (see attached image).
  • You can now upload and release .aab files signed with your existing signing key either manually or through your pipeline.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment