libre-tube / LibreTube

An alternative frontend for YouTube, for Android.
https://libretube.dev
GNU General Public License v3.0
8.74k stars 445 forks source link

Automatic close #1927

Closed KalpanaChetan closed 1 year ago

KalpanaChetan commented 1 year ago

Steps to reproduce

No

Expected behavior

Open

Actual behavior

Automatic close

LibreTube version

0.8.0

Android version

8

Other details

After install app always close automatically when first time open This happen only once

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(RoomDatabase.java:30) at androidx.room.RoomDatabase.beginTransaction(RoomDatabase.java:1) at com.github.libretube.db.dao.WatchHistoryDao_Impl.delete(WatchHistoryDao_Impl.java:8) at com.github.libretube.ui.adapters.WatchHistoryAdapter.removeFromWatchHistory(WatchHistoryAdapter.kt:17) at com.github.libretube.ui.adapters.WatchHistoryAdapter$$ExternalSyntheticLambda1.onClick(R8$$SyntheticClass:10) at android.view.View.performClick(View.java:6897) at android.view.View$PerformClick.run(View.java:26103) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6944) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)

Acknowledgements

Bnyro commented 1 year ago

Dupe of #1919