flutterfire icon indicating copy to clipboard operation
flutterfire copied to clipboard

🐛 [firebase_crashalytics] App Crashes on minimize after configuring Firebase Crashalytics & Analytics

Open hungryemon opened this issue 1 year ago • 6 comments

Whenever app is minimized it crashes in some devices.

There is no clear trace/description of what causing it. This issue started happening after configuring firebase crashalytics & analytics The log from crashalytics dashboard is given below:

Fatal Exception: kd.o: An operation is not implemented: Not yet implemented
       at xb.a.onDetachedFromActivity(:10)
       at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.detachFromActivity(:59)
       at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDetach(:58)
       at io.flutter.embedding.android.FlutterActivity.onDestroy(:18)
       at android.app.Activity.performDestroy(Activity.java:8405)
       at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1379)
       at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5587)
       at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5633)
       at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:47)
       at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
       at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2345)
       at android.os.Handler.dispatchMessage(Handler.java:106)
       at android.os.Looper.loopOnce(Looper.java:233)
       at android.os.Looper.loop(Looper.java:344)
       at android.app.ActivityThread.main(ActivityThread.java:8210)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)

Libraries Used:

firebase_core: ^1.19.1 firebase_analytics: ^9.1.12 firebase_crashlytics: ^2.8.4 firebase_messaging: ^11.4.4

flutter version : 2.10.4 dart version: 2.16.2

hungryemon avatar Jul 17 '22 04:07 hungryemon

Thanks for the report @hungryemon Looking at the error log you shared, it doesn't seem to be coming from either of the flutterfire plugins you mentioned, but seems to be coming from core flutter code when app goes into background. Is that the only log you get, or is there more that possibly shows crashlytics plugin related entry ? If not, then this possibly isn't a firebase_crashlytics issue.

Also, which devices does this error occur on ? Are you reliably able to replicate it locally after adding said plugins ?

darshankawar avatar Jul 18 '22 07:07 darshankawar

sorry for the delayed reply.

Crashlytics report could not be enqueued to DataTransport
    java.lang.IllegalArgumentException: Log tag "TRuntime.SQLiteEventStore" exceeds limit of 23 characters

This log will make things clearer.

hungryemon avatar Jul 25 '22 09:07 hungryemon

Thanks for this log. It indicates, you are probably using lesser version of Android BoM or firebase_crashlytics in your project is still pointing to lesser version of Android BoM. Current version is 30.3.0, so make sure the plugin is pointing to latest BoM version and not an older one.

See similar issue raised for firebase_messaging https://github.com/firebase/flutterfire/issues/8817 for which the Android version was bumped.

Latest Android BoM version that recently was bumped : https://github.com/firebase/flutterfire/pull/9161

darshankawar avatar Jul 26 '22 11:07 darshankawar

What is the process to update BoM version in Flutter?

hungryemon avatar Jul 31 '22 03:07 hungryemon

We don't need to explicitly update or do anything. Usually the core firebase plugin, ie, firebase_core is updated with latest BoM release, which is needed along with other firebase plugins for our firebase integration project to work correctly with Flutter.

I see that firebase_core is already updated to latest BoM version:

https://github.com/firebase/flutterfire/blob/master/packages/firebase_core/firebase_core/android/gradle.properties

So you just need to make sure you are using latest firebase_core plugin version and you are on latest stable version (3.0.5). https://pub.dev/packages/firebase_core/changelog#1200

darshankawar avatar Aug 01 '22 11:08 darshankawar

Hey @hungryemon. 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!

google-oss-bot avatar Aug 10 '22 01:08 google-oss-bot

Since there haven't been any recent updates here, I am going to close this issue.

@hungryemon 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.

google-oss-bot avatar Aug 19 '22 01:08 google-oss-bot