hive icon indicating copy to clipboard operation
hive copied to clipboard

Passing wrong HIveipher to encryptionCipher causes vague error and breaks app

Open thomassth opened this issue 4 years ago • 1 comments

Steps to Reproduce

  1. Follow these instructions 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.)

thomassth avatar May 01 '21 21:05 thomassth

A wrong encryption key error would be great! Been waiting for this as well

oliverbytes avatar Apr 29 '22 08:04 oliverbytes