The command npx completium-cli deploy contracts/battlemaster.arl --parameters '{"battle_master_fighter_id":6}' --force runs with no problem if my endpoint is set to ghostnet, correctly deploys the contract, and I am able to interact with the contract, use my dApp frontend etc.

However, if my endpoint points to a running sandbox, I get the error:

GET http://localhost:20000/chains/main/blocks/head/context/constants FetchError: request to http://localhost:20000/chains/main/blocks/head/context/constants failed, reason: socket hang up

I get an error like this whether I am using a flextesa sandbox or tezbox sandbox. I know the sandbox is running as if I curl the address given in the error it responds with what I assume is the correct output, eg:

$curl http://localhost:20000/chains/main/blocks/head/context/constants

Any help appreciated!

  • 1
    Seems someone had a similar issue, so this should help out: tezos.stackexchange.com/a/5966/12289
    – Amethyst
    Commented Jun 25 at 14:11
  • Thankyou @Amethyst, yes downgrading to node version 16 works!
    – Grum
    Commented Jun 25 at 20:01
  • I'm happy you've been able to resolve the issue.
    – Amethyst
    Commented Jun 25 at 22:53

1 Answer 1


This problem appears to be caused by a compatibility issue with some part of the tezos sandbox stack and the latest version of node. Until that is fixed, the temporary solution is to use node version manager (nvm) to downgrade to version 16 of node.

Thanks to @Amethyst for point me to the solution given here by @ztepler:


Instructions to install nvm can be found here: https://github.com/nvm-sh/nvm

In short, run the following commands:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash


wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

and then

nvm install 16
nvm use 16

That worked for me.

More details at nvm github link given above if you run into problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.