isar / isar/hive

Passing wrong HIveipher to encryptionCipher causes vague error and breaks app

Open
#651 1 comment 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**

1. Follow [these instructions](https://docs.hivedb.dev/#/advanced/encrypted_box?id=encrypted-box) and build an Encrypted box
2. Debug on device, leave it for a day or two, recompile and rebuild
3. Since no encryption key can be retrieved from emptied secure storage, new key is generated
4. "Unknown error" thrown at Hive.openBox, app unable to proceed

**Version**
- Platform: Android
- Flutter version: 2.0.5
- Hive version: 2.0.4

A more specific error, like "Box cannot open; maybe the cipher is wrong?" would help.
Perhaps return some nonsense or a fake Box so that the app does not break before rendering? (although it will still break once any related value is called.)

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.