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

"DatabaseException(attempt to write a readonly database" #782

Open
akshay-kapase opened this issue Sep 23, 2022 · 5 comments
Open

"DatabaseException(attempt to write a readonly database" #782

akshay-kapase opened this issue Sep 23, 2022 · 5 comments

Comments

@akshay-kapase
Copy link

🐛 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): <asynchronous suspension> I/flutter (16798): #1 SqfliteDatabaseMixin.txnRawUpdate.<anonymous closure> (package:sqflite_common/src/database_mixin.dart:418:22) I/flutter (16798): <asynchronous suspension> I/flutter (16798): #2 BasicLock.synchronized (package:synchronized/src/basic_lock.dart:33:16) I/flutter (16798): <asynchronous suspension> I/flutter (16798): #3 SqfliteDatabaseMixin.txnSynchronized (package:sqflite_common/src/database_mixin.dart:344:14) I/flutter (16798): <asynchronous suspension> I/flutter (16798): #4 CacheStore.retrieveCacheData.<anonymous closure> (package:flutter_cache_manager/src/cache_store.dart:79:11) I/flutter (16798): <asynchronous suspension>

Expected behavior

Images should load. It does work when app is uninstalled and installed again.

Reproduction steps

Configuration

Version: 1.x

Platform:

  • Android
@ProvMitraDora
Copy link

no one replies to this

@jayeshinfiraise
Copy link

jayeshinfiraise commented Jan 31, 2023

I got the same error for image
https://kamai.app:4000/images/gps/1/5e6888d66d3b380006f21921.png/Zw.png
https://kamai.app:4000/images/gps/d/5e6888e66d3b380006f21c8d.png/Zw.png

"attempt to write a readonly database (code 1032 SQLITE_READONLY_DBMOVED)"

Here is the log of it

DatabaseException(attempt to write a readonly database (code 1032 SQLITE_READONLY_DBMOVED)) sql 'INSERT INTO cacheObject (url, key, relativePath, eTag, validTill, touched, length) VALUES (?, ?, ?, ?, ?, ?, ?)' args [https://kamai.app:4000/images/gps/d/5e68892e6d3b38..., https://kamai.app:4000/images/gps/d/5e68892e6d3b38..., dc7ea5a0-a14b-11ed-929f-7dc4c0d24ad2.png, W/"1b5f0-17d0ae2f9b8", 1675763071226, 1675158272292, 112112]
[log] #0 wrapDatabaseException
package:sqflite/src/exception_impl.dart:11

#1 SqfliteDatabaseMixin.txnRawInsert.
package:sqflite_common/src/database_mixin.dart:463

#2 BasicLock.synchronized
package:synchronized/src/basic_lock.dart:33

#3 SqfliteDatabaseMixin.txnSynchronized
package:sqflite_common/src/database_mixin.dart:392

#4 CacheObjectProvider.insert
package:flutter_cache_manager/…/cache_info_repositories/cache_object_provider.dart:101

#5 CacheStore.putFile
package:flutter_cache_manager/src/cache_store.dart:59

W/MediaCodec(24675): mapFormat: no mediaType information
D/EGL_emulation(24675): app_time_stats: avg=4.77ms min=3.16ms max=17.07ms count=59
D/EGL_emulation(24675): app_time_stats: avg=3.59ms min=2.81ms max=5.75ms count=60
D/EGL_emulation(24675): app_time_stats: avg=3.69ms min=2.77ms max=6.55ms count=61
D/BufferPoolAccessor2.0(24675): bufferpool2 0xb400007613e04c38 : 5(10485760 size) total buffers - 1(2097152 size) used buffers - 151393/151398 (recycle/alloc) - 5/151397 (fetch/transfer)
D/EGL_emulation(24675): app_time_stats: avg=3.55ms min=2.68ms max=6.50ms count=59
D/EGL_emulation(24675): app_time_stats: avg=3.61ms min=2.65ms max=7.15ms count=60
D/EGL_emulation(24675): app_time_stats: avg=3.74ms min=2.80ms max=12.37ms count=61
W/MediaCodec(24675): mapFormat: no mediaType information
D/EGL_emulation(24675): app_time_stats: avg=3.49ms min=2.69ms max=6.22ms count=59
D/EGL_emulation(24675): app_time_stats: avg=3.51ms min=2.75ms max=5.44ms count=61
D/EGL_emulation(24675): app_time_stats: avg=3.71ms min=2.91ms max=7.41ms count=61
D/BufferPoolAccessor2.0(24675): bufferpool2 0xb400007613e04c38 : 5(10485760 size) total buffers - 1(2097152 size) used buffers - 151561/151566 (recycle/alloc) - 5/151565 (fetch/transfer)
D/EGL_emulation(24675): app_time_stats: avg=3.95ms min=2.85ms max=14.61ms count=61
D/EGL_emulation(24675): app_time_stats: avg=4.49ms min=2.81ms max=18.20ms count=61
D/EGL_emulation(24675): app_time_stats: avg=3.56ms min=2.80ms max=5.50ms count=61
W/MediaCodec(24675): mapFormat: no mediaType information
D/EGL_emulation(24675): app_time_stats: avg=3.69ms min=2.82ms max=6.29ms count=60
D/EGL_emulation(24675): app_time_stats: avg=3.82ms min=2.89ms max=7.06ms count=61
D/BufferPoolAccessor2.0(24675): bufferpool2 0xb400007613e04c38 : 5(10485760 size) total buffers - 1(2097152 size) used buffers - 151726/151731 (recycle/alloc) - 5/151730 (fetch/transfer)
D/EGL_emulation(24675): app_time_stats: avg=3.66ms min=2.88ms max=7.01ms count=61
D/EGL_emulation(24675): app_time_stats: avg=3.48ms min=2.70ms max=6.64ms count=61
D/EGL_emulation(24675): app_time_stats: avg=3.78ms min=2.81ms max=8.05ms count=60
D/EGL_emulation(24675): app_time_stats: avg=3.67ms min=2.62ms max=5.53ms count=61
W/MediaCodec(24675): mapFormat: no mediaType information
D/EGL_emulation(24675): app_time_stats: avg=3.53ms min=2.73ms max=6.15ms count=60

@adiiisanjayaa
Copy link

any update?

@dapealfy
Copy link

any update guys?

@DPohorielov
Copy link

any progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants