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

crash when deleting item from watch history #2018

Closed teamblubee closed 1 year ago

teamblubee commented 1 year ago

Steps to reproduce

go to library click watch history click the trash can icon to delete an item from the watch history

you'll get a crash, log below.

Expected behavior

not crash

Actual behavior

crash

LibreTube version

latest from f droid

Android version

Android 12

Other details

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:7814) at android.view.View.performClickInternal(View.java:7791) at android.view.View.access$3800(View.java:910) at android.view.View$PerformClick.run(View.java:30419) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8855) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)

Acknowledgements

NeeRaj-2401 commented 1 year ago

Already Fixed in #1955

u can try debug version or wait for next release

teamblubee commented 1 year ago

Already Fixed in #1955

u can try debug version or wait for next release

is there a way to get a more up to date app? Do I need to manually download from github releases or fdroid will be updated shortly?

NeeRaj-2401 commented 1 year ago

is there a way to get a more up to date app?

No, there is just a debug version for every build (u can find that in "actions" tab) So that user's can TEST whether the issue has been resolved or not before actual new RELEASE of app

teamblubee commented 1 year ago

is there a way to get a more up to date app?

No, there is just a debug version for every build (u can find that in "actions" tab) So that user's can TEST whether the issue has been resolved or not before actual new RELEASE of app

okay, thank you for the clarification.

NeeRaj-2401 commented 1 year ago

As this is already fixed.. u can close it