Flutterfire: [firebase_crashlytics] File names are incorrect on Android

Created on 2 Sep 2019  路  2Comments  路  Source: FirebaseExtended/flutterfire

I just noticed that the Dart files in Firebase Crashlytics Android reports from Flutter have .java file endings. It is a bit confusing, but I can confirm that these ".java" files are actually the Dart files in my project, i.e. the line numbers match up with what I have in them.
However, the file names are always <Dart class name>.java. For example:

GestureRecognizer.invokeCallback (GestureRecognizer.java:182)
TapGestureRecognizer.handleTapUp (TapGestureRecognizer.java:486)
BaseTapGestureRecognizer._checkUp (BaseTapGestureRecognizer.java:282)

The Dart files are not named after the classes and definitely do not have a .java file extension.

I am not exactly sure why this happens looking at the implementation.

(Moved from https://github.com/flutter/flutter/issues/38718)

customer android crashlytics bug

Most helpful comment

Same here. The behavior depends on how the app is built.

$ cd example
$ flutter build apk --debug # [1]
$ flutter build apk --release # [2]
$ flutter build apk --release --no-shrink [3]

For [1] and [3], the stack traces in the Firebase Console are correct. For [2], the stack traces in the Firebase Consoles are incorrect (all the file extensions and some of the filenames are wrong).

All 2 comments

Same here. The behavior depends on how the app is built.

$ cd example
$ flutter build apk --debug # [1]
$ flutter build apk --release # [2]
$ flutter build apk --release --no-shrink [3]

For [1] and [3], the stack traces in the Firebase Console are correct. For [2], the stack traces in the Firebase Consoles are incorrect (all the file extensions and some of the filenames are wrong).

Any clue on how to fix this ?
Calling --no-shrink is a great workaround but it's easy to forget it when you build a release...

Was this page helpful?
0 / 5 - 0 ratings