2

I have a substrate based build running locally with RPC and JSON API, when attempting to connect via a browser extension to http://127.0.0.1:9933, getting the following error.

Error:

2023-03-01 14:16:36 Denied request: HttpHeaderRejected("origin", "moz-extension://b7930d0a-fa38-4693-86ff-101366b1a01b")

Node started as:

[12:46 PM] user@macOS  [~/src/discovery]./target/debug/substrate


2023-03-01 12:46:36 Substrate Node
2023-03-01 12:46:36 ✌️  version 3.0.0-dev-b8baa73f3e3
2023-03-01 12:46:36 ❤️  by Parity Technologies <[email protected]>, 2017-2023
2023-03-01 12:46:36 📋 Chain specification: Local Testnet
2023-03-01 12:46:36 🏷  Node name: Alice
2023-03-01 12:46:36 👤 Role: AUTHORITY
2023-03-01 12:46:36 💾 Database: RocksDb at /Users/user/Library/Application Support/substrate/chains/local_testnet/db/full
2023-03-01 12:46:36 ⛓  Native runtime: node-268 (substrate-node-0.tx2.au10)
2023-03-01 12:47:46 👶 Creating empty BABE epoch changes on what appears to be first startup.
2023-03-01 12:47:46 Using default protocol ID "sup" because none is configured in the chain specs
2023-03-01 12:47:46 🏷  Local node identity is: 12D3KooWKjFwQjfHF4m2rHL6fT9s6eoe7mfnUkpQy7SG9gASiBoY
2023-03-01 12:47:46 💻 Operating system: macos
2023-03-01 12:47:46 💻 CPU architecture: x86_64
2023-03-01 12:47:46 📦 Highest known block at #0
2023-03-01 12:47:46 〽️ Prometheus exporter started at 127.0.0.1:9615
2023-03-01 12:47:46 Running JSON-RPC HTTP server: addr=127.0.0.1:9933, allowed origins=Some(["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"])
2023-03-01 12:47:46 Running JSON-RPC WS server: addr=127.0.0.1:9944, allowed origins=Some(["http://localhost:*", "http://127.0.0.1:*", "https://localhost:*", "https://127.0.0.1:*", "https://polkadot.js.org"])
2023-03-01 12:47:46 🏁 CPU score: 14MB/s

Any help is appreciated.

2 Answers 2

0

If your RPC is inaccessible here you can generally add one of the following:

  • --rpc-cors <origins>
  • --unsafe-rpc-external
  • --unsafe-rpc-external

Although as AurevoirXavier says you probably only need the first one.

Source: https://docs.substrate.io/reference/command-line-tools/node-template/

0

It looks like the rpc-cors rule refused this.

Try running the node with --rpc-cors all.

1
  • This worked. Thank you !
    – BobinsonKB
    Commented Mar 2, 2023 at 17:31

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.