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

No such column: genre nor genre_id #32

Closed
Nidal-Bakir opened this issue Sep 26, 2021 · 0 comments · Fixed by #33
Closed

No such column: genre nor genre_id #32

Nidal-Bakir opened this issue Sep 26, 2021 · 0 comments · Fixed by #33
Labels
P: Android Only android platform PRI: High Needs to be resolved sooner than other issues (Critical to plugin function) T: Bug Something isn't working

Comments

@Nidal-Bakir
Copy link

Nidal-Bakir commented Sep 26, 2021

https://github.com/LucasPJS/on_audio_query/blob/026501548a108808a863167b0e94dad4967fbb56/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/query/OnAudiosQuery.kt#L81

https://github.com/LucasPJS/on_audio_query/blob/026501548a108808a863167b0e94dad4967fbb56/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/utils/OnCursorProjections.kt#L28

https://github.com/LucasPJS/on_audio_query/blob/026501548a108808a863167b0e94dad4967fbb56/on_audio_query/android/src/main/kotlin/com/lucasjosino/on_audio_query/utils/OnCursorProjections.kt#L29

I think we need to check the SDK version before using those?
the error occurs on android 9.0.

E/AndroidRuntime( 9376): android.database.sqlite.SQLiteException: no such column: genre (code 1 SQLITE_ERROR): , while compiling: SELECT _data, _display_name, _id, _size, album, album_artist, album_id, artist, artist_id, bookmark, composer, date_added, date_modified, duration, title, track, year, genre, genre_id, is_alarm, is_audiobook, is_music, is_notification, is_podcast, is_ringtone FROM audio ORDER BY date_added DESC
E/AndroidRuntime( 9376): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:179)
E/AndroidRuntime( 9376): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
E/AndroidRuntime( 9376): at android.content.ContentProviderProxy.query(ContentProviderNative.java:418)
E/AndroidRuntime( 9376): at android.content.ContentResolver.query(ContentResolver.java:802)
E/AndroidRuntime( 9376): at android.content.ContentResolver.query(ContentResolver.java:752)
E/AndroidRuntime( 9376): at android.content.ContentResolver.query(ContentResolver.java:710)
E/AndroidRuntime( 9376): at com.lucasjosino.on_audio_query.query.OnAudiosQuery$loadSongs$2.invokeSuspend(OnAudiosQuery.kt:81)
E/AndroidRuntime( 9376): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/AndroidRuntime( 9376): at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
E/AndroidRuntime( 9376): at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
E/AndroidRuntime( 9376): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
E/AndroidRuntime( 9376): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
E/AndroidRuntime( 9376): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
I/Process ( 9376): Sending signal. PID: 9376 SIG: 9

flutter version: Flutter 2.5.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ffb2ecea52 (9 days ago) • 2021-09-17 15:26:33 -0400
Engine • revision b3af521a05
Tools • Dart 2.14.2

package version: ^2.3.0

@LucJosin LucJosin added P: Android Only android platform PRI: High Needs to be resolved sooner than other issues (Critical to plugin function) S: Fixing This issue will be fixed soon T: Bug Something isn't working labels Sep 27, 2021
@LucJosin LucJosin mentioned this issue Sep 27, 2021
@LucJosin LucJosin linked a pull request Sep 27, 2021 that will close this issue
@LucJosin LucJosin added S: Fixed and removed S: Fixing This issue will be fixed soon labels Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: Android Only android platform PRI: High Needs to be resolved sooner than other issues (Critical to plugin function) T: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants