Crash/Error not being reported in Firebase Console for Release Apps
I created a new project to test out the firebase_crashlytics since I was having a problem with one of the existing project where errors are not being reported to the console in release mode, to my surprise for the newly created project also errors are not being reported in release mode.
After doing to initial project setup and manually crashing the app and reopening the app in the release mode, I headed over to the firebase crashlytics console where it was just showing We’ll be listening for your app to communicate with our servers even after crashing multiple times, now if I run the project in release mode errors are caught on the console.
note: In the entire process FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); is set to true and still errors are reported only in the debug mode.
Steps to reproduce the behavior:
flutter run --release or build the release apk and installWe’ll be listening for your app to communicate with our
servers even after crashing multiple times in release mode.flutter run commandCrashes should be reported in release mode.
Run flutter doctor and paste the output below:
Click To Expand
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.0, on Mac OS X 10.15.7 19H2, locale en-IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
[✓] Android Studio (version 4.0)
[✓] VS Code (version 1.51.1)
[✓] Connected device (2 available)
Run flutter pub deps -- --style=compact and paste the output below:
Click To Expand
```
Dart SDK 2.10.0
Flutter SDK 1.22.0
fire 1.0.0+1
dependencies:
dev dependencies:
transitive dependencies:
Hi @LaxmikanthMadhyastha
Is the issue that FirebaseCrashlytics.instance.setCrashlyticsCollectionEnabled(true); is required for crashlytics collection to work? The official example already includes a section to enable it by default.
Could you elaborate on the expected vs actual behavior here? From your description reporting does work when collection is enabled.
Thank you
Hi @markusaksli-nc thanks for the reply,
I'm really sorry for not being clear there, what I'm trying to say is that irrespective of what the value for setCrashlyticsCollectionEnabled is, errors are not being reported in the release mode, for example, if I keep setCrashlyticsCollectionEnabled to always true without checking to debug mode or not, I expect the crash to report on the dashboard for both release and debug mode but what is happening is crashes are reported only if I run in debug mode.
This can be reproduced using the official example app also.
PS: I have updated the question for further clarification.
Thank you.
To be clear. This is just on Android so far and doesn't work at all (rather than just the first time setting up crashlytics in console)?
It works fine for me on the latest master 1.24.0-8.0.pre.304 with firebase_crashlytics: ^0.2.3 after installing a release apk.
flutter doctor -v
[√] Flutter (Channel master, 1.24.0-8.0.pre.304, on Microsoft Windows [Version 10.0.19041.630], locale et-EE)
• Flutter version 1.24.0-8.0.pre.304 at C:\Development\flutter_master
• Framework revision c6290500f8 (6 hours ago), 2020-11-18 17:29:28 -0800
• Engine revision 35a0b9fe68
• Dart version 2.12.0 (build 2.12.0-50.0.dev)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\marku\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.6953283\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.7)
• Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
• Visual Studio Community 2019 version 16.7.30621.155
• Windows 10 SDK version 10.0.18362.0
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.6953283
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] IntelliJ IDEA Ultimate Edition (version 2020.2)
• IntelliJ at C:\Users\marku\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\202.7660.26
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] Connected device (4 available)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19041.630]
• Web Server (web) • web-server • web-javascript • Flutter Tools
• Chrome (web) • chrome • web-javascript • Google Chrome 86.0.4240.198
• Edge (web) • edge • web-javascript • Microsoft Edge 86.0.622.68
• No issues found!
Yes basically it doesn't work in release mode, I tried in the master branch after you mentioned and still no luck
also, I get this strange error in debug mode.
W/ConnectionTracker(21276): Exception thrown while unbinding
W/ConnectionTracker(21276): java.lang.IllegalArgumentException: Service not registered: lp@7bcf630
W/ConnectionTracker(21276): at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1766)
W/ConnectionTracker(21276): at android.app.ContextImpl.unbindService(ContextImpl.java:1810)
W/ConnectionTracker(21276): at android.content.ContextWrapper.unbindService(ContextWrapper.java:741)
W/ConnectionTracker(21276): at ci.f(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):1)
W/ConnectionTracker(21276): at ci.d(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):2)
W/ConnectionTracker(21276): at lq.D(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):10)
W/ConnectionTracker(21276): at lc.a(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):2)
W/ConnectionTracker(21276): at ee.run(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):3)
W/ConnectionTracker(21276): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
W/ConnectionTracker(21276): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
W/ConnectionTracker(21276): at ix.run(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):6)
Im not sure if it is related to this(tried solving this by addingcom.google.android.gms:play-services-basement:17.5.0 in build.gradle but these errors will still showup)
That is a known issue https://github.com/FirebaseExtended/flutterfire/issues/4090
Are any other error messages thrown when trying to set up crashlytics or at startup in general? Is this on emulator or physical?
No there are no other issues and I have tried this on Oneplus7Pro and Redmi note 6 Pro.
Labeling this because I'm not sure at this point what more could cause this.
Most helpful comment
Yes basically it doesn't work in release mode, I tried in the master branch after you mentioned and still no luck
also, I get this strange error in debug mode.
W/ConnectionTracker(21276): Exception thrown while unbinding W/ConnectionTracker(21276): java.lang.IllegalArgumentException: Service not registered: lp@7bcf630 W/ConnectionTracker(21276): at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:1766) W/ConnectionTracker(21276): at android.app.ContextImpl.unbindService(ContextImpl.java:1810) W/ConnectionTracker(21276): at android.content.ContextWrapper.unbindService(ContextWrapper.java:741) W/ConnectionTracker(21276): at ci.f(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):1) W/ConnectionTracker(21276): at ci.d(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):2) W/ConnectionTracker(21276): at lq.D(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):10) W/ConnectionTracker(21276): at lc.a(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):2) W/ConnectionTracker(21276): at ee.run(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):3) W/ConnectionTracker(21276): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462) W/ConnectionTracker(21276): at java.util.concurrent.FutureTask.run(FutureTask.java:266) W/ConnectionTracker(21276): at ix.run(:com.google.android.gms.dynamite_measurementdynamite@[email protected] (120400-0):6)Im not sure if it is related to this(tried solving this by adding
com.google.android.gms:play-services-basement:17.5.0inbuild.gradlebut these errors will still showup)