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

Importing a backup from Malopieds/Innertune crashes OuterTune forever #174

Open
4 tasks done
SekoiaTree opened this issue Dec 22, 2024 · 0 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@SekoiaTree
Copy link

Checklist

  • I am able to reproduce the bug with the latest debug version.
  • I've checked that there is no open or closed issue about this bug.
  • This issue contains only one bug.
  • The title of this issue accurately describes the bug.

Steps to reproduce the bug

  1. Install Malopieds/Innertune
  2. Use Backup/restore to create a backup
  3. Import said backup in OuterTune

Expected behavior

Import either fails ("incorrect format" error or similar) or succeeds

Actual behavior

OuterTune crashes, and whenever launched, immediately crashes again. It needs to be fully reset/reinstalled to work again.

Screenshots/Screen recordings

No response

Logs

12-22 20:10:37.632 13975 13975 E AndroidRuntime: FATAL EXCEPTION: main
12-22 20:10:37.632 13975 13975 E AndroidRuntime: Process: com.dd3boh.outertune, PID: 13975
12-22 20:10:37.632 13975 13975 E AndroidRuntime: java.lang.RuntimeException: Unable to create service com.dd3boh.outertune.playback.MusicService: java.lang.IllegalStateException: Migration didn't properly handle: song(com.dd3boh.outertune.db.entities.SongEntity).
12-22 20:10:37.632 13975 13975 E AndroidRuntime: Expected:
12-22 20:10:37.632 13975 13975 E AndroidRuntime: TableInfo{name='song', columns={date=Column{name='date', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, albumName=Column{name='albumName', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, year=Column{name='year', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, inLibrary=Column{name='inLibrary', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, albumId=Column{name='albumId', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, dateModified=Column{name='dateModified', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, totalPlayTime=Column{name='totalPlayTime', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, likedDate=Column{name='likedDate', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, title=Column{name='title', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, liked=Column{name='liked', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, isLocal=Column{name='isLocal', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='false'}, duration=Column{name='duration', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, localPath=Column{name='localPath', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, id=Column{name='id', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=1, defaultValue='undefined'}, thumbnailUrl=Column{name='thumbnailUrl', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}}, foreignKeys=[], indices=[Index{name='index_song_albumId', unique=false, columns=[albumId], orders=[ASC]'}]}
12-22 20:10:37.632 13975 13975 E AndroidRuntime: Found:
12-22 20:10:37.632 13975 13975 E AndroidRuntime: TableInfo{name='song', columns={id=Column{name='id', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=1, defaultValue='undefined'}, title=Column{name='title', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, duration=Column{name='duration', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, thumbnailUrl=Column{name='thumbnailUrl', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, albumId=Column{name='albumId', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, albumName=Column{name='albumName', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, liked=Column{name='liked', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, totalPlayTime=Column{name='totalPlayTime', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, inLibrary=Column{name='inLibrary', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}}, foreignKeys=[], indices=[Index{name='index_song_albumId', unique=false, columns=[albumId], orders=[ASC]'}]}
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at android.app.ActivityThread.handleCreateService(ActivityThread.java:4499)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at android.app.ActivityThread.-$$Nest$mhandleCreateService(Unknown Source:0)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2162)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at android.os.Looper.loopOnce(Looper.java:201)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at android.os.Looper.loop(Looper.java:288)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7932)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:942)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: Caused by: java.lang.IllegalStateException: Migration didn't properly handle: song(com.dd3boh.outertune.db.entities.SongEntity).
12-22 20:10:37.632 13975 13975 E AndroidRuntime: Expected:
12-22 20:10:37.632 13975 13975 E AndroidRuntime: TableInfo{name='song', columns={date=Column{name='date', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, albumName=Column{name='albumName', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, year=Column{name='year', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, inLibrary=Column{name='inLibrary', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, albumId=Column{name='albumId', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, dateModified=Column{name='dateModified', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, totalPlayTime=Column{name='totalPlayTime', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, likedDate=Column{name='likedDate', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, title=Column{name='title', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, liked=Column{name='liked', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, isLocal=Column{name='isLocal', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='false'}, duration=Column{name='duration', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, localPath=Column{name='localPath', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, id=Column{name='id', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=1, defaultValue='undefined'}, thumbnailUrl=Column{name='thumbnailUrl', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}}, foreignKeys=[], indices=[Index{name='index_song_albumId', unique=false, columns=[albumId], orders=[ASC]'}]}
12-22 20:10:37.632 13975 13975 E AndroidRuntime: Found:
12-22 20:10:37.632 13975 13975 E AndroidRuntime: TableInfo{name='song', columns={id=Column{name='id', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=1, defaultValue='undefined'}, title=Column{name='title', type='TEXT', affinity='2', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, duration=Column{name='duration', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, thumbnailUrl=Column{name='thumbnailUrl', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, albumId=Column{name='albumId', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, albumName=Column{name='albumName', type='TEXT', affinity='2', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}, liked=Column{name='liked', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, totalPlayTime=Column{name='totalPlayTime', type='INTEGER', affinity='3', notNull=true, primaryKeyPosition=0, defaultValue='undefined'}, inLibrary=Column{name='inLibrary', type='INTEGER', affinity='3', notNull=false, primaryKeyPosition=0, defaultValue='undefined'}}, foreignKeys=[], indices=[Index{name='index_song_albumId', unique=false, columns=[albumId], orders=[ASC]'}]}
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at A2.J.z(SourceFile:2421)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at O2.f.onUpgrade(SourceFile:15)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:416)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at O2.f.c(SourceFile:5)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at O2.f.e(SourceFile:64)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at O2.f.a(SourceFile:24)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at O2.g.getWritableDatabase(SourceFile:10)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at com.dd3boh.outertune.db.InternalDatabase.b(SourceFile:5)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at com.dd3boh.outertune.db.InternalDatabase.l(SourceFile:9)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at F3.f.u0(SourceFile:12)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at n3.D.call(SourceFile:561)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at J2.b.q(SourceFile:358)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at Z4.a.o(SourceFile:9)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at r5.N.run(SourceFile:113)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
12-22 20:10:37.632 13975 13975 E AndroidRuntime: at java.lang.Thread.run(Thread.java:1012)

OuterTune version

0.6.4

Device & Android version

Android 12, Fairphone 4

Additional information

It seems like if the DB migration fails, the app enters a broken state, which is just a general bug.

Examining the DBs, Malopieds' DB seems to only have 2 extra columns in playlist: "lastUpdateTime" and "createdAt". I manually edited the backup to remove those two columns and adjust the DB version, and it appears to have worked (I'm honestly surprised, totally expected a messup from me somewhere).

Unfortunately since the DB is in version 14 and version 14 is already used in OuterTune... supporting migration from it might be inconvenient.

@SekoiaTree SekoiaTree added the bug Something isn't working label Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant