You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.
return the accounts info of the ganache-cli server.
Current Behavior
ganache-cli server crashed with the following stack:
TypeError: connection.reject is not a function
at WebSocketConnection.<anonymous> (C:\Users\shwj\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\lib\webSocketServer.js:49:18)
at emitOne (events.js:116:13)
at WebSocketConnection.emit (events.js:211:7)
at WebSocketConnection.processFrame (C:\Users\shwj\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\websocket\lib\WebSocketConnection.js:529:26)
at C:\Users\shwj\AppData\Roaming\npm\node_modules\ganache-cli\node_modules\ganache-core\node_modules\websocket\lib\WebSocketConnection.js:321:40
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
Comparing ganache-cli with infura.io under the same web3.py client . infrura.io can return the expected result whereas ganache-cli can't . I suppose it is a bug for ganache-cli.
BTW, if a send a ws request using raw websocket client like the ws client plugin in chrome , it worked:
I sent
Thanks for reporting this, @ppLorins. I was able to reproduce the issue.
Two things are happening here:
Ganache doesn't currently support binary over websockets, which is what web3.py sends (instead of UTF8 encoded JSON). So when we attempt to parse the incoming data we fail and throw an exception.
We do catch the exception then attempt to communicate to the caller that the request was a bad request, but the method we are attempting to call to do this doesn't exist, which causes ganache to crash.
We'll fix this by:
supporting binary data in websocket messages
fix our catch so it returns a proper jsonrpc 2.0 error response (with code: -32600) and a relevant error message.
ganache-cli can't return accounts info via websocket
Expected Behavior
return the accounts info of the ganache-cli server.
Current Behavior
ganache-cli server crashed with the following stack:
Possible Solution
Websocket request handler issue.
Steps to Reproduce (for bugs)
ganache-cli --account 0x0afd7091ee9e4dc73aa75ac00a4be3e5d1d475fa0c18d2b837372fe0ab2e392c,0xFFFFFFFFFFFFFFFFFF 0x96519d4e91b8c5056ac909fe19a6d6d58f45a9f03d31b7f2836c01af19a9a1d7,0xFFFFFFFFFFFFFFFFFF 0xd56a9fc3338826bb41e67b9975bd294833698de5800bc2377307800598458088,0xFFFFFFFFFFFFFFFFFF.
Context
ganache-cli
withinfura.io
under the same web3.py client .infrura.io
can return the expected result whereasganache-cli
can't . I suppose it is a bug forganache-cli
.the ws client
plugin in chrome , it worked:I sent
and got the correct result :
Your Environment
The text was updated successfully, but these errors were encountered: