plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

[Question]: Crash trace found at Crashlytics unregisterNetworkCallback

Open nikorehnback opened this issue 1 year ago • 0 comments

What is your question?

Hi,

I found existing bug ticket of the similar issue: https://github.com/fluttercommunity/plus_plugins/issues/1025

However, I cannot reproduce the bug, have only bunch of traces in Crashlytics for Android 11-14. I have been trying to look source code and understand in which scenario this could happen, but it remains unclear.

Also found this where exception was happening and workaround was made to catch the error: https://android-review.googlesource.com/c/platform/frameworks/support/+/828360/1/work/workmanager/src/main/java/androidx/work/impl/constraints/trackers/NetworkStateTracker.java

Any guidance how to proceed with this?

If ConnectivityBroadcastReceiver would catch the exception, any ideas what harm could that cause?

       at android.net.ConnectivityManager.unregisterNetworkCallback(ConnectivityManager.java:5083)
       at nj.c.e(SourceFile:13)
       at nj.e.b(SourceFile:14)
       at nj.e.onDetachedFromEngine()
       at io.flutter.embedding.engine.c.t(SourceFile:123)
       at io.flutter.embedding.engine.c.u(SourceFile:17)
       at io.flutter.embedding.engine.c.v(SourceFile:12)
       at io.flutter.embedding.engine.c.i(SourceFile:11)
       at io.flutter.embedding.engine.a.g(SourceFile:32)
       at io.flutter.embedding.android.c.u(SourceFile:106)
       at io.flutter.embedding.android.g.onDetach(SourceFile:15)
       at androidx.fragment.app.Fragment.performDetach(SourceFile:7)
       at androidx.fragment.app.i0.i(SourceFile:34)
       at androidx.fragment.app.i0.m(SourceFile:289)
       at androidx.fragment.app.r0$b.e(SourceFile:6)
       at androidx.fragment.app.r0$c.d(SourceFile:17)
       at androidx.fragment.app.r0.n(SourceFile:231)
       at androidx.fragment.app.FragmentManager.dispatchStateChange(SourceFile:33)
       at androidx.fragment.app.FragmentManager.dispatchDestroy(SourceFile:14)
       at androidx.fragment.app.s.f(:4)
       at androidx.fragment.app.FragmentActivity.onDestroy(SourceFile:6)
       at android.app.Activity.performDestroy(Activity.java:9019)
       at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1491)
       at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5748)
       at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5793)
       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:180)
       at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:98)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2567)
       at android.os.Handler.dispatchMessage(Handler.java:111)
       at android.os.Looper.loopOnce(Looper.java:242)
       at android.os.Looper.loop(Looper.java:362)
       at android.app.ActivityThread.main(ActivityThread.java:8448)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:992)
        

### Checklist before submitting a question

- [X] I searched issues in this repository and couldn't find such bug/problem
- [X] I Google'd a solution and I couldn't find it
- [X] I searched on StackOverflow for a solution and I couldn't find it
- [X] I read the README.md file of the plugin
- [X] I am using the latest version of the plugin
- [X] All dependencies are up to date with `flutter pub upgrade`
- [X] I did a `flutter clean`
- [X] I tried running the example project

nikorehnback avatar Jun 19 '24 03:06 nikorehnback