Closed carman247 closed 1 year ago
Hi @carman247
Could you please try upgrading to the latest firebase_crashlytics: ^2.2.1
?
Thank you
Hi @carman247 Could you please try upgrading to the latest
firebase_crashlytics: ^2.2.1
? Thank you
Ok, will upgrade and report back
I've tested using 2.2.1 in release mode and still getting errors reported as java files instead of dart.
Seeing this as well. Since https://github.com/FirebaseExtended/flutterfire/issues/80 is locked this can be tracked here as a continuation.
@carman247, are you able to provide steps to reproduce this behaviour? Perhaps in the firebase_crashlytics/example
project. I'm seeing dart file extensions in my crash reports.
Hey @carman247. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
The project I am working on is using
firebase_core: ^1.6.0
firebase_crashlytics: ^2.2.1
and one example I copy from crashlytics is (with some code change due to pnc)
Non-fatal Exception: io.flutter.plugins.firebase.crashlytics.FlutterError: Null check operator used on a null value. Error thrown Instance of 'ErrorDescription'.
at State.context(State.java:1095)
at _EntryPage.initState.<fn>(initState.java:33)
at Utils.afterBuild.<fn>(afterBuild.java:94)
at SchedulerBinding._invokeFrameCallback(SchedulerBinding.java:1144)
at SchedulerBinding.handleDrawFrame(SchedulerBinding.java:1090)
at SchedulerBinding._handleDrawFrame(SchedulerBinding.java:998)
I realised I faced this issue after I recreate android project (gradle version upgraded here), enable multidex, and change every reference from fabric to firebase in build.gradle
and android/build.gradle
.
I have also updated my project from fabric to firebase .. I'll try and get some more information added today about how I am implementing crashlytics/firebase.
Could updating from fabric to crashlytics, and some lingering references be what's causing the problem?
Hi @russellwheatley,
Following your recommendation I tested the firebase_crashlytics/example.
Works on debug mode :
but NOT on release :
Debut mode show correct class and ligne number :
Release mode show correct line number but no class and replace 'dart' with 'java' (Other crash may differ more)
flutter doctor -v
[✓] Flutter (Channel stable, 2.5.2, on macOS 11.6 20G165 darwin-x64, locale en-GB)
• Flutter version 2.5.2 at /Users/bounty1342/fvm/versions/stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 3595343e20 (30 hours ago), 2021-09-30 12:58:18 -0700
• Engine revision 6ac856380f
• Dart version 2.14.3
firebase_crashlytics: ^2.2.2
firebase_core: ^1.7.0
This is certainly why there is also issues with obfuscation. This is a really annoying issue.
flutter build appbundle --release --obfuscate --split-debug-info=build/app/outputs/symbols
produce obfuscated code that Firebase can't handle:
Previous issue similar to this : https://github.com/FirebaseExtended/flutterfire/pull/4407
Btw on @untp screenshot it also show java classes instead of dart:
https://github.com/FirebaseExtended/flutterfire/pull/4407#issuecomment-815945809
https://github.com/FirebaseExtended/flutterfire/pull/4407#issuecomment-815605757This PR explain why the .java behavior but it should be made clear on the docs as a warning. (People expect dart file and I was confuse to see those java...)
Finally, the PR regex dosent seem to match with this :
. #00 abs 0 virt 00000000001cb0af _kDartIsolateSnapshotInstructions+0xe660f (.java)
Hopefully i'm wrong, but it seems the previous PR was incomplete. Hope this help.
Regards
I reproduced the issue above where it worked in debug but not in release.
I used this simple code (and copied firebase_crashlytics/lib/src/utils.dart to project directory for testing getStackTraceElements
):
import 'dart:async';
import 'dart:convert';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_crashlytics/firebase_crashlytics.dart';
import 'package:flutter/material.dart';
import 'utils.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
FirebaseCrashlytics.instance.recordError('Error object', StackTrace.current);
print(jsonEncode(getStackTraceElements(StackTrace.current)));
}
Debug mode:
Release mode:
Obfuscated release mode:
Deobfuscation: #0 main (package:crashlytics_example/main.dart:13:71)
print(jsonEncode(getStackTraceElements(StackTrace.current)))
output:
Debug mode: [{"file":"package:crashlytics_example/main.dart","line":"14","method":"main"}]
Release mode: [{"file":"package:crashlytics_example/main.dart","line":"14","method":"main"}]
Json encoded getStackTraceElements returns same output both in debug and release. So the problem is not caused from this package. It is probably in the backend.
Deobfuscation can be done with https://github.com/FirebaseExtended/flutterfire/issues/2644#issuecomment-746217634. I also filed an issue to dart sdk (dart-lang/sdk#47357), so we can directly deobfuscate without editing any lines.
It hard to keep deobfuscing by hand for apps in production. Is there any configuration that will prevent this issues or alternative setup ?
On top of it, every version produce a new set of error, and have to switch better symbols... This make Crashlytics unfit for production app atm...
Hey @untp, great work investigating. I don't suppose you raised an issue with Firebase Support for everybody to track? 😄
I didn't contact Firebase Support about this issue. I just shared my findings.
I've raised an issue with Firebase support, will update this channel once I have feedback.
Any update on this? it seems to be related to https://stackoverflow.com/questions/71164040/how-to-get-readable-stacktrace-for-dart-code-exception-with-firebase-crashlytics
@4ntoine - I'm still in communication. Will update when I have something to report.
Quick update - Firebase support was able to reproduce and will look to get this fixed. No ETA as such, I was told to keep an eye out for future releases/release notes 👌
Hey folks, I haven't noticed anything in the release notes, but I believe this issue has now been resolved. Could someone please confirm that the correct file extension is now displayed in the Crashlytics console, please 🙏 ?
Hey @carman247. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@carman247 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
Still having the issue
Since there haven't been any recent updates here, I am going to close this issue.
@carman247 if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.
This one should stay open.
@russellwheatley, can you check with Firebase support what's the exact status for this issue on their side ?
Thanks
@bounty1342 reopened. Firebase support said to keep an eye on release notes for changes in status. No changes so far I'm afraid.
Since version 2.9.0
this should not be an issue anymore:
FEAT: Send Flutter Build Id to Crashlytics to get --split-debug-info working
Please reopen if needed.
Pretty sure this is still an issue ...
https://github.com/FirebaseExtended/flutterfire/issues/80
If not, which version was it fixed in, or what needs to be done differently to prevent recording errors in .java files?
I'm using: firebase_crashlytics: ^2.0.6