Baseflow / Baseflow/flutter_cache_manager

ios sqflite DatabaseException "disk I/O error"

オープン
#337 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Dart
スター
809
フォーク
510
平均マージ
6分
マージ済み PR(30日)
1

説明

## 🐛 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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
dart, flutter, ios
領域
databases, mobile-dev
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。