Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.lang.RuntimeException: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): ,

i'm having a problem to publish my app on the play store after october 2021, the error says that the table media_store_extension doesn't exist. The thing is: i don't use SQLITE on the project, so i have no idea what may be causing this exception.

The target sdk is 30, and de minimun is 26

The full error:

FATAL EXCEPTION: latency_sensitive_executor-thread-1
Process: com.google.android.apps.photos, PID: 29478
java.lang.RuntimeException: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): , while compiling: SELECT id FROM media_store_extension ORDER BY id DESC LIMIT 100 OFFSET 0
    at nqo.a(PG:3)
    at aleu.run(PG:6)
    at krv.a(PG:17)
    at krw.run(Unknown Source:6)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    at java.lang.Thread.run(Thread.java:764)
    at ksa.run(PG:5)
Caused by: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): , while compiling: SELECT id FROM media_store_extension ORDER BY id DESC LIMIT 100 OFFSET 0
    at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
    at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:890)
    at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:501)
    at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
    at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
    at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
    at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
    at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1392)
    at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1239)
    at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1110)
    at agcm.a(PG:8)
    at nnw.run(PG:17)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    ... 4 more
like image 738
William Secchi Avatar asked Nov 10 '21 19:11

William Secchi


2 Answers

This error is reported not only from Flutter developers, but also from Unity (https://forum.unity.com/threads/getting-an-odd-error-in-internal-android-build-after-updating-iap.1104352/ and https://forum.unity.com/threads/error-when-submitting-app-to-google-play.1098139/) and in my case - for a native android app.

We first got this error 6 months ago and applied the fix that was suggested by the unity guys:

aaptOptions {
    noCompress 'db'
    ...
}

However, yesterday we received the same error again, so the "fix" did not work for us.

The error occurs:

  1. (so far) only during internal testing
  2. only on Xiaomi Redmi 6A.
  3. from time to time(it is not reproduced each time)
  4. always in process com.google.android.apps.photos

The most reasonable explanation that I have seen so far is that the exception occurs when the testing bot attempts to take a screenshot.

This explains why the process is Google Photos', why the error is not reproduced each time and why it is "fixed" by just resubmitting a new build.

This also means that just ignoring the error should be OK.

like image 50
M.Paunov Avatar answered Nov 21 '22 11:11

M.Paunov


My suspicion is that this is an issue with the configuration / installation of that particular Xiaomi Redmi 6A what Google uses for the pre-launch report. There are just too many reports coming from all over the board from all kinds of various apps (for example also see https://github.com/airsdk/Adobe-Runtime-Support/issues/1376 which is yet another tech stack on Android, just like Unity or Flutter). I don't have any concrete evidence, but this is my gut feeling looking at everything.

Therefore I wouldn't do any Gradle aapt configuration voodoo or ADT patching or anything like that.

like image 24
Csaba Toth Avatar answered Nov 21 '22 11:11

Csaba Toth