Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

web3.js always returns invalid JSON RPC response #1218

Closed
Moejoe90 opened this issue Dec 8, 2017 · 3 comments
Closed

web3.js always returns invalid JSON RPC response #1218

Moejoe90 opened this issue Dec 8, 2017 · 3 comments
Assignees
Labels

Comments

@Moejoe90
Copy link

Moejoe90 commented Dec 8, 2017

I am talking about latest stable release web3 0.19.0

Web3 always emits invalid JSON RPC response, and this makes it almost impossible to recognize if the connection loss happened during initial connection with node or midway while response or a real wrong response from the node.

This shouldn't be the case for sure as I can see in errors.js a node connection error and it is utilized in the httpprovider

Additionally

While being to be able to initialize new web3() and wrap it around different providers easily is a good idea, it makes it almost impossible to recognize if the connection loss happened during initialization or midway.

Now i now can use web3.isConnected() during initialization and emit a specific error but why not provide a strict mode for example where I would wrap web3 around a specific provider and expect the connection to be there. Maybe there is a way to do this already?

@Freyert
Copy link
Contributor

Freyert commented Mar 12, 2018

This is always, always? Or just a lot of the time?

I'm seeing: Invalid JSON RPC response: ""

@edyrkaj
Copy link

edyrkaj commented Jun 26, 2018

Hi,

Can we have any solution about this issue? Still happening on version: web3@1.0.0-beta.34
Thnx

@nivida nivida self-assigned this Aug 9, 2018
@nivida nivida added the 0.x.x label Nov 29, 2018
@nivida
Copy link
Contributor

nivida commented Mar 25, 2019

Version 0.20.x got his last maintenance release with v0.20.7. Please update your code to the latest 1.0 version of Web3.js. Further details about the current project state are explained in the release announcement of version 1.0.0-beta.38.

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

No branches or pull requests

4 participants