Baseflow / Baseflow/flutter_cache_manager

ios sqflite DatabaseException "disk I/O error"

Đang mở
#337 1 bình luận 0 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ả

## 🐛 Bug Report

Stacktrace:
```
DatabaseException(Error Domain=FMDatabase Code=6922 "disk I/O error" UserInfo={NSLocalizedDescription=disk I/O error}) sql 'DELETE FROM cacheObject WHERE _id IN ()' args []}. Error thrown null.
Non-fatal Exception: FlutterError
0 ??? 0x0 wrapDatabaseException + 11 (exception_impl.dart:11)
1 ??? 0x0 + 420 (database_mixin.dart:420)
2 ??? 0x0 synchronized + 33 (basic_lock.dart:33)
3 ??? 0x0 txnSynchronized + 346 (database_mixin.dart:346)
4 ??? 0x0 emptyCache + 149 (cache_store.dart:149)
5 ??? 0x0 (dart:async)
6 ??? 0x0 doLogout + 535 (loginbloc.dart:535)
7 ??? 0x0 + 238 (bloc.dart:238)
```

Happened only to one user, but 8 times in a row, in an iOS released app.
I add a [comment](https://github.com/tekartik/sqflite/issues/492#issuecomment-927640113) to [the same error](https://github.com/tekartik/sqflite/issues/492) in the sqflite repository

### Reproduction steps
Seems that erasing the cache this problem arose. But I wasn't able to reproduce.
From the analyics log I can say that happened when the user logged out, in that moment I erase the cache calling `CacheManager.emptyCache()`

### Configuration

### Output of `flutter --version`

- Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
- Framework • revision f4abaa0735 (3 months ago) • 2021-07-01 12:46:11 -0700
- Engine • revision 241c87ad80
- Tools • Dart 2.13.4

**Package version:** 2.1.2. I know it's a major release behind, but it doesn't seem this problem has been encountered searching for this issue in the repository, anyway, I'll upgrade the package and proceed to release a new version of the app.

**Platform:**
- iOS: 14.7.1

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

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

Hướng nghiên cứu

The report points to CacheManager.emptyCache(), cache_store.dart:149, during logout, with the failing DELETE statement shown in the stack trace. Read that call and database_mixin.dart:420, then compare the referenced sqflite issue #492. Done requires identifying a reproducible cause and confirming that logout cache deletion no longer produces the iOS exception.

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, ios
Lĩnh vực
databases, mobile-dev
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.