Passing wrong HIveipher to encryptionCipher causes vague error and breaks app
- 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.