Baseflow / Baseflow/flutter_cache_manager

ios sqflite DatabaseException "disk I/O error"

Aperta
#337 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Dart
Stelle
809
Fork
510
Merge medio
6m
PR unite (30g)
1

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
dart, flutter, ios
Ambito
databases, mobile-dev
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.