Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.0.10)

1.6k Views Asked by At

Running the application from a bundled file, I'm getting Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.0.10). This happens when I try to run the application in a virtual machine.

Info:

Ubuntu 20.04 lts

Node version: 14.17.5

Npm version: 7.42.0

/root/.nvm/versions/node/v14.15.0/lib
├── @microsoft/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]

Any ideas? Maybe this error means that I am connecting to a JSON-RPC backend that ia either not running or not returning a chain ID.

2

There are 2 best solutions below

1
Abhishek Parekh On BEST ANSWER

I had the same error,it is because the address of the RPC Server was incorrect. Check the address again and try.

1
tarun On

it is well explained here as you are on wsl ubuntu so ganache must be run on the same

Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.6.8)