Closed Muhammad-Altabba closed 5 years ago
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
fwiw. This is still an issue for me. I can't use Drizzle's fallback to websockets with beta35 [which it is currently at].
@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.
@adrianmcli all I know is currently that beta33 works fine for me. Perhaps future version fixed things?
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.
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
Thanks for the data point @n1c01a5, we'll look into this.
@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).
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.
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.
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?
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'
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
)
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
@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.
@tung-eh Good catch.
@cds-amal We need to make a release this week just based off of what we have right now.
@tung-eh can you verify if the release solved your issue?
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: https://github.com/trufflesuite/drizzle/issues/42#issuecomment-489356887
Error in block processing: TypeError: Cannot read property 'transactions' of null
I am seeing the same problem but this is probably a different issue.
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 :)
There is a issue with Web3 v1.0.0-beta35 that Drizzle depend on.
Error:
Web3 has to be downgraded to v1.0.0-beta33 or upgreaded to version v1.0.0-beta36 and above.