substrate-docs icon indicating copy to clipboard operation
substrate-docs copied to clipboard

ink: Getting Started: Troubleshooting: Connection to node

Open jangorecki opened this issue 2 years ago • 1 comments
trafficstars

Is there an existing issue?

  • [X] I have searched the existing issues

Experiencing problems? Have you tried our Stack Exchange first?

  • [X] This is not a support question.

Content request

I was following ink getting started tutorial, but got stuck on one of the steps. Troubleshooting sections says to fill up the issue here in case I encounter any other, not listed there, issue.

So what troubleshooting section would benefit from is the explain debugging steps in case a user is not able to connect to his/her local substrate-contracts-node.

Following instructions from https://use.ink/getting-started/running-substrate I run my node using dev mode:

substrate-contracts-node --dev

Then, I am trying to connect to UI via https://contracts-ui.substrate.io/ choosing local node, but I am getting

Could not connect to ws://127.0.0.1:9944
Make sure you are running a local substrate-contracts-node.
substrate-contracts-node --dev

I tried switching off ufw but it didn't help.

This is the output of my node console

2023-11-13 09:46:10.415  INFO main sc_cli::runner: Substrate Contracts Node    
2023-11-13 09:46:10.416  INFO main sc_cli::runner: ✌️  version 0.33.0-unknown    
2023-11-13 09:46:10.416  INFO main sc_cli::runner: ❤️  by Parity Technologies <[email protected]>, 2021-2023    
2023-11-13 09:46:10.416  INFO main sc_cli::runner: 📋 Chain specification: Development    
2023-11-13 09:46:10.416  INFO main sc_cli::runner: 🏷  Node name: cool-jellyfish-4492    
2023-11-13 09:46:10.416  INFO main sc_cli::runner: 👤 Role: AUTHORITY    
2023-11-13 09:46:10.416  INFO main sc_cli::runner: 💾 Database: ParityDb at /tmp/substrateeTNwIZ/chains/dev/paritydb/full    
2023-11-13 09:46:11.566  WARN main sub-libp2p: Can't listen on /ip6/::/tcp/30333 because: Other(Custom { kind: Other, error: Custom { kind: Other, error: Other(Left(Left(Left(Left(Right(Transport(Os { code: 97, kind: Uncategorized, message: "Address family not supported by protocol" }))))))) } })    
2023-11-13 09:46:12.660  INFO main sc_rpc_server: Running JSON-RPC server: addr=127.0.0.1:9944, allowed origins=["*"]    

The problem is that I don't know how to debug the issue further. Substrate stackexchange is silent. Discord channel as well. I am not asking for solution here, but just steps that users can narrow down the issue. Troubleshooting section seems to be the perfect place for debugging instructions.

Are you willing to help with this request?

No.

jangorecki avatar Nov 14 '23 17:11 jangorecki

It turned out that Brave browser was by default blocking websocket. Other browsers may do that as well. That's probably the first thing to include in such troubleshooting entry.

jangorecki avatar Nov 16 '23 16:11 jangorecki