Search code examples
androidfirebasefirebase-consolefirebase-crash-reporting

How to upload a mapping file to Firebase?


I've been looking around the firebase console for half an hour for a button or menu allowing me to upload a new crash reporting mapping file. And cannot find a way. I've done it in the past, but cannot work out how now. Perhaps something has changed. It would be nice to have a big button on the screen saying "upload a new mapping file" wouldn't it? Can someone put me out of my misery?

enter image description here


Solution

  • Sorry if I'm late, but instead of creating an exception, like some suggest, here is a cleaner official way Firebase docs suggest. This guide will teach you how to automatically push the release apk mapping to Firebase Crash Reporter from your Android Studio IDE.

    Go to the Get deobfuscated crash reports section. I'll cover some maybe-hard to follow points in that guide.

    1. Add all gradle lines as suggested in the docs
    2. Download the Private Key file as suggested
    3. Copy this Private Key file to the root folder of your project
    4. In your gradle.properties file, add this line FirebaseServiceAccountFilePath=../name-of-downloaded-file.json
    5. In terminal, at the root of your project, run this line ./gradlew :app:firebaseUploadReleaseProguardMapping.

    This will build the release apk and upload it's mappings to Firebase in one shot.

    Just keep in mind that if you're using a version control or open sourcing your project, keep your Private Key file ignored or kept safe from other team members.

    Note that, you can also assign a shortcut to run this arcane gradle command by clicking on Gradle tab on right-hand-side. Then (root) -> Tasks -> Other -> firebaseUploadReleaseProguardMapping (right-click on this). Then add your favourite shortcut :)