8

I am trying to make a truffle application.

truffle compile : working fine making a 'build' folder with .json files in it. truffle migrate : Gives the following error I am running testrpc in another powershell window. OS : Windows 8.1

Error: Invalid JSON RPC response: ""
    at Object.InvalidResponse (C:\Users\RK\AppData\Roaming\npm\node_modules\truffle\node_modules\web3\lib\web3\errors.js
:35:16)
    at XMLHttpRequest.request.onreadystatechange (C:\Users\RK\AppData\Roaming\npm\node_modules\truffle\node_modules\web3
\lib\web3\httpprovider.js:116:32)
    at XMLHttpRequestEventTarget.dispatchEvent (C:\Users\RK\AppData\Roaming\npm\node_modules\truffle\node_modules\xhr2\l
ib\xhr2.js:64:18)
    at XMLHttpRequest._setReadyState (C:\Users\RK\AppData\Roaming\npm\node_modules\truffle\node_modules\xhr2\lib\xhr2.js
:354:12)
    at XMLHttpRequest._onHttpRequestError (C:\Users\RK\AppData\Roaming\npm\node_modules\truffle\node_modules\xhr2\lib\xh
r2.js:544:12)
    at ClientRequest.<anonymous> (C:\Users\RK\AppData\Roaming\npm\node_modules\truffle\node_modules\xhr2\lib\xhr2.js:414
:24)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:310:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1278:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9)
4
  • 1
    i'm having the same issue when im not connected to the internet. running local testrpc. There has been some discussion on gitter that starting testrpc in the same dir as you migrate helps however it didnt make any difference for me. have you made any progress?
    – Andrew
    Commented Mar 8, 2017 at 8:58
  • 1
    @Andrew Welcome Andrew. I'm just tidying up a little since this isn't an answer. I realize you might not be able to leave comments until you have more points on this site. Not a problem. :-) i'm having the same issue. There has been some discussion on gitter that starting testrpc in the same dir as you migrate helps however it didnt make any difference for me. have you made any progress? Commented Mar 8, 2017 at 9:08
  • I usually have this error when testRPC dies in the background. Have you checked the console output of testrpc? What's your testrpc version? I've encountered more testrpc crashes with newer versions but the latest 4.0.1 is fairly stable again
    – szerte
    Commented Jul 7, 2017 at 10:14
  • I am having the same problem, did anyone get the solution? I have tried using ganache and testrpc both. But, neither worked. Also, I tried starting testrpc in my current project directory but it too didn't do any good. I am questioning my life right now :D Commented Feb 10, 2018 at 10:10

1 Answer 1

1

As suggested by @Rob, running testrpc from the same folder in which truffle console is run solved the issue in my case

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.