App crash after opening an article from notification menu
Closed this issue · 1 comments
Describe the bug
App crash after opening an article from the notification menu after receiving a new article.
To Reproduce
- Receive new article
- A notification will show up indicating that a new article is available.
- Click on the notification to open the article in Readrops .
- App crash with error
Expected behaviour
Click on notification and open Readrops with the article to read it.
Environment information:
- Account type: Freshrss
- App version: v2.0.1
- Android version: 14
** Error**
java.lang.IllegalStateException: Cannot access database on the main thread since it may potentially lock the UI for a long period of time.
at androidx.room.RoomDatabase.assertNotMainThread(SourceFile:36)
at androidx.room.RoomDatabase.query(Unknown Source:5)
at coil.util.-Lifecycles.query(SourceFile:12)
at com.readrops.app.MainActivity.access$handleIntent(SourceFile:301)
at com.readrops.app.MainActivity$handleIntent$1.invokeSuspend(Unknown Source:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:96)
at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(SourceFile:7)
at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.run(SourceFile:3)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8736)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ExecInit.main(ExecInit.java:50)
at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)