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

Drizzle has problem connecting to Infura because of Web3 v1.0.0-beta35 #42

Closed
Muhammad-Altabba opened this issue Feb 20, 2019 · 19 comments

Comments

@Muhammad-Altabba
Copy link

There is a issue with Web3 v1.0.0-beta35 that Drizzle depend on.

Error:

WebSocket connection to 'wss://mainnet.infura.io/ws'
failed: Error during WebSocket
handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received

Web3 has to be downgraded to v1.0.0-beta33 or upgreaded to version v1.0.0-beta36 and above.

@simondlr
Copy link

simondlr commented Mar 21, 2019

What's the most efficient way to downgrade web3 to work with websockets? Experiencing same issue. Tried forking drizzle from develop and editing package.json, but screws up dependencies for drizzle-react. So, wondering about my options atm.

EDIT:

Managed to fix it here [based of 1.3.3]: https://github.com/simondlr/drizzle/tree/web3mod

@simondlr
Copy link

fwiw. This is still an issue for me. I can't use Drizzle's fallback to websockets with beta35 [which it is currently at].

@adrianmcli
Copy link
Contributor

@simondlr Which version of Web3 should we be on? As far as I know (and I don't know much), there is still some discussion about what beta version we need to rely on since there are breaking changes between some of them.

@simondlr
Copy link

@adrianmcli all I know is currently that beta33 works fine for me. Perhaps future version fixed things?

@adrianmcli
Copy link
Contributor

I think beta53 is coming out soon with a bunch of changes that un-breaks things with Truffle (according to this comment), we can try using that when it is released.

@n1c01a5
Copy link

n1c01a5 commented May 4, 2019

I tried with the 53 version but I still have this problem to use the web3 fallback.
I have this error:

Error in block processing:
TypeError: Cannot read property 'transactions' of null

@adrianmcli
Copy link
Contributor

Thanks for the data point @n1c01a5, we'll look into this.

@n1c01a5
Copy link

n1c01a5 commented Jun 2, 2019

@adrianmcli do you have any updates about the fallback?

It seems working with "drizzle": "simondlr/drizzle#web3mod", this version use the beta33 of web3 (but it's "ugly" to use this trick. I'm waiting for a better solution).

@stale
Copy link

stale bot commented Aug 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale
Copy link

stale bot commented Aug 9, 2019

This issue has been closed, but can be re-opened if further comments indicate that the problem persists. Feel free to tag maintainers if there is no reply to further comments.

@stale stale bot closed this as completed Aug 9, 2019
@apbendi
Copy link

apbendi commented Aug 14, 2019

As far as I can tell, this is still a problem with the latest version of Drizzle. I've yet to find around a workaround, and am currently in npm hell trying to get a version of Drizzle with an upgraded or downgraded web3. Any suggestions?

@apbendi
Copy link

apbendi commented Aug 14, 2019

I tried to fork Drizzle and downgrade the dependency, then use my GitHub version as the dependency: https://github.com/apbendi/drizzle/tree/web3fix

However, that results in the following build error from npm start:

./node_modules/drizzle-react/dist/drizzle-react.js
Module not found: Can't resolve 'drizzle' in '/Users/ben/Development/forehash/app/node_modules/drizzle-react/dist'

apbendi referenced this issue in apbendi/forehash Aug 19, 2019
* Upgrade Drizzle using a fork on GitHub that also upgrades
  web3 to version 1.2 due to this bug:
  https://github.com/trufflesuite/drizzle/issues/186
* Upgrade drizzle-react & drizzle-react-components to their
  latest versions
* Avoid checking in Infura ID by importing it from a gitignored
  and templatized file
@cds-amal cds-amal reopened this Sep 26, 2019
@cds-amal cds-amal transferred this issue from trufflesuite/drizzle-legacy Sep 26, 2019
@JasoonS
Copy link
Contributor

JasoonS commented Sep 29, 2019

This is working for me right now with the latest version of drizzle (the one at @drizzle/store).

There were some strange things happening in my code when I didn't explicitly specify the fixed version of 1.2.1 of web3 in my package.json though (drizzle specifies ^1.2.1). I don't think this is due to drizzle though, and rather I think there is some kind of interference with the versioning from some of the other dependencies I have (I am integrating walletconnect, portis, torus, fortmatic and squarelink). If this is a concern for you I'll dig up more details, let me know.

So from my side I think this issue can be closed, and I no longer have to maintain a fork with a different web3 version :) (before I in my fork I was using web3 1.2.0)

@jamesmorgan
Copy link

jamesmorgan commented Oct 14, 2019

I have this issue in vue-drizzle - failed: Error during WebSocket handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received

  • Vue-drizzle - 0.1.0

@tung-eh
Copy link

tung-eh commented Oct 24, 2019

@JasoonS This change haven't released yet, you can look at the code on master branch to see the published code.

I also wonder when you guys will release it.

@adrianmcli
Copy link
Contributor

@tung-eh Good catch.

@cds-amal We need to make a release this week just based off of what we have right now.

@cds-amal
Copy link
Member

@tung-eh can you verify if the release solved your issue?

@friedhelmensch
Copy link

I had the same issue:

WebSocket connection to 'wss://mainnet.infura.io/ws'
failed: Error during WebSocket
handshake: Sent non-empty 'Sec-WebSocket-Protocol' header but no response was received

and can confirm that it is solved with the latest release.

as a remark:
#42 (comment)

Error in block processing:
TypeError: Cannot read property 'transactions' of null

I am seeing the same problem but this is probably a different issue.

@adrianmcli
Copy link
Contributor

can confirm that it is solved with the latest release

Thanks let's close this for now. Regarding the other issue, we'd appreciate opening a new one :)

srothwellspark pushed a commit to srothwellspark/drizzle that referenced this issue Nov 28, 2019
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

10 participants