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
As was mentioned briefly in this comment, eth.getAccounts() fails with the latest release of web3 and truffle-hdwallet-provider
Expected behavior
Code didn't change, only updated packages, and eth.getAccounts() should return accounts
Actual behavior
Fails.
Steps to reproduce the behavior
const Web3 = require('web3');
const HDWalletProvider = require('truffle-hdwallet-provider');
let provider = new HDWalletProvider(process.env.MNEMONIC, infuraNodeURL(false, network));
let web3 = new Web3(provider);
const accounts = await web3.eth.getAccounts();
// see error below
Error Logs
(node:31402) UnhandledPromiseRejectionWarning: Error: invalid json request
at /Users/carlos/Desktop/helbiz/hbz-listen/node_modules/truffle-hdwallet-provider/dist/index.js:15:620862
at e.i.onreadystatechange (/Users/carlos/Desktop/helbiz/hbz-listen/node_modules/truffle-hdwallet-provider/dist/index.js:15:775522)
at e.t.dispatchEvent (/Users/carlos/Desktop/helbiz/hbz-listen/node_modules/truffle-hdwallet-provider/dist/index.js:1:152983)
at e._setReadyState (/Users/carlos/Desktop/helbiz/hbz-listen/node_modules/truffle-hdwallet-provider/dist/index.js:15:780284)
at e._onHttpResponseEnd (/Users/carlos/Desktop/helbiz/hbz-listen/node_modules/truffle-hdwallet-provider/dist/index.js:15:783369)
at IncomingMessage.<anonymous> (/Users/carlos/Desktop/helbiz/hbz-listen/node_modules/truffle-hdwallet-provider/dist/index.js:15:782627)
at IncomingMessage.emit (events.js:187:15)
at IncomingMessage.EventEmitter.emit (domain.js:442:20)
at endReadableNT (_stream_readable.js:1092:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
As was mentioned briefly in this comment,
eth.getAccounts()
fails with the latest release of web3 and truffle-hdwallet-providerExpected behavior
Code didn't change, only updated packages, and
eth.getAccounts()
should return accountsActual behavior
Fails.
Steps to reproduce the behavior
Error Logs
Versions
npm: 6.8.0
node: v10.11.0
web3: 1.0.0-beta.47
truffle-hdwallet-provider: 1.0.5
The text was updated successfully, but these errors were encountered: