Open MichaelM97 opened 3 years ago
@MichaelM97 I have the same problem. Any news?
same problem
Same problem with hive "2.0.5"
Facing the same Issue.
hive: ^2.2.1 hive_flutter: ^1.1.0 hive_generator: ^1.1.3
getting this error 'Recovering corrupted box' upon **re-initialising on next run, mentioning the steps what I got on my side. It might help to figure out exact issue.
steps to reproduce :
any news when it will get fixed please?
@yakubmoris Could you perhaps provide a MWE for your reproduction? Could not reproduce it both in a complex app and a small MWE. (I have encountered the "Recovering corrupted box" as well, with hive 2.1.0, hive_flutter 1.1.0, flutter 3.3.5, but the origins of the problem are totally unclear and not reproducible as of now.)
@yakubmoris Currently running into the same situation.
In my case, the code to generate and store an EncryptionKey (using FlutterSecureStorage
) is running multiple times because I provided it to multiple boxes. => The last executed generateSecureKey()
is overriding existing ones. My fix was to move the generateEncryptionKey
method first, before providing Boxes. Hope this helps.
Steps to Reproduce I updated Hive from version
2.0.0
->2.0.4
, I performed logic which re-initialises Hive (usingHive.initFlutter
) with a newsubDir
, I then got the following exception when attempting to open an encrypted box:Now whenever I open my app, when attempting to open an encrypted box I get the following exception:
Code sample
Version
2.0.3
2.0.4