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

SQLiteCantOpenDatabaseException in SQLiteDatabaseExtKt.queryAndMap #1434

Open
HonzaR opened this issue Apr 10, 2024 · 0 comments
Open

SQLiteCantOpenDatabaseException in SQLiteDatabaseExtKt.queryAndMap #1434

HonzaR opened this issue Apr 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@HonzaR
Copy link
Collaborator

HonzaR commented Apr 10, 2024

Describe the issue

Sometimes (under some conditions we don't know exactly yet), the SDK's SQLite database gets into a malformed data state. This state comes from SQLiteDatabaseExtKt.queryAndMap

This is related to #214 and #240.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

Expected behaviour

Actual behavior + errors

  • App Version:
  • Android Version:
  • Device: (if applies)

Any extra information that might be useful in the debugging process.

Fatal Exception: android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14 SQLITE_CANTOPEN)
       at android.database.sqlite.SQLiteConnection.nativeExecuteForCursorWindow(SQLiteConnection.java)
       at android.database.sqlite.SQLiteConnection.executeForCursorWindow(SQLiteConnection.java:1034)
       at android.database.sqlite.SQLiteSession.executeForCursorWindow(SQLiteSession.java:862)
       at android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:62)
       at android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:145)
       at android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:132)
       at android.database.AbstractCursor.moveToPosition(AbstractCursor.java:252)
       at cash.z.ecc.android.sdk.internal.db.SQLiteDatabaseExtKt$queryAndMap$2.invokeSuspend(SQLiteDatabaseExt.kt:109)
       at cash.z.ecc.android.sdk.internal.db.SQLiteDatabaseExtKt$queryAndMap$2.invoke(SQLiteDatabaseExt.kt:12)
       at cash.z.ecc.android.sdk.internal.db.SQLiteDatabaseExtKt$queryAndMap$2.invoke(SQLiteDatabaseExt.kt:12)
       at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
       at kotlinx.coroutines.flow.AbstractFlow.collect(AbstractFlow.java:230)
       at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(ChannelFlow.kt:195)
       at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo$suspendImpl(ChannelFlow.kt:157)
       at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo(ChannelFlow.kt:5)
       at kotlinx.coroutines.flow.internal.ChannelFlow$collectToFun$1.invokeSuspend(ChannelFlow.kt:60)
       at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
       at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
       at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.java:115)
       at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:103)
       at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:584)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
       at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant