0
votes

Running Ubuntu 20.04.2 and following tutorial at https://substrate.dev/docs/en/tutorials/create-your-first-substrate-chain/

Introduction · Substrate Developer Hub In this tutorial, you will learn how to compile and launch the Substrate Developer Hub Node Template

2021-08-08 18:31:06 ???? Pre-sealed block for proposal at 414. Hash now 0xb97ef6e3533f47dfa1e2c0453bd9115cc753b51bf45218181945083a1122b851, previously 0xb661bc316808789cd1dd9e5cb65cf1ac18e2d27c05ec0c679abd5c4dad6eabe4.    
2021-08-08 18:31:06 ✨ Imported #414 (0xb97e…b851)    
2021-08-08 18:31:07 ???? Idle (0 peers), best: #414 (0xb97e…b851), finalized #412 (0xfd49…e08f), ⬇ 0 ⬆ 0    
2021-08-08 18:31:12 ???? Starting consensus session on top of parent 0xb97ef6e3533f47dfa1e2c0453bd9115cc753b51bf45218181945083a1122b851    
2021-08-08 18:31:12 ???? Prepared block for proposing at 415 [hash: 0x43c0cbed55fe998c9dff16ff086d6576def8a24b57b32973dc54ec3ecec57be0; parent_hash: 0xb97e…b851; extrinsics (1): [0xa4c9…413f]]    
2021-08-08 18:31:12 ???? Pre-sealed block for proposal at 415. Hash now 0xc3feebabe2896be78240ce46ef110f9df0c441694538300d111ed1a78c9e065b, previously 0x43c0cbed55fe998c9dff16ff086d6576def8a24b57b32973dc54ec3ecec57be0.    
2021-08-08 18:31:12 ✨ Imported #415 (0xc3fe…065b)    
2021-08-08 18:31:12 ???? Idle (0 peers), best: #415 (0xc3fe…065b), finalized #412 (0xfd49…e08f), ⬇ 0 ⬆ 0    
2021-08-08 18:31:17 ???? Idle (0 peers), best: #415 (0xc3fe…065b), finalized #413 (0x5a41…f7af), ⬇ 0 ⬆ 0    
2021-08-08 18:31:18 ???? Starting consensus session on top of parent 0xc3feebabe2896be78240ce46ef110f9df0c441694538300d111ed1a78c9e065b    
2021-08-08 18:31:18 ???? Prepared block for proposing at 416 [hash: 0x9c7862deacdb09f5fa4123c9f0abdbf5a5baa7c5092623c39aaf72d52ff283d7; parent_hash: 0xc3fe…065b; extrinsics (1): [0xefd1…e72a]]    
2021-08-08 18:31:18 ???? Pre-sealed block for proposal at 416. Hash now 0x564871f647c1d291d2a7d2f935b46bda3635d29b6b141627171759a3b643be6d, previously 0x9c7862deacdb09f5fa4123c9f0abdbf5a5baa7c5092623c39aaf72d52ff283d7.    
2021-08-08 18:31:18 ✨ Imported #416 (0x5648…be6d)

I ran the node with ./target/release/node-template --dev --tmp --ws-external --rpc-external I then ran the front end as per the instructions. When I try to connect from a machine on the local network I got "Error Connecting to Substrate { "isTrusted": true }"

I tried Safari, Firefox and Chrome

How do I fix this?

Update: I can get it to work running the front end locally and setting the PROVIDER_SOCKET in substrate-front-end-template/blob/master/src/config/development.json to the remote host.

It is still not working with both the node and the front end on the remote machine.

3

3 Answers

1
votes

In order to have fully working development environment you need:

  1. Build a node using cargo build --release

  2. Run a node using ./node-template --dev --tmp --ws-external --rpc-external

  3. Run front-end yarn start

Then you should obtain something like working node with frontend

For sure it is not a matter of web browser.

0
votes

In the file substrate-front-end-template/blob/master/src/config/development.json change the PROVIDER_SOCKET to the IP of the machine running the node (even if it is localhost).

It may be that the browser interprets the PROVIDER_SOCKET localhost address as the machine that is running the browser.

0
votes

add

--unsafe-ws-external --rpc-cors all

to your args