0
votes

I m trying out substrate installation and building chains from this tutorial here - https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/interact

I did cargo build --release on node template and started the server by ./target/release/node-template --dev --tmp. then started the frontend app by doing yarn start. Now, I am trying to access the page remotely on my browser by hitting - <node-ip-address>:8000/substrate-front-end-template I am getting the following:

Error Connecting to Substrate [object Event]

Upon inspecting the browser, I get the following:

Provider.js:380 WebSocket connection to 'ws://127.0.0.1:9944/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
connect @ Provider.js:380 connectWithRetry @ Provider.js:402 (anonymous) @ Provider.js:175
index.js:1 2020-10-11 20:34:00 API-WS: disconnected from ws://127.0.0.1:9944: 1006:: Abnormal Closure

Looks like my browser is not able to establish a secure connection to the app. How do I fix this? Any suggestions? Thanks in advance!

1
What browser are you using? Can you try maybe in a different browser? I think many people use Firefox or Chrome, if that's not already what you're using. - Dan Forbes
@ Dan Forbes I am using chrome. - msingh
Can you try with Firefox? - Dan Forbes
You may be hitting this error stackoverflow.com/a/50861413/858003 - Dan Forbes

1 Answers

0
votes

If you start the network with an external rpc enabled, it works! Updated command:

./target/release/node-template --dev --tmp --ws-external --rpc-external