Baseflow / Baseflow/flutter_cache_manager

DatabaseException - "unable to open database file" on iOS

Đang mở
#494 3 bình luận 5 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Dart
Star
809
Fork
510
Merge trung bình
6 phút
Pull request đã merge (30 ngày)
1

Mô tả

**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.

---

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

The report names no repository file or test; start by reproducing the failure on iOS or a TestFlight build and trace the cache manager's database update and insert paths. Compare the custom and default database configurations, then document the cause and verify that the affected cache operations complete without the database-open error.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
dart, flutter
Lĩnh vực
database, mobile
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.