Pocket IC unable to load after being shutdown abruptly before (entering into an unable to connect error loop)

This could happen if the PocketIC instance is not stopped properly (and thus its state is corrupted). To stop the PocketIC instance properly, you should:

  • run dfx stop;
  • or hit Ctrl-C in the terminal tab executing dfx start (or send SIGINT - corresponding to Ctrl-C - to dfx start in a non-interactive environment).

And you should not run dfx start after dfx killall. In other words, if you have to run dfx killall (or kill the container etc.), then you should use dfx start --clean afterwards.

I took a note to produce a comprehensible error message in PocketIC if the state is corrupted.

3 Likes