Baseflow / Baseflow/flutter_cache_manager

ios sqflite DatabaseException "disk I/O error"

Offen
#337 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Dart
Sterne
809
Forks
510
Ø Merge
6 Min.
Gemergte PRs (30 T.)
1

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
dart, flutter, ios
Bereich
databases, mobile-dev
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.