1

I'm trying to launch my first DApp using truffle and testrpc. I keep running into the above error once the web page loads. I looked at the Truffle Contract json object and the networks value is empty ({}). This definitely has something to do with it but I'm not sure what the issue is.

Thanks.

0

I looked at the Truffle Contract json object and the networks value is empty ({}).

I believe you have not deployed your contract to testrpc,to do so go to the folder where your contract resides and make sure you have truffle installed and run the below command.

truffle migrate

This will have network value(json) with the address of contract been deployed to(use the last one if you see more than one json object when interacting with web3). If you have not compiled our contract then try truffle compile and then migrate.

  • Thanks Rangesh. When I do truffle migrate, i get an 'out of gas' error. any idea why? – Tope Sep 10 '17 at 7:50
  • which network are you into ? Is it testrpc ? – Rangesh Sep 10 '17 at 8:04
  • Yes. testrpc. I have resolved this issue by increasing the gas amount in the deploy_contracts.js file. The issue i'm having now is that the metamask account that is trying to interact with my contract is locked and i'm not sure how to unlock it. – Tope Sep 10 '17 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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