VS2019 - Google Play Console error - Failed to sign a app bundle - android

I am using Visual Studio 2019 16.4.1. I am trying to put a app onto the Google Play Store in internal testing. My app is being bundle as a aab file. I am getting a upload failed message:
"You uploaded an APK or Android App Bundle with invalid or missing signing information for some of its files. You need to create a valid signed APK or Android App Bundle. Learn more about signing."
I also saw this message which might indicate a bug with VS.
https://developercommunity.visualstudio.com/content/problem/845978/you-uploaded-an-apk-or-android-app-bundle-with-inv.html?inRegister=true
Now my question is how can you poke around inside the aab file and see if it is properly signed?
Also if it isn't signed...is it possible to sign that aab file and how would you do that?

Related

Android - Update app with new APK sign error

Long story short: 2 years ago I had someone create a app for me, this was coded in Xamrian and uploaded through AppCenter.ms(I think). Now, 2 years later I want to update that app. I rewrote the whole app in Java using Android Studio, and I am trying to upload a new version of the app in Google Play Console. I am trying to upload a signed apk, by using Generate Signed Bundle / APK. The problem is that I do not have the "key store" from the first upload, so when trying to upload the new apk(with a new keystore), this is what happens.
Error message:
You uploaded an APK with an invalid signature (learn more about signing). Error from apksigner: ERROR: JAR_SIG_NO_SIGNATURES: No JAR signatures.
What can I do about this? Is there any workaround so I can upload a new version of my app?
You can not update an app with an APK / App Bundle which is signed with a different key.
The Google Play Store will prevent the upload.
If you try to install it locally over an existing app, Android will show an error (something like "App could not be installed").

Google Console APK Upload - New App fails

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.
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.
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.

Is it mandatory to upload aab(Android App Bundle) instead of APK file

In the recent try for uploading a new version of apk for existing application to PlayStore, threw an warning message as mentioned below
So the question is, is it mandatory to upload only aab files to PlayStore or normal apk file can also be updated.
If aab file has to be uploaded, then how to sign the aab file before uploading.
I referred this Link for Goolge App signing. Is this also required ?
Note:
The application developed is a cordova application. So if the above mentioned things are mandatory is the procedure different to build for cordova application ?
Thanks in advance !
"Important: In the second half of 2021, new apps will be required to
publish with the Android App Bundle on Google Play. New apps larger
than 150 MB must use either Play Feature Delivery or Play Asset
Delivery".
Taken from
https://developer.android.com/guide/app-bundle
So the question is, is it mandatory to upload only aab files to PlayStore or normal apk file can also be updated
Normal APK can also be uploaded / updated. This is just a warning and not an error message. Google Play will still allow you to continue
If aab file has to be uploaded, then how to sign the aab file before
uploading.
In Android Studio, when building signed APK / AAB, it will ask you to export an encrypted key. Take note of the location because you will use this exported key when you upload your AAB. See highlighted in yellow
I referred this Link for Goolge App signing. Is this also required ?
Nope, it's optional. Quoting Google Play Support:
Using app signing by Google Play is optional. You can still upload an APK and manage your own keys instead of using an app bundle. However, if you lose your keystore or it becomes compromised, you won’t be able to update your app without publishing a new app with a new package name. https://support.google.com/googleplay/android-developer/answer/7384423

Is it possible to build an App Bundle using an already release signed APK, in Android Studio? I want to migrate apk to app bundle for play store

I am using the Unity Engine to build apk. Then I use that APK on Enhance to integrate the SDK's. AAB format is not accepted, therefore I need to build APK rather than AAB directly from Unity. Then I want that integrated APK to be migrated to App Bundle to upload to PlayStore.
I had tried finding it on documentation provided by Google for App bundle development, but nothing found. If you can help me there.
Is it possible to build an App Bundle using an already release signed APK
NO. You can convert an AAB to APK but not vice versa. Check this for Generate Apk file from aab file (android app bundle)
I want to migrate apk to app bundle for play store
You can migrate anytime and upload an apk or app bundle for any releases. Android (Google) doesn't restrict and accepts either of it in the Play Store.
However, you need to make sure you increment your versionCode to make sure everyone gets the update.
Also I recommend you to refer,
https://developer.android.com/studio/command-line/bundletool
Difference between apk (.apk) and app bundle (.aab)

Upload failed to publish android .aab extension file in google play console

When I am publishing .aab (Android App Bundle) extension file in google play console then it showing me error i.e. Upload failed
Your Android App Bundle is signed with the wrong key. Ensure that your app bundle is signed with the correct signing key and try again
I search regarding this topic solution and I get also bt didnt work for me. like : 1. clean, rebuild and again generate signed bundle.
2. change the location for generate signed bundle.
3. delete the generated file when created at the generate signed bundle time.
and many more. But didnt work anything.

Categories

Resources