Baseflow / Baseflow/flutter_cached_network_image
"DatabaseException(attempt to write a readonly database"
- Dominant language
- Dart
- Stars
- 2.6k
- Forks
- 731
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 1
Description
## 🐛 Bug Report
When Im trying to login after immediate logout, few images are not loading and it shows this exception in the logs.
`DatabaseException(attempt to write a readonly database (code 1032 SQLITE_READONLY_DBMOVED)) sql 'DELETE FROM cacheObject WHERE _id = ?' args [13]
I/flutter (16798): #0 wrapDatabaseException (package:sqflite/src/exception_impl.dart:11:7)
I/flutter (16798):
I/flutter (16798): #1 SqfliteDatabaseMixin.txnRawUpdate. (package:sqflite_common/src/database_mixin.dart:418:22)
I/flutter (16798):
I/flutter (16798): #2 BasicLock.synchronized (package:synchronized/src/basic_lock.dart:33:16)
I/flutter (16798):
I/flutter (16798): #3 SqfliteDatabaseMixin.txnSynchronized (package:sqflite_common/src/database_mixin.dart:344:14)
I/flutter (16798):
I/flutter (16798): #4 CacheStore.retrieveCacheData. (package:flutter_cache_manager/src/cache_store.dart:79:11)
I/flutter (16798): `
### Expected behavior
Images should load. It does work when app is uninstalled and installed again.
### Reproduction steps
### Configuration
**Version:** 1.x
**Platform:**
- Android
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the immediate login/logout flow on Android and inspect the stack entries in package:flutter_cache_manager/src/cache_store.dart, package:sqflite/src/exception_impl.dart, and package:sqflite_common/src/database_mixin.dart. Done means the images load after logout without the SQLITE_READONLY_DBMOVED error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter, sqlite
- Domain
- databases, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100