Stopping and Starting dfx errors out

When i try to stop dfx and strart again, it errors out with the following log (starting clean is fine, just need a way to resume work after stopping):

May 28 23:36:46.937 CRIT s:lq2ff-dmkqb-3gpo2-4c3q6-k7q2g-rbonj-kdaj5-wy5ih-q54hf-33fjl-jqe/n:4oefc-35wkk-2sued-wzic7-olkwq-mkz4m-qhpfg-fsdg4-omdxy-r4xvf-nae/ic_state_manager/ic_state_manager Failed to reset tip to checkpoint height: IoError { path: “/projectpath/.dfx/state/replicated_state/node-100/state/tip”, message: “Failed to convert reset tip to checkpoint to 0000000000000320 (err kind: PermissionDenied)”, io_err: Custom { kind: PermissionDenied, error: “failed to copy /projectpath/.dfx/state/replicated_state/node-100/state/checkpoints/0000000000000320/bitcoin/testnet/state.pbuf → /projectpath/.dfx/state/replicated_state/node-100/state/tip/bitcoin/testnet/state.pbuf: Permission denied (os error 13)” } }

Using version 0.10.0 and defi motoko sample from dfinity samples

Sounds like some of your folder permissions are weird. Did you by accident run dfx as sudo?

I recommend you try running chown -R <your username> .dfx in your project root.

Tried it, still giving the same error. I didn’t use sudo at anytime.
Worth noting that i am using wsl on windows 10.

Oh Windows… Side note: The replica has problems on WSL at the moment: Error: The replica returned an HTTP Error: Http Error: status 500 Internal Server Error, content type "" , content: Internal Server Error · Issue #2157 · dfinity/sdk · GitHub

I’ll ping someone from the right team to help you in this case. I’m not used to debugging these issues… But what they’ll want to know for sure is if you are on WSL1 or WSL2. AFAIK only WSL2 is supported.

Seems to be a problem with the replica where a function is used that’s not compatible with WSL. We’ll have to wait for a new replica release.

1 Like

Thanks for taking the time to share the info, much appreciated.

1 Like