0x-mesh
0x-mesh copied to clipboard
Confusing failure when using incorrect `chainID`.
Context
Please provide any relevant information about your setup
- Are you running Mesh in the browser or as a standalone server? Are running Mesh inside of Docker or directly running the binary?
In the browser. I was using the chrome web-browser with the Metamask browser extension. This extension was injecting a Ropsten web3 environment (this is important).
- What version of Mesh are you running? Be as specific as possible (e.g.,
8.0.1
instead oflatest
or8
).
development
(at or around commit hash 001be7baa634f4b323bc85578bd7d8087a095578
).
- Are you using an RPC client and if so, which one? (e.g., Typescript or Golang client, the exact version)
No, I was using the @0x/mesh-browser-lite
package to interact with the Mesh node directly.
Expected Behavior
Mesh should exit with a good error message immediately. The chainID
indicated by the configuration was 1
, but the chainID
of the web3Provider
was 3
.
Current Behavior
Mesh crashes with a nil-pointer exception.
Steps to Reproduce
- Make note of the network Metamask is configured to use (e.g. mainnet).
- Run either of the browser examples.
- Change the network in Metamask to something else (e.g. Kovan or Ropsten).
- Run the browser example again.
- Watch the Mesh node crash.
Failure Logs



Possibly fixed by https://github.com/0xProject/0x-mesh/pull/733
@jalextowle can you confirm whether this is fixed by #733?