I'm using:
- web3 v0.20.6
- web3-providers-ws v1.0.0-beta.34
First question - can web3-providers-ws
be used with web3
v0.20.*
?
Second question (problem) - I get an error when probably trying to send transaction (reading and watching events through this provider is totally fine).
Pull request: https://github.com/ethereum-alarm-clock/timenode-core/pull/146
Working HTTP provider E2E tests:
https://travis-ci.org/ethereum-alarm-clock/timenode-core/jobs/406823597
Failing WS provider E2E tests:
https://travis-ci.org/ethereum-alarm-clock/timenode-core/jobs/406823603
Actual error:
5 passing (4s)
3 failing
1) ScheduleTx
schedules a basic transaction:
TypeError: Cannot set property 'method' of undefined
at WebsocketProvider._addResponseCallback (node_modules/web3-providers-ws/src/index.js:197:39)
at WebsocketProvider.send (node_modules/web3-providers-ws/src/index.js:252:10)
at RequestManager.send (node_modules/web3/lib/web3/requestmanager.js:58:32)
at Eth.get [as accounts] (node_modules/web3/lib/web3/property.js:107:62)
at Object.<anonymous> (test/e2e/TestScheduleTx.ts:75:34)
at Generator.next (<anonymous>)
at fulfilled (test/e2e/TestScheduleTx.ts:4:58)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
The only difference between HTTP provider and WS provider is using ws://localhost:5454
instead of http://localhost:8545
. RPC I'm talking to is ganache-cli 6.1.6.