flow-emulator
flow-emulator copied to clipboard
Emulator not working on windows with `--snapshot` flag
Problem
When I ran the emulator with snapshots flag, it exited with below error:
$ flow emulator --snapshot
time="2022-09-20T13:37:48+02:00" level=info msg=":gear: Using service account 0xf8d6e0586b0a20c7" serviceAddress=f8d6e0586b0a20c7 serviceHashAlgo=SHA3_256 servicePrivKey=1ef20789108d62d4670ee550e40842e2dd435b9f5a20a7421d54040b959af48d servicePubKey=247e7afc5c17795c6217db9bd0b5d0416d733b57f788fcb0f25e35ecf11c3c202d14b9095d5ac772ec507cd5307fd99806c4b97180658029d9506db0308a9657 serviceSigAlgo=ECDSA_P256
time="2022-09-20T13:37:52+02:00" level=error msg=":exclamation: Failed to configure storage" error="failed to initialize Badger store: entry not found"
Steps to Reproduce
- Initialise flow config with
flow init - Start emulator with
--persistflag
OS info:
System type 64-bit operating system, x64-based processor
Edition Windows 10 Home
Version 21H2
Installed on 02/09/2021
OS build 19044.1889
Acceptance Criteria
The emulator starts succesfully with --persist flag on any platform.
Context
We are working on releasing the flowser desktop app in the scope of https://github.com/onflow/developer-grants/issues/27. This issue is blocking us from testing and releasing the app on Windows.
I remember @bluesign mentioning that there were some issues with snapshot feature on Windows, so just mentioning that comment: https://github.com/onflow/flow-emulator/issues/204#issuecomment-1249325026
Hey @bartolomej ,
badger db we are using currently, has very big files when run in windows. (I contacted them, long story short windows is to blame)
I have a huge structure change in storage going on, want to support redis and sqlite as backend.
When sqlite is ready, snapshot will switch to use that ( in my plan, still need to discuss and confirm with @sideninja ) plan timeline is short. I am searching for some test cases now, implementations are done.
@bluesign I see, thanks for the update! I think in that case, we will just disable the snapshot feature on Flowser Windows for now.
Looking forward to the upcomming structural change that you mentioned!