Stacktrace
Unhandled Exception: Bad state: No element
#0 ListQueue.removeFirst (dart:collection/queue.dart:729:25)
#1 Keystore.cancelTransaction (package:hive/src/box/keystore.dart:143:33)
#2 BoxImpl._writeFrame (package:hive/src/box/box_impl.dart:74:16)
<asynchronous suspension>
#3 BoxImpl.put (package:hive/src/box/box_impl.dart:57:12)
#4 Cache.setLastFetched (package:tavern/src/cache.dart:48:11)
#5 Cache.[]= (package:tavern/src/cache.dart:93:5)
#6 MapMixin.addAll (dart:collection/maps.dart:122:11)
#7 PageRepository.get (package:tavern/screens/home/home_bloc.dart:169:21)
#8 _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
#9 _rootRunUnary (dart:async/zone.dart:1132:38)
#10 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#11 _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
#12 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)<…>
Steps to Reproduce
Not sure how. It only happens when the app starts, a box is opened and written to quickly. If I put a breakpoint and it pauses, then when it resumes, the error doesn't show up
Code sample
link to repo: https://github.com/ThinkDigitalSoftware/tavern
Image of the frame, just in case you can grab something from it

Version
On which device does this error happen?
What I believe happens: Hive can for some reason not write to the box file (not necessarily a bug in Hive). It then reverts the key transaction to be in sync with the disk. This operation fails (certainly a bug). I'll try to find the reason.
Thanks for reporting. If you find any more information or even a way to reproduce this, please share it here :+1:
Thanks. This is being tested on an iOS simulator. It was consistent in my code, which is available at the repo I linked to , however, I removed the class I was using it in because it wasn't necessary for the app. I can point you to the previous commit if you'd really like to see it in action
Thanks. This is being tested on an iOS simulator. It was consistent in my code, which is available at the repo I linked to , however, I removed the class I was using it in because it wasn't necessary for the app. I can point you to the previous commit if you'd really like to see it in action
I can point you to the previous commit if you'd really like to see it in action
That would be really helpful...
Here ya go.
https://github.com/ThinkDigitalSoftware/tavern/commit/672e70d9ff6807ed082b945ee1fff85e682aa115
If I'm being too vague, let me know please. I'll help where I can
Thanks for your help, I'll try to reproduce it...
Sorry this was a bigger problem but it is now fixed with 1.1.0-beta.
Thanks!
@leisim Do we need to clone the repo to get this fix?
No you can use version 1.1.0-beta from pub.dev