0x-mesh icon indicating copy to clipboard operation
0x-mesh copied to clipboard

Confusing failure when using incorrect `chainID`.

Open jalextowle opened this issue 5 years ago • 2 comments

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 of latest or 8).

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

  1. Make note of the network Metamask is configured to use (e.g. mainnet).
  2. Run either of the browser examples.
  3. Change the network in Metamask to something else (e.g. Kovan or Ropsten).
  4. Run the browser example again.
  5. Watch the Mesh node crash.

Failure Logs

Screen Shot 2020-03-02 at 1 39 32 PM Screen Shot 2020-03-02 at 1 39 47 PM Screen Shot 2020-03-02 at 1 40 03 PM

jalextowle avatar Mar 02 '20 22:03 jalextowle

Possibly fixed by https://github.com/0xProject/0x-mesh/pull/733

albrow avatar Mar 02 '20 23:03 albrow

@jalextowle can you confirm whether this is fixed by #733?

albrow avatar Apr 07 '20 22:04 albrow