isar / isar/hive

Hive data corrupted/destroyed after user-forced application exit

Open
#729 0 comments 0 reactions 0 assignees View on GitHub
problem
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

**Steps to Reproduce**
Create a set of 6 Hive boxes, insert data, and on either Android or iOS force the application to exit.

**Code sample**
```
final appDocumentDirectory =
await path_provider.getApplicationDocumentsDirectory();
Hive.init(appDocumentDirectory.path);
Hive.registerAdapter(ManualAdapter());

Box manualBox = await Hive.openBox(BOX_MANUAL);

var manual = createManual();
manualBox.put(manual.id, manual);

// later
var returnValue = manualBox.get(manualId);

// returnValue data is deleted....
```

**Version**
- Platform: iOS, Android, Mac, Windows, Linux, Web
- Flutter version: 2.2.3
- Hive version: 2.0.4

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.