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

Music loading failed / Android 8 #95

Closed
mrj976 opened this issue Mar 7, 2022 · 3 comments
Closed

Music loading failed / Android 8 #95

mrj976 opened this issue Mar 7, 2022 · 3 comments
Labels
bug Something isn't working music Related to music loading

Comments

@mrj976
Copy link

mrj976 commented Mar 7, 2022

I get "Music loading failed" error on Android 8

Steps:

  • Install app
  • Press "Allow" for the storage permission prompt
  • App says "Music Loading failed"
  • Retry does nothing

When I test on Android 11 And 12, everything is OK and the songs load without error, but when I tested on Android 8, I encountered this problem.

Device: Xiaomei
Model: Redmi 6A
Android: 8.1

Log:

E/Auxio.MusicStore: Music loading failed.
E/Auxio.MusicStore: android.database.sqlite.SQLiteException: no such column: cd_track_number (code 1): , while compiling: SELECT _id, title, _display_name, cd_track_number, duration, year, album, album_id, artist, album_artist FROM audio WHERE (is_music=1)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:179)
        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
        at android.content.ContentProviderProxy.query(ContentProviderNative.java:418)
        at android.content.ContentResolver.query(ContentResolver.java:754)
        at android.content.ContentResolver.query(ContentResolver.java:704)
        at android.content.ContentResolver.query(ContentResolver.java:662)
        at org.oxycblt.auxio.music.MusicLoader.loadSongs(MusicLoader.kt:134)
        at org.oxycblt.auxio.music.MusicLoader.load(MusicLoader.kt:85)
        at org.oxycblt.auxio.music.MusicStore.load(MusicStore.kt:72)
        at org.oxycblt.auxio.music.MusicStore.access$load(MusicStore.kt:41)
        at org.oxycblt.auxio.music.MusicStore$Companion$initInstance$response$1.invokeSuspend(MusicStore.kt:149)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:39)
        at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
@mrj976 mrj976 added the bug Something isn't working label Mar 7, 2022
@OxygenCobalt
Copy link
Owner

Does 2.2.1 work? If that's the case, then this is actually an in-dev issue. Seems like I accidentally used a media database field only supported on Android 10 and higher [whoops].

OxygenCobalt added a commit that referenced this issue Mar 7, 2022
Fix a crash that stemmed from the use of the API 30+ database field
CD_TRACK_NUMBER.

I switched to CD_TRACK_NUMBER in 1e39ceb to fix [#88], however I did
not realize that CD_TRACK_NUMBER was actually only supported on API
30 onwards. This led to a load failure on versions before API 30.
@OxygenCobalt OxygenCobalt added the music Related to music loading label Mar 8, 2022
@mrj976
Copy link
Author

mrj976 commented Mar 8, 2022

Does 2.2.1 work? If that's the case, then this is actually an in-dev issue. Seems like I accidentally used a media database field only supported on Android 10 and higher [whoops].

Thanks. The problem was solved

@OxygenCobalt
Copy link
Owner

Cool. Thanks for reporting this before I accidentally broke the app on a bunch of devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working music Related to music loading
Projects
None yet
Development

No branches or pull requests

2 participants