Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 599
pbm Avatar asked Dec 08 '16 06:12

pbm


People also ask

Where do I upload a map file?

To Upload a deobfuscation or symbolication fileOn the left menu, select App bundle explorer. Select the Downloads tab, and scroll down to the 'Assets' section. Click the upload arrow for the mapping file or the debug symbols as applicable to upload the deobfuscation for the version of your app.

How do I upload a dSYM file to Firebase?

To manually upload your dSYMs, you can use the console-based "Drag and Drop" option to upload a zip archive containing your dSYM files (go to Firebase console > Crashlytics > dSYMs tab).

How do I automatically upload dSYM to Crashlytics?

Inside your project, you will need to make sure that Debug Information Format is set to DWARF with dSYM File for all your build types. Next, you will need to add a script inside Build Phases. You can find that in Target > Build Phases. Then, you can do that by clicking + > New Run Script Phase.


2 Answers

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 :)

like image 68
rakshakhegde Avatar answered Sep 28 '22 01:09

rakshakhegde


MANUALLY UPLOAD "mapping.txt" WITHOUT GRADLE TASK

  • Mapping file is Application Based
  • Mapping files are Application Version Based

    So you have to upload mapping.txt file to firebase console after each version release.

After first crash or error is reported for a given app version, you can manually upload mapping.txt file.

You can find the file to upload at a file path that is similar to the following, but specific to your app:

 <project root>/<module name>/build/outputs/mapping/<build type>/<appname>-proguard-mapping.txt

Example:

app/build/outputs/mapping/debug/app-proguard-mapping.txt

At Firebase Console,

Go to,

Firebase Console > Select Your App > Select "Crash Reporting" From Left Menu > Navigate To "MAPPING FILES" Tab > Press "UPLOAD" Against Your App Version. > DONE

See screenshot,

Screen shot of showing manual mapping file upload

READ HERE Official instruction for manual mapping file upload to firebase console

like image 39
Jayakrishnan Avatar answered Sep 28 '22 03:09

Jayakrishnan