cashapp/zipline

SQLiteReadOnlyDatabaseException in ZiplineLoader cache

Closed this issue · 2 comments

100% of these are on Android 13 from Samsung.

android.database.sqlite.SQLiteReadOnlyDatabaseException: attempt to write a readonly database (code 1032 SQLITE_READONLY_DBMOVED[1032])
        at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java:-2)
        at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:1015)
        at android.database.sqlite.SQLiteSession.execute(SQLiteSession.java:621)
        at android.database.sqlite.SQLiteStatement.execute(SQLiteStatement.java:47)
        at androidx.sqlite.db.framework.FrameworkSQLiteStatement.execute(FrameworkSQLiteStatement:34)
        at com.squareup.sqldelight.android.AndroidPreparedStatement.execute(AndroidPreparedStatement:220)
        at com.squareup.sqldelight.android.AndroidSqliteDriver$execute$2.invoke(AndroidSqliteDriver:142)
        at com.squareup.sqldelight.android.AndroidSqliteDriver$execute$2.invoke(AndroidSqliteDriver:142)
        at com.squareup.sqldelight.android.AndroidSqliteDriver.execute(AndroidSqliteDriver:127)
        at com.squareup.sqldelight.android.AndroidSqliteDriver.execute(AndroidSqliteDriver:142)
        at app.cash.zipline.loader.internal.cache.ziplineloader.FilesQueriesImpl.update(FilesQueriesImpl:462)
        at app.cash.zipline.loader.ZiplineCache.read(ZiplineCache:173)
        at app.cash.zipline.loader.ZiplineLoader.loadFromLocal(ZiplineLoader:282)
        at app.cash.zipline.loader.ZiplineCache.unpinManifest$zipline_loader_release(ZiplineCache:282)
        at app.cash.zipline.loader.internal.fetcher.FsCachingFetcher.unpin(FsCachingFetcher:58)
        at app.cash.zipline.loader.ZiplineLoader.loadFromNetwork(ZiplineLoader:243)
        at app.cash.zipline.loader.ZiplineLoader.access$loadFromNetwork(ZiplineLoader:57)
        at app.cash.zipline.loader.ZiplineLoader$loadFromNetwork$1.invokeSuspend(Unknown:20)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(BaseContinuationImpl:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask:108)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
        at java.lang.Thread.run(Thread.java:1012)

I fixed it at the callsite: cashapp/redwood#1612

Probably also worth noting that in some Zipline docs.

No further action planned on this.