Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Bug Error when submitting app to Google Play

Discussion in 'Android' started by Webagent, Apr 23, 2021.

  1. Webagent

    Webagent

    Joined:
    Feb 26, 2021
    Posts:
    10
    Sometimes when I upload an AAB file to the Google play store I get the following Error:

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


    I can still submit the app, but it's more than a warning. Google tells me that the app actually crashed with that error on some devices. What is odd is that I can resubmit and sometimes get the same error and sometimes none at all.

    In Unity build settings I request permission for WRITE_EXTERNAL_STORAGE to save screenshots. Not sure if that is related.

    Full Error
    Code (CSharp):
    1. FATAL EXCEPTION: latency_sensitive_executor-thread-0
    2. Process: com.google.android.apps.photos, PID: 25936
    3. java.lang.RuntimeException: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): , while compiling: SELECT id FROM media_store_extension WHERE POPULATED_COLUMNS != 134217726 OR DATE_MODIFIED = -1 OR FINGERPRINT IS NULL
    4.     at nqo.a(PG:3)
    5.     at aleu.run(PG:6)
    6.     at krv.a(PG:17)
    7.     at krw.run(Unknown Source:6)
    8.     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    9.     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    10.     at java.lang.Thread.run(Thread.java:764)
    11.     at ksa.run(PG:5)
    12. Caused by: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): , while compiling: SELECT id FROM media_store_extension WHERE POPULATED_COLUMNS != 134217726 OR DATE_MODIFIED = -1 OR FINGERPRINT IS NULL
    13.     at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
    14.     at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:890)
    15.     at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:501)
    16.     at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
    17.     at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
    18.     at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
    19.     at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
    20.     at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1392)
    21.     at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1239)
    22.     at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1110)
    23.     at agcm.a(PG:8)
    24.     at nog.a(PG:12)
    25.     at nqf.a(PG:5)
    26.     at _381.a(PG:248)
    27.     at npu.run(PG:61)
    28.     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
    29.     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    30.     ... 4 more
    It happens on a Xiaomi Redmi 6A device.
     
  2. Loksta8

    Loksta8

    Joined:
    Apr 19, 2021
    Posts:
    6
    I got the same thing on the exact same device. Mine is a Crash Error and not a Warning. Keep me posted on any solutions!
     
  3. Loksta8

    Loksta8

    Joined:
    Apr 19, 2021
    Posts:
    6
    Did you by chance add Google Play Game Services when this happened to you? I started getting these when I added GPGS plugin to my project.
     
  4. Vixxd

    Vixxd

    Joined:
    Jul 25, 2016
    Posts:
    11
    Hi there, also getting the same error via the console after adding 'take a screenshot and share' functionality via store asset plugin - did you find any solution? Also happening on Xiaomi Redmi 6A.

    Code (CSharp):
    1. java.lang.RuntimeException: android.database.sqlite.SQLiteException:
    2. no such table: media_store_extension (code 1): , while compiling:
    3. SELECT id FROM media_store_extension
    4. WHERE POPULATED_COLUMNS != 134217726 OR DATE_MODIFIED = -1 OR FINGERPRINT IS NULL
    Code (CSharp):
    1.  
    2. FATAL EXCEPTION: latency_sensitive_executor-thread-0
    3. Process: com.google.android.apps.photos, PID: 30260
    4. java.lang.RuntimeException: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): , while compiling: SELECT id FROM media_store_extension WHERE POPULATED_COLUMNS != 134217726 OR DATE_MODIFIED = -1 OR FINGERPRINT IS NULL
    5.    at nqo.a(PG:3)
    6.    at aleu.run(PG:6)
    7.    at krv.a(PG:17)
    8.    at krw.run(Unknown Source:6)
    9.    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    10.    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    11.    at java.lang.Thread.run(Thread.java:764)
    12.    at ksa.run(PG:5)
    13. Caused by: android.database.sqlite.SQLiteException: no such table: media_store_extension (code 1): , while compiling: SELECT id FROM media_store_extension WHERE POPULATED_COLUMNS != 134217726 OR DATE_MODIFIED = -1 OR FINGERPRINT IS NULL
    14.    at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
    15.    at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:890)
    16.    at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:501)
    17.    at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
    18.    at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
    19.    at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
    20.    at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
    21.    at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1392)
    22.    at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1239)
    23.    at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1110)
    24.    at agcm.a(PG:8)
    25.    at nog.a(PG:12)
    26.    at nqf.a(PG:5)
    27.    at _381.a(PG:248)
    28.    at npu.run(PG:61)
    29.    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
    30.    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    31.    ... 4 more
    32. FATAL EXCEPTION: latency_sensitive_executor-thread-1
    33. Process: com.google.android.apps.photos, PID: 30260
    34. 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
    35.    at nqo.a(PG:3)
    36.    at aleu.run(PG:6)
    37.    at krv.a(PG:17)
    38.    at krw.run(Unknown Source:6)
    39.    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
    40.    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
    41.    at java.lang.Thread.run(Thread.java:764)
    42.    at ksa.run(PG:5)
    43. 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
    44.    at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
    45.    at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:890)
    46.    at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:501)
    47.    at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
    48.    at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
    49.    at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
    50.    at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:46)
    51.    at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1392)
    52.    at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDatabase.java:1239)
    53.    at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:1110)
    54.    at agcm.a(PG:8)
    55.    at nnw.run(PG:17)
    56.    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
    57.    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    58.    ... 4 more
    59.  
     
  5. TEEBQNE

    TEEBQNE

    Joined:
    Jan 25, 2017
    Posts:
    88
    I am also experiencing this issue. I have not personally enabled any `take a screenshot and share` settings, but have added GPGS plugin to my project. I have not experienced this issue until today.
     
  6. Vixxd

    Vixxd

    Joined:
    Jul 25, 2016
    Posts:
    11
    After reading a StackOverflow post which said:
    I updated the aaptOptions of mainTemplate.gradle (Assets/Plugins/Android/mainTemplate.gradle) with
    noCompress 'db'
    , so it looked like:

    Code (CSharp):
    1.     aaptOptions {
    2.         ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    3.         noCompress 'db'
    4.     }**PACKAGING_OPTIONS**
    I also updated the External Dependency Manager for Unity from 1.2.164 to 1.2.165: https://github.com/googlesamples/unity-jar-resolver

    I can't say for 100% certain which change fixed it, but it was likely the gradle build change - but I thought I'd list both things I did here just in case. No errors now after uploading (as shown below in Screenshot):


    Hope that's helpful to someone.
     
  7. TEEBQNE

    TEEBQNE

    Joined:
    Jan 25, 2017
    Posts:
    88
    Thanks, Vixxd I'll be sure to try it out. In case anyone else wants to try this solution but has not enabled a custom main gradle template, go to Edit->Project Settings->Player->Publishing Settings->Check the box "Custom Main Gradle Template". Once done, the file will appear in the directory mentioned.
     
    Last edited: May 7, 2021
    Vixxd likes this.
  8. TEEBQNE

    TEEBQNE

    Joined:
    Jan 25, 2017
    Posts:
    88
    Just to confirm I edited my gradle template by adding the noCompress 'db and it appears to have worked. I will update my comment in case the issue comes back. Thanks!
     

    Attached Files:

    Vixxd likes this.
  9. Webagent

    Webagent

    Joined:
    Feb 26, 2021
    Posts:
    10
    I am also not seeing the error after doing the changes, will report back if it happens again.
    Thank you @Vixxd!
     
    Vixxd likes this.
  10. ngfilms

    ngfilms

    Joined:
    Nov 18, 2015
    Posts:
    22
    i am having the same issue with the same phone , i am now following the instructions listed here , to clarify,
    editing the main template.gradle , i am to replace this line:
    noCompress = ['.ress', '.resource', '.obb'] + unityStreamingAssets.tokenize(', ')
    with this line:
    noCompress 'db'

    really really clueless, thank you
     
  11. TEEBQNE

    TEEBQNE

    Joined:
    Jan 25, 2017
    Posts:
    88
    Seems the fix is not permanent as I have not changed the template after adding `noCompress 'db'`. Screen Shot 2021-08-29 at 5.28.54 PM.png
    What is rather odd is the crash only appears to happen occasionally. I have had multiple builds with no issues with this error, then randomly one will pop up with it again. The only phone to have this issue is the Xiaomi Redmi 6A. What is odd is without changing anything, I made an identical build except for incrementing build number and it passed. Does anyone else have the error pop up again? Or is no one else experiencing it again with the change to the main gradle?
     
  12. Damast

    Damast

    Joined:
    Apr 25, 2019
    Posts:
    11
    Same error with my application, same device. But I havn't tried the main gradle fix yet
     
  13. smtea

    smtea

    Joined:
    May 29, 2015
    Posts:
    10
    just confirming I'm seeing the same too, every other device is fine but the Redmi 6a device randomly shows these crashes randomly, what's strange is in the video it appears to play fine and I don't even see these crashes/errors in my firebase crashlytics, it would be nice to know what's up and how to fix it without having to mess with manual gradle stuff though imo
     
  14. wavs

    wavs

    Joined:
    Feb 20, 2017
    Posts:
    6
    Same here in multiple projects. Always with Redmi 6A device.

    As mentioned in every stacktrace (at least for us), the crashed process is "com.google.android.apps.photos" which I presumed is the Android Photo app.

    Not an Android expert but I'm wondering if our projects are really the cause of the crash.
    Any thoughts about that? please
     
  15. TEEBQNE

    TEEBQNE

    Joined:
    Jan 25, 2017
    Posts:
    88
    I forgot to post here again. After release the crash should not happen. As you mentioned it is an error on Googles part and has nothing to do with your app.
     
    wavs likes this.
  16. wavs

    wavs

    Joined:
    Feb 20, 2017
    Posts:
    6
    Thank for your reply !
     
    TEEBQNE likes this.
  17. kaan0550

    kaan0550

    Joined:
    Jun 2, 2019
    Posts:
    6
    I have same problem here. I discovered something that might be related;
    I always use Nox for testing my games. I opened my app when Nox was trying to update Google Play Games app. Game got a crash.
    Update finished and after I opened the game 4 times more and I kept getting crashes everytime.
    I did not change anything but 5th try was fine.
    I got crashes all the time when app trying to connect Google Play Services.
    This case might be related with our problem. I hope this helps.
     
    Last edited: Jan 1, 2022
unityunity