DatabaseException(attempt to re-open an already-closed object)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- android, dart, sqlite
- Domain
- databases, mobile-dev
Research direction
Start by tracing the Android failure from CacheObjectProvider.get in package:flutter_cache_manager/src/storage/cache_info_repositories/cache_object_provider.dart:110 through CacheStore._getCacheDataFromDatabase at cache_store.dart:116 and the sqflite stack. Reproduce or isolate the closed-database condition despite the report having no reproduction steps; done means the exception no longer occurs during cache lookups.
Written by the indexing model from the issue text.
Description
🐛 Bug Report
Getting DatabaseException(attempt to re-open an already-closed object
flutter_cache_manager(v3.3.0) is indirectly used in our app because we use CachedNetworkImageProvider to display images in our app
We get the following exception in our app from some of our customer devices. We do not have repro steps. We are using v3.3.0. flutter_cache_manager is indirectly used in our app because we use CachedNetworkImageProvider
DatabaseException(attempt to re-open an already-closed object: SQLiteDatabase: /data/user/0/ourapp_bundle_removed/files/libCachedImageData.db) sql 'SELECT * FROM cacheObject WHERE key = ?' args [https://cdnimages.ourappdomain_removed.com/3fe587d7369f7f0784881...]
Stack trace:
#0 wrapDatabaseException (package:sqflite/src/exception_impl.dart:11)
<asynchronous suspension>
#1 SqfliteDatabaseMixin.txnRawQuery.<anonymous closure> (package:sqflite_common/src/database_mixin.dart:559)
<asynchronous suspension>
#2 BasicLock.synchronized (package:synchronized/src/basic_lock.dart:33)
<asynchronous suspension>
#3 SqfliteDatabaseMixin.txnSynchronized (package:sqflite_common/src/database_mixin.dart:490)
<asynchronous suspension>
#4 CacheObjectProvider.get (package:flutter_cache_manager/src/storage/cache_info_repositories/cache_object_provider.dart:110)
<asynchronous suspension>
#5 CacheStore._getCacheDataFromDatabase (package:flutter_cache_manager/src/cache_store.dart:116)
<asynchronous suspension>
Expected behavior
This alert does not occur
Reproduction steps
N/A
Configuration
v3.3.0 of flutter_cache_manager
Flutter Version: 3.3.10
Platform:
- 📱 iOS
- [ X] 🤖 Android
- Dominant language
- Dart
- Stars
- 810
- Forks
- 510
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Baseflow/flutter_cache_manager
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Baseflow/flutter_cache_manager#450 · 9 comments · 8 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
Baseflow/flutter_cache_manager#507 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 30/100
Baseflow/flutter_cache_manager#501 · 1 comment · 3 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Baseflow/flutter_cache_manager#500 · 1 comment · 3 reactions ·
All issues in Baseflow/flutter_cache_manager
Similar issues
-
improvement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
linagora/tmail-flutter#4849 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
hiddify/hiddify-app#2348 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
mlcommons/mobile_app_open#1182 ·
-
[Bug] Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
bggRGjQaUbCoE/PiliPlus#3048 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
zulip/zulip-flutter#2466 ·