Closed domohawk closed 3 years ago
We don't fully support Node 16 yet, but I just released a new @canary
version that fixes some other issues that might fix this issue in Node 16 (it will use a JS based websocket library instead of native). Can you try it and let me know if the error is gone now?
I updated but am still seeing the same stack trace (with different line numbers).
node v16.6.1
ganache v 7.0.0-canary.1338 (@ganache/cli: 0.1.1-canary.1336, @ganache/core: 0.1.1-canary.1336)
...
TypeError: r.unmask is not a function
at unmask (/usr/lib/node_modules/ganache/dist/node/0.js:2:681419)
at Receiver.getData (/usr/lib/node_modules/ganache/dist/node/0.js:2:2001080)
at Receiver.startLoop (/usr/lib/node_modules/ganache/dist/node/0.js:2:1998461)
at Receiver._write (/usr/lib/node_modules/ganache/dist/node/0.js:2:1997816)
at writeOrBuffer (node:internal/streams/writable:389:12)
at _write (node:internal/streams/writable:330:10)
at Receiver.Writable.write (node:internal/streams/writable:334:10)
at Socket.socketOnData (/usr/lib/node_modules/ganache/dist/node/0.js:2:1995903)
at Socket.emit (node:events:394:28)
at addChunk (node:internal/streams/readable:312:12)
I've got a fix for this specific issue as part of https://github.com/trufflesuite/ganache-core/pull/944, but noticed some other issues with the webpacked build when running in node 16, so it's not quite ready yet.
@domohawk do you mind testing the latest @canary release once again? npm install ganache@canary -g
@davidmurdoch I'm no longer seeing the issue, but even more oddly after reinstalling ganache-cli
(Ganache CLI v6.12.2 (ganache-core: 2.13.2)) it still works as well. Did you backport the fixes? I didn't even realize it was able to run a WS server since the pre-7 CLI doesn't have a --server.ws option. I just wanted to make sure I tested this properly.
No, we haven't back-ported any fixes; this bug must have been a regression in v7.
I'll close this issue since things seem to be resolved. Let me know if I've closed it prematurely! Thanks!
When using node latest (v16.6.2), ganache-cli crashes upon the connection attempt from the client. I've tested both rust-web3 and truffle web3js clients.
Stacktrace (ganache@canary):