OxygenCobalt / Auxio

A simple, rational music player for android
GNU General Public License v3.0
1.8k stars 118 forks source link

Error music loading failed #682

Closed nosson-p closed 4 months ago

nosson-p commented 4 months ago

Describe the Bug/Crash

Music loading failed

Describe the intended behavior

Show all my music

What android version do you use?

Android 14

What device model do you use?

Pixel 5

Bug report

android.database.sqlite.SQLiteException: near "OR": syntax error (code 1 SQLITE_ERROR): , while compiling: SELECT _id, date_added, date_modified, _size, duration, mime_type, title, year, album, album_id, artist, album_artist, _display_name, volume_name, relative_path, cd_track_number, disc_number FROM audio WHERE ((((is_pending=0 AND NOT _modifier=4) OR (is_pending=1 AND lower(_data) NOT REGEXP '.*/.pending-(\d+)-([^/]+)$' AND owner_package_name IN ( 'org.oxycblt.auxio' )))) AND (is_trashed=0) AND (volume_name IN ( 'external_primary' ))) AND (NOT _size=0 AND is_music=1 AND ( OR (volume_name LIKE ? AND relative_path LIKE ?))) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:186) at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:142) at android.content.ContentProviderProxy.query(ContentProviderNative.java:495) at android.content.ContentResolver.query(ContentResolver.java:1229) at android.content.ContentResolver.query(ContentResolver.java:1161) at android.content.ContentResolver.query(ContentResolver.java:1117) at org.oxycblt.auxio.music.fs.StorageUtilKt.safeQuery(Unknown Source:6) at org.oxycblt.auxio.music.fs.MediaStoreExtractorImpl.query(SourceFile:369) at org.oxycblt.auxio.music.MusicRepositoryImpl$indexImpl$mediaStoreQueryJob$1.invokeSuspend(SourceFile:37) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:8) at kotlinx.coroutines.DispatchedTask.run(Unknown Source:94) at androidx.fragment.app.Fragment$4.run(SourceFile:43) at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:92)

Duplicates

Chzy2018 commented 4 months ago

I also had this problem when I just updated from 3.3.1 to 3.3.3. Loading the music immediately after updating also showed a failure, and backtracking the version to 3.3.1 or 3.3.0 didn't work. In the end I cleared all data except the installation files and my music was successfully added.

OxygenCobalt commented 4 months ago

Duplicate of #667. @Chzy2018 it's weird you say you could reproduce this on 3.3.3. What was your music folder configuration before you wiped the app?

Chzy2018 commented 4 months ago

I had a dedicated folder where I store my music, so I configed the software to only scan my music library. However, before wiping the app, it displayed a loading failure and retrying did not yield any results. That's why I attempted both downgrading and erasing, and it turned out that only the wiping option was effective.

OxygenCobalt commented 4 months ago

Okay, and was the error information this exact syntax error @Chzy2018? Or did you not check?

This particular error only shows up when you have several music folders.

Chzy2018 commented 4 months ago

So sorry I did not check the error information. I was in a hurry rediscovering my music, so I wiped the app.

OxygenCobalt commented 4 months ago

That's frustrating. I can't do anything to fix this if you don't report the error information, sadly. Please do that next time if you can @Chzy2018.

Chzy2018 commented 4 months ago

Okay, I will. Thank you.

nosson-p commented 4 months ago

Ya cleared data and everything worked