Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration error after updating to 0.21.10 #7144

Closed
4 tasks done
pinembour opened this issue Sep 22, 2021 · 3 comments
Closed
4 tasks done

Migration error after updating to 0.21.10 #7144

pinembour opened this issue Sep 22, 2021 · 3 comments
Labels
bug Issue is related to a bug

Comments

@pinembour
Copy link

Checklist

Steps to reproduce the bug

  1. Update to latest version 0.21.10 from 0.21.9
  2. Open the app

Actual behavior

The app crashes with the error log below.

Expected behavior

The app doesn't crash.

Logs

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: FR
  • Content Language: fr
  • App Language: fr_FR
  • Service: none
  • Version: 0.21.10
  • OS: Linux Android 11 - 30
Crash log

java.lang.IllegalStateException: Migration didn't properly handle: feed_group(org.schabi.newpipe.database.feed.model.FeedGroupEntity).
 Expected:
TableInfo{name='feed_group', columns={name=Column{name='name', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=0, defaultValue='null'}, uid=Column{name='uid', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=1, defaultValue='null'}, icon_id=Column{name='icon_id', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='null'}, sort_order=Column{name='sort_order', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='null'}}, foreignKeys=[], indices=[Index{name='index_feed_group_sort_order', unique=false, columns=[sort_order]}]}
 Found:
TableInfo{name='feed_group', columns={uid=Column{name='uid', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=1, defaultValue='null'}, name=Column{name='name', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=0, defaultValue='null'}, icon_id=Column{name='icon_id', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='null'}, sort_order=Column{name='sort_order', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='0'}}, foreignKeys=[], indices=[]}
	at androidx.room.RoomOpenHelper.onUpgrade(RoomOpenHelper.java:103)
	at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onUpgrade(FrameworkSQLiteOpenHelper.java:177)
	at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:416)
	at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316)
	at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:145)
	at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:106)
	at androidx.room.RoomDatabase.internalBeginTransaction(RoomDatabase.java:482)
	at androidx.room.RoomDatabase.beginTransaction(RoomDatabase.java:471)
	at org.schabi.newpipe.database.playlist.dao.PlaylistStreamDAO_Impl$9.call(PlaylistStreamDAO_Impl.java:445)
	at org.schabi.newpipe.database.playlist.dao.PlaylistStreamDAO_Impl$9.call(PlaylistStreamDAO_Impl.java:442)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromCallable.subscribeActual(MaybeFromCallable.java:47)
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
	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:402)
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableObserveOn$BaseObserveOnSubscriber.run(FlowableObserveOn.java:176)
	at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker$BooleanRunnable.run(ExecutorScheduler.java:322)
	at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker.runEager(ExecutorScheduler.java:287)
	at io.reactivex.rxjava3.internal.schedulers.ExecutorScheduler$ExecutorWorker.run(ExecutorScheduler.java:248)
	at androidx.room.TransactionExecutor$1.run(TransactionExecutor.java:47)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:923)


@pinembour pinembour added the bug Issue is related to a bug label Sep 22, 2021
@pinembour
Copy link
Author

The issue also happens on a fresh install if I try to import this backup.
NewPipeData-20210804_160527.zip

@litetex
Copy link
Member

litetex commented Sep 30, 2021

@pinembour
Hi, thank you for the issue.
It seems like your database is damaged (pretty similar to #3299) and the app is just working fine (has nothing to do with the update directly).

On the right side is a normal/correct database (mine) on the left yours:
grafik

I think I managed to repair it, checkout:
NewPipeData-20210804_160527_fixed.zip

@litetex litetex added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Sep 30, 2021
@pinembour
Copy link
Author

Thank you, with the fixed export everything seems to work fine.
I have no idea however how the database got corrupted.

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Oct 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug
Projects
None yet
Development

No branches or pull requests

2 participants