clragon / e1547

A sophisticated e621 browser
https://e1547.clynamic.net/
GNU General Public License v3.0
222 stars 19 forks source link

Frequent SQLite errors #136

Open TheQWERTYCodr opened 3 months ago

TheQWERTYCodr commented 3 months ago

Describe the bug Intermittent SQLite errors (attempt to write a readonly database) To Reproduce

  1. ???
  2. Error occurs, app can no longer load any data from e621

Expected behavior The app functions normally

Screenshots Screenshot_20240811-093210.png

Platform

Logs

SHOUT | 09:34:40.020 | Flutter: SqliteException(1032): while executing statement, attempt to write a readonly database, attempt to write a readonly database (code 1032)
  Causing statement: INSERT OR REPLACE INTO "DioCache" ("cacheKey", "date", "cacheControl", "content", "eTag", "headers", "priority", "requestDate", "responseDate", "url") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?), parameters: ccd600f9-37d4-5a5d-be39-170baf858b5d, 1723383280, max-age=300, must-revalidate, private, blob (48567 bytes), W/"b6baf91d9eeb2c5afcb373764108bac1", blob (1497 bytes), 1, 1723383279, 1723383280, https://e621.net/posts.json?page=7&limit&tags=score%3A%3E%3D20
╔ Data ════════════════════════════════════════════════════════════════════════════════════╗
║
║  SqliteException(1032): while executing statement, attempt to write a readonly database, attempt to write a readonly database (code 1032)
║    Causing statement: INSERT OR REPLACE INTO "DioCache" ("cacheKey", "date", "cacheControl", "content", "eTag", "headers", "priority", "requestDate", "responseDate", "url") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?), parameters: ccd600f9-37d4-5a5d-be39-170baf858b5d, 1723383280, max-age=300, must-revalidate, private, blob (48567 bytes), W/"b6baf91d9eeb2c5afcb373764108bac1", blob (1497 bytes), 1, 1723383279, 1723383280, https://e621.net/posts.json?page=7&limit&tags=score%3A%3E%3D20
║
╚══════════════════════════════════════════════════════════════════════════════════════════╝
╔ Stacktrace ══════════════════════════════════════════════════════════════════════════════╗
║
║  package:sqlite3/src/implementation/exception.dart 75                throwException
║  package:sqlite3/src/implementation/statement.dart 109               StatementImplementation._execute
║  package:sqlite3/src/implementation/statement.dart 289               StatementImplementation.executeWith
║  package:sqlite3/src/statement.dart 72                               CommonPreparedStatement.execute
║  package:drift/src/sqlite3/database.dart 149                         Sqlite3Delegate.runWithArgsSync
║  package:drift/native.dart 332                                       _NativeDelegate.runInsert.<fn>
║  dart:async/future.dart 306                                          new Future.sync
║  package:drift/native.dart 331                                       _NativeDelegate.runInsert
║  package:drift/src/runtime/executor/helpers/engines.dart 105         _BaseExecutor.runInsert.<fn>
║  package:drift/src/runtime/executor/helpers/engines.dart 61          _BaseExecutor._synchronized
║  package:drift/src/runtime/executor/helpers/engines.dart 102         _BaseExecutor.runInsert
║  package:drift/src/runtime/api/connection.dart 103                   DatabaseConnection.runInsert
║  package:drift/src/remote/server_impl.dart 155                       ServerImplementation._runQuery
║  package:drift/src/remote/server_impl.dart 118                       ServerImplementation._handleRequest.<fn>
║  package:drift/src/remote/communication.dart 165                     DriftCommunication.setRequestHandler.<fn>
║  ===== asynchronous gap ===========================
║  package:drift/src/remote/communication.dart 113                     DriftCommunication.request
║  package:drift/src/remote/client_impl.dart 97                        _BaseExecutor._runRequest
║  package:drift/src/remote/client_impl.dart 124                       _BaseExecutor.runInsert
║  package:drift/src/utils/lazy_database.dart 78                       LazyDatabase.runInsert
║  package:drift/src/runtime/query_builder/statements/insert.dart 74   InsertStatement.insert.<fn>
║  package:drift/src/runtime/api/connection_user.dart 162              DatabaseConnectionUser.doWhenOpened.<fn>
║  package:drift/src/runtime/query_builder/statements/insert.dart 73   InsertStatement.insert
║  package:dio_cache_interceptor_db_store/src/store/database.dart 122  DioCacheDao.set
║  package:dio_cache_interceptor/src/dio_cache_interceptor.dart 225    DioCacheInterceptor._saveResponse
║  package:dio_cache_interceptor/src/dio_cache_interceptor.dart 102    DioCacheInterceptor.onResponse
║  
║
╚══════════════════════════════════════════════════════════════════════════════════════════╝

Additional context

clragon commented 2 months ago

Thank you for your issue. We are working on fixing this.