15

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

3
  • For me it says "UPLOAD" where yours has a date. Could it be that you've already uploaded a mapping file for each version? Commented Dec 8, 2016 at 7:25
  • I do have a newer version that was uploaded to the developer console 22 hours ago and is published. Perhaps it takes a long time for the developer console to tell firebase there is a new version. Perhaps at the moment firebase does not know there is a version 23. I'll let you know if my firebase console presents me a UPLOAD button for version 23 in future. Thanks Frank. Commented Dec 8, 2016 at 7:56
  • 2
    Note that firebase.google.com/docs/crash/… says "You can't upload mapping.txt files until at least one crash or error is reported for a given app version, but the Gradle task doesn't have this limitation." Setting up the gradle task is described in the checked answer Commented Feb 22, 2017 at 2:22

4 Answers 4

22

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

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks. This is a very complex way of doing something that should be simple (i.e upload a file!!). I'll verify it works for me next time I publish an APK.
Yeah, this is a one-time setup. Let me know how it goes. Cheers :)
why i don't have mapping folder generated in the build directory?
It should be under build/outputs
3

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

1 Comment

This option no longer exists on the dashboard.
0

Try to open newly published app in your phone. It might send the signal to the firebase about new version.

Comments

0

On the screen that you're showing, the dates are showing when you last uploaded a mappings file for that app version. Now, hover the mouse over one of those rows. Notice the three dots menu icon on the right. Click that. Delete the mapping file. Then, then you should have the option to upload a new one.

There will also be a way to upload mappings files using a Gradle plugin coming in the future.

2 Comments

The screen shows up to version 22. But there is a version 23 that has been in production for several days. The problem is that firebase does not show there is a version 23 available, so I am unable to upload a mapping file for version 23.
The mentioned gradle plugin will allow that.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.