loomchain icon indicating copy to clipboard operation
loomchain copied to clipboard

Mysterious empty response that Truffle complains about

Open enlight opened this issue 6 years ago • 1 comments

When running the Truffle tests with the Truffle HDWallet provider there's a strange error at the start:

   Error: Invalid JSON RPC response: ""
    at Object.InvalidResponse (/mnt/c/Projects/work/loom/loom-sdk3/src/github.com/loomnetwork/loomchain/e2e/tests/truffle/node_modules/@truffle/hdwallet-provider/node_modules/web3-core-helpers/src/errors.js:42:16)
    at XMLHttpRequest.request.onreadystatechange (/mnt/c/Projects/work/loom/loom-sdk3/src/github.com/loomnetwork/loomchain/e2e/tests/truffle/node_modules/@truffle/hdwallet-provider/node_modules/web3-providers-http/src/index.js:92:32)
    at XMLHttpRequestEventTarget.dispatchEvent (/mnt/c/Projects/work/loom/loom-sdk3/src/github.com/loomnetwork/loomchain/e2e/tests/truffle/node_modules/xhr2-cookies/xml-http-request-event-target.ts:44:13)
    at XMLHttpRequest._setReadyState (/mnt/c/Projects/work/loom/loom-sdk3/src/github.com/loomnetwork/loomchain/e2e/tests/truffle/node_modules/xhr2-cookies/xml-http-request.ts:219:8)
    at XMLHttpRequest._onHttpRequestError (/mnt/c/Projects/work/loom/loom-sdk3/src/github.com/loomnetwork/loomchain/e2e/tests/truffle/node_modules/xhr2-cookies/xml-http-request.ts:379:8)
    at ClientRequest.<anonymous> (/mnt/c/Projects/work/loom/loom-sdk3/src/github.com/loomnetwork/loomchain/e2e/tests/truffle/node_modules/xhr2-cookies/xml-http-request.ts:266:37)
    at ClientRequest.emit (events.js:182:13)
    at Socket.socketOnEnd (_http_client.js:426:9)
    at Socket.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1094:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

This doesn't seem to prevent Truffle from successfully running migrations or tests, so not a super high priority to fix.

enlight avatar Oct 29 '19 08:10 enlight

Probably a truffle issue. In PR 1558 https://github.com/loomnetwork/loomchain/pull/1588 I tried the workaround given at https://github.com/trufflesuite/truffle/issues/852#issuecomment-456117546 This fixed the issue for HDWalletProvider, but just moved it to local which can't be fixed the same way due to the provider.createExtraAccountsFromMnemonic line. The latest truffle build might fix the issue; Or if we are satisfied its not our problem, ignore it.

Sriep avatar Nov 21 '19 00:11 Sriep