Steps to Reproduce
Opening a box that was previously used suddenly fails on every restart. Seems to be related to #94, but I tried Hive.openBox('yourBox', compactionStrategy: (a,b)=> false); and the error continues to be thrown.
Stacktrace
E/flutter (18286): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: HiveError: This is an iternal error. Please open an issue on GitHub and provide steps to reproduce this problem if possible.
E/flutter (18286): #0 Frame.fromBytes (package:hive/src/binary/frame.dart:48:7)
E/flutter (18286): #1 FrameHelper.framesFromBytes (package:hive/src/binary/frame_helper.dart:17:25)
E/flutter (18286): #2 FrameIoHelper.framesFromFile (package:hive/src/io/frame_io_helper.dart:39:12)
E/flutter (18286): <asynchronous suspension>
E/flutter (18286): #3 StorageBackendVm.initialize (package:hive/src/backend/storage_backend_vm.dart:120:29)
E/flutter (18286): <asynchronous suspension>
E/flutter (18286): #4 BoxBase.initialize (package:hive/src/box/box_base.dart:82:20)
E/flutter (18286): #5 HiveImpl.openBox (package:hive/src/hive_impl.dart:87:17)
E/flutter (18286): <asynchronous suspension>
Version
Any chance you could share an example project or link to a GitHub repo which shows the problem?
@leisim It's currently a closed source repo. This is the only time this error has happened to me (and since then I cannot reproduce this error when I reinstall the app on my phone). My guess is that the app exited during some sort of write operation that caused it to become corrupt (error seems to be originating here). I'm not sure if this info is very helpful, but please let me know if there are anything else I should share.
If you can reproduce the issue or find any more hints, please let me know :+1:
to follow as I am also getting the same error
Will be fixed in 1.2.0 which will be released soon.
Most helpful comment
Will be fixed in
1.2.0which will be released soon.