celzero / rethink-app

DNS over HTTPS / DNS over Tor / DNSCrypt client, WireGuard proxifier, firewall, and connection tracker for Android.
https://rethinkfirewall.com/
Apache License 2.0
3.03k stars 154 forks source link

v055o: IllegalStateException: Fragment RethinkPlusFragment not attached to a context #1782

Open ignoramous opened 1 week ago

ignoramous commented 1 week ago

Surprisingly the Fragment hit an exception when the app was in the background (not foreground).

11-12 07:25:07.345 11111 11111 E AndroidRuntime: Process: com.celzero.bravedns, PID: 11111
11-12 07:25:07.345 11111 11111 E AndroidRuntime: java.lang.IllegalStateException: Fragment RethinkPlusFragment{425de0b} (2564023d-33fa-441d-af9d-02cd0a32307c) not attached to a context.
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at androidx.fragment.app.Fragment.requireContext(Fragment.java:977)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at com.celzero.bravedns.ui.fragment.RethinkPlusFragment$billingListener$1.onConnectionResult(RethinkPlusFragment.kt:486)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at com.celzero.bravedns.iab.InAppBillingHandler$initiate$1.invoke(InAppBillingHandler.kt:116)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at com.celzero.bravedns.iab.InAppBillingHandler$initiate$1.invoke(InAppBillingHandler.kt:115)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at com.celzero.bravedns.iab.InAppBillingHandler$onConnectionResultMain$1.invokeSuspend(InAppBillingHandler.kt:141)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at android.os.Handler.handleCallback(Handler.java:958)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at android.os.Handler.dispatchMessage(Handler.java:99)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at android.os.Looper.loopOnce(Looper.java:257)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at android.os.Looper.loop(Looper.java:368)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at android.app.ActivityThread.main(ActivityThread.java:8839)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at java.lang.reflect.Method.invoke(Native Method)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)
11-12 07:25:07.345 11111 11111 E AndroidRuntime: >--Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@91a2054, Dispatchers.Main]