I have lots of links in my app, I have used the Firebase database for data fetch and data send and also used broadcast receiver.

Most of the time my app is not crashing with these errors, but sometimes it crashed. When it crashed, I opened the logcat the I found this

2022-04-22 02:22:46.387 1260-1445/? E/WifiVendorHal: getWifiLinkLayerStats_1_3_Internal(l.974) failed {.code = ERROR_NOT_SUPPORTED, .description = }



2022-04-22 02:32:18.834 18124-18124/? E/A: Task 255 failed or timed out. Client 79711845498329053 disconnecting from SearchService!
    java.util.concurrent.CancellationException: Task was cancelled.
        at com.google.common.util.concurrent.d.s(PG:3)
        at com.google.common.util.concurrent.d.get(PG:4)
        at com.google.common.util.concurrent.eb.a(PG:1)
        at com.google.common.util.concurrent.ci.r(PG:2)
        at com.google.common.util.concurrent.cb.run(PG:4)
        at com.google.android.apps.gsa.shared.util.c.a.ba.run(PG:1)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:246)
        at android.app.ActivityThread.main(ActivityThread.java:8653)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
2022-04-22 02:32:18.838 18124-18124/? E/A: Task 255 failed or timed out. Client 79711845498329051 disconnecting from SearchService!
    java.util.concurrent.CancellationException: Task was cancelled.
        at com.google.common.util.concurrent.d.s(PG:3)
        at com.google.common.util.concurrent.d.get(PG:4)
        at com.google.common.util.concurrent.eb.a(PG:1)
        at com.google.common.util.concurrent.ci.r(PG:2)
        at com.google.common.util.concurrent.cb.run(PG:4)
        at com.google.android.apps.gsa.shared.util.c.a.ba.run(PG:1)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:246)
        at android.app.ActivityThread.main(ActivityThread.java:8653)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)
2022-04-22 02:32:18.850 18124-17677/? E/BgTaskExecutorImpl: PERIODIC background task MDD_CELLULAR_CHARGING_TASK was cancelled.
    java.util.concurrent.CancellationException: Task was cancelled.
        at com.google.common.util.concurrent.d.s(PG:3)
        at com.google.common.util.concurrent.d.get(PG:4)
        at com.google.common.util.concurrent.eb.a(PG:1)
        at com.google.common.util.concurrent.ci.r(PG:2)
        at com.google.common.util.concurrent.cb.run(PG:4)
        at com.google.android.apps.gsa.shared.util.c.a.cf.b(PG:1)
        at com.google.android.apps.gsa.shared.util.c.a.ci.run(PG:1)
        at com.google.android.libraries.i.ae.run(PG:1)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at com.google.android.libraries.i.i.run(PG:2)
        at com.google.android.libraries.i.p.run(PG:4)
        at java.lang.Thread.run(Thread.java:923)
2022-04-22 02:32:18.857 18124-17615/? E/BgTaskExecutorImpl: PERIODIC background task MDD_WIFI_CHARGING_TASK was cancelled.
    java.util.concurrent.CancellationException: Task was cancelled.
        at com.google.common.util.concurrent.d.s(PG:3)
        at com.google.common.util.concurrent.d.get(PG:4)
        at com.google.common.util.concurrent.eb.a(PG:1)
        at com.google.common.util.concurrent.ci.r(PG:2)
        at com.google.common.util.concurrent.cb.run(PG:4)
        at com.google.android.apps.gsa.shared.util.c.a.cf.b(PG:1)
        at com.google.android.apps.gsa.shared.util.c.a.ci.run(PG:1)
        at com.google.android.libraries.i.ae.run(PG:1)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at com.google.android.libraries.i.i.run(PG:2)
        at com.google.android.libraries.i.p.run(PG:4)
        at java.lang.Thread.run(Thread.java:923)

sometimes it shows this also

    2022-04-22 09:28:15.894 1928-2047/? E/TaskPersister: File error accessing recents directory (directory doesn't exist?).

2022-04-22 09:49:15.232 21150-21150/ W/System.err:     at w.Internet_Checker_BroadCast_Reciver.onReceive(Internet_Checker_BroadCast_Reciver.java:27)

I have studied it more. I found a thing , when the app is crashing the logcat prints as the last line is(will it be the reason?) :

2022-04-22 12:22:25.941 17481-17552/w D/OneSignal: UserStateSynchronizer internalSyncUserState from session call: false jsonBody: null
0

There are 0 answers