Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Improve error reporting when Truffle fails to connect to JSON RPC #489

Closed
gnidan opened this issue Jul 11, 2017 · 3 comments
Closed

Improve error reporting when Truffle fails to connect to JSON RPC #489

gnidan opened this issue Jul 11, 2017 · 3 comments
Assignees

Comments

@gnidan
Copy link
Contributor

gnidan commented Jul 11, 2017

Issue

Currently, the error appears as "Invalid JSON RPC response" with very little representation of underlying problem

Expected Behavior

The error should indicate that Truffle has trouble connecting to Ethereum node software.

Specific Requirements

  • Error message should include possible failure cases. Feel free to use an error message that has multiple lines and formatting, i.e.,

    Could not connect to your Ethereum client. Please check that your Ethereum client:
    
    - is running
    - is accepting RPC connections (i.e., "--rpc" option is used in geth)
    - is accessible over the network
    

    And perhaps we can have the error message link to a FAQ or document that describes this (ignore this requirement if you can't find a useful document)

  • The error itself should be wrapped in truffle-error. Note that Truffle uses truffle-error as a "flag" to print out error messages nicely instead of showing a full stack trace.

(from trufflesuite/truffle-config#4 (comment))

@dotnetspec
Copy link

Thanks. I realized that Truffle was not able to connect to the Ethereum client. However, I don't know why it wouldn't connect.

What steps can I take to make the connection happen?

Thanks,

@gnidan
Copy link
Contributor Author

gnidan commented Jul 14, 2017

@dotnetspec Ensure that your client is running and your truffle.js file is configured correctly. Beyond that, the Truffle gitter is probably the best place to go for troubleshooting. (Underlying issues can vary wildly)

@gnidan
Copy link
Contributor Author

gnidan commented Jul 17, 2017

After wrapping the underlying web3 error, here's what it looks like:

screen shot 2017-07-17 at 1 10 41 pm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants