TeamNewPipe / NewPipe

A libre lightweight streaming front-end for Android.
https://newpipe.net
GNU General Public License v3.0
31.66k stars 3.07k forks source link

Newpipe crashes when trying to load using an exported database. #10007

Closed Skiestrixx closed 1 year ago

Skiestrixx commented 1 year ago

Checklist

Affected version

0.25.1

Steps to reproduce the bug

(I'm migrating from another device, Different android version old: android 10, new: android 12, but same versions)

  1. Go to settings, content, and then import database.
  2. Click ok to the popup "This override your current setup." and "Do you want to also import settings?".

Expected behavior

My bookmarked playlist, subscriptions, and Newpipe settings would load.

Actual behavior

The app crashes when I try to load.

Screenshots/Screen recordings

https://user-images.githubusercontent.com/90496866/230545224-2d46e860-3987-4a04-8497-c943426145c5.mp4

Logs



java.lang.IllegalStateException: A migration from 7 to 6 was required but not found. Please provide the necessary Migration path via RoomDatabase.Builder.addMigration(Migration ...) or allow for destructive migrations via one of the RoomDatabase.Builder.fallbackToDestructiveMigration* methods.
    at androidx.room.RoomOpenHelper.onUpgrade(RoomOpenHelper.java:117)
    at androidx.room.RoomOpenHelper.onDowngrade(RoomOpenHelper.java:129)
    at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onDowngrade(FrameworkSQLiteOpenHelper.java:194)
    at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:512)
    at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:413)
    at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:151)
    at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:112)
    at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:706)
    at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:483)
    at androidx.room.RoomDatabase.query(RoomDatabase.java:526)
    at androidx.room.util.DBUtil.query(DBUtil.java:86)
    at org.schabi.newpipe.database.playlist.dao.PlaylistRemoteDAO_Impl$6.call(PlaylistRemoteDAO_Impl.java:262)
    at org.schabi.newpipe.database.playlist.dao.PlaylistRemoteDAO_Impl$6.call(PlaylistRemoteDAO_Impl.java:259)
    at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromCallable.subscribeActual(MaybeFromCallable.java:47)
    at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5375)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableFlatMapMaybe$FlatMapMaybeSubscriber.onNext(FlowableFlatMapMaybe.java:131)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$ObserveOnSubscriber.runAsync(FlowableObserveOn.java:404)
    at io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:178)
    at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker$BooleanRunnable.run(ExecutorScheduler.java:324)
    at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker.runEager(ExecutorScheduler.java:289)
    at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker.run(ExecutorScheduler.java:250)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
    at java.lang.Thread.run(Thread.java:1012) 
    
    

Affected Android/Custom ROM version

Android 12 / One Ui 4.1

Affected device model

Samsung Galaxy A42 5g

Additional information

No response

SameenAhnaf commented 1 year ago

Importing database from a newer version is not supported. So, such a crash was expected.