bitrise-steplib / steps-google-play-deploy

MIT License
54 stars 38 forks source link

Mapping files in case of aabs #132

Closed androideveloper closed 3 years ago

androideveloper commented 3 years ago

Hi. I recently found that the crashes and ANRs are not correctly deobfuscated on Google Play. I checked and found that we currently provide wearable app mapping file to both aabs being uploaded. I can now switch to upload multiple mapping files, but before doing that I was curious, isn't the aab file taking mapping files automatically? At least the mapping file is inside the aab file. https://stackoverflow.com/questions/53320814/automatically-upload-proguard-mapping-files-to-play-console/53458191#53458191 Doesn't it mean that we shouldn't actually upload any mapping file if we use aab files?

ofalvai commented 3 years ago

You are probably right @androideveloper, according to this Play Console help article, you can skip the mapping file upload if you deploy an AAB.

Important: This step is only required for developers using APKs. If you’re using an app bundle and Android Gradle plugin version 4.1 or later, then there's nothing you need to do. We'll automatically grab the deobfuscation file from the bundle and you can skip to Step 3: View deobfuscated crash stack traces.

Thanks for the info, we'll add this to the step description!

androideveloper commented 3 years ago

Hi @ofalvai . Thanks for confirming. However, I am not sure if it works properly. I tried to upload the correct mapping file for one of our releases and removed mapping file for another to see which one is being properly deobfuscated. The one without any mapping file (should take mapping file from aab) is still obfuscated and the new crashes for the one with correct mapping file are now deobfuscated properly. Maybe they take the mapping file from aab when the release is uploaded? 🤔

ofalvai commented 3 years ago

Maybe they take the mapping file from aab when the release is uploaded? 🤔

Yes, I think this is the case. The help article suggests that they pick the mapping file at the time of the upload.

androideveloper commented 3 years ago

Ok, I will give it a try. For that I need to manually override the one that is provided by Bitrise by default: $BITRISE_MAPPING_PATH. So it will look like this

        - mapping_file: ''

Maybe it make sense to remove the default one especially now when it's explicitly mentioned that uploading mapping file is not mandatory?

ofalvai commented 3 years ago

Sorry, I thought you manually removed the mapping file in Play Console after the app was deployed.

We don't want to remove the default value for mapping_file because a lot of users are still deploying APK to the store, and an APK doesn't contain the mapping file, it needs to be uploaded separately.

androideveloper commented 3 years ago

Sorry, I thought you manually removed the mapping file in Play Console after the app was deployed.

Yes, that's what I tried and it didn't work. Now I will try to upload to Google Play without mapping files and see if it works.

Ok, make sense 👍 Now more and more apps will publish aabs after this change, but it will take some time.

androideveloper commented 3 years ago

Hi @ofalvai. An update here: disabling the upload of mapping files worked! Now Google Play takes the mapping files from the aab which is perfect for our case: different aab-s have different mapping files, so we don't need to care about uploading them separately!

androideveloper commented 3 years ago

We can close this ticket

ofalvai commented 3 years ago

Awesome, thank you for the investigation!