Baseflow / Baseflow/flutter_cache_manager
DatabaseException - "unable to open database file" on iOS
- 主要语言
- Dart
- 星标
- 809
- 派生
- 510
- 平均合并
- 6 分钟
- 30 天内合并 PR
- 1
描述
**Package**: [flutter_cache_manager]
**Platform**: iOS
**Error**: `DatabaseException(Error Domain=SqfliteDarwinDatabase Code=14 "unable to open database file")`
---
### 🔍 Description
While using the package, I occasionally encounter the following error on iOS:
```
#0 wrapDatabaseException (package:sqflite_platform_interface/src/platform_exception.dart:12)
#1 SqfliteDatabaseMixinExt._txnRawUpdateOrDelete. (package:sqflite_common/src/database_mixin.dart:318)
#2 BasicLock.synchronized (package:synchronized/src/basic_lock.dart:36)
#3 SqfliteDatabaseMixin.txnSynchronized (package:sqflite_common/src/database_mixin.dart:517)
```
This seems to happen when the cache manager tries to update or insert entries in the database. It appears that the database file is either not found or not accessible at runtime.
---
### ✅ What I’ve Tried
- Verified that I'm not deleting or moving the database file manually.
- Tried using `CacheManager` with a custom config and custom database name.
- Happens mostly in production or TestFlight builds — not consistently reproducible in debug mode.
---
贡献指南
调研方向
报告没有提到任何仓库文件或测试;先在 iOS 或 TestFlight 构建中复现该故障,并跟踪缓存管理器的数据库更新和插入路径。比较自定义数据库配置与默认数据库配置,然后记录原因,并验证受影响的缓存操作可以在不出现数据库打开错误的情况下完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- dart, flutter
- 领域
- database, mobile
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100