Trying to run truffle console I got this typical error:

enter image description here

I've checked my configuration and it seems OK to me (I don't know why truffle is trying to connect to Here you can see my project:

enter image description here

As you can see, the deployment of my 5 contracts was good. Infura is also working because I'm receiving data and I'm able to see my contracts deployed on https://kovan.etherscan.io. Moreover, Metamask is also connected and working:

Connected sites

Account 1 is connected to these sites. They can view your account address.


Am I forgetting something?

1 Answer 1


If you don't specify the network in truffle it will default to the network named development. if you don't define the development network in your config file it will default to the default development network spec it has hardcoded.

to use your kovan network you will need to specify the network :

truffle console --network=kovan

this will work with any truffle command (compile, migrate, etc.)

  • 1
    It's working now. Ty man, didn't know about it (just starting with truffle).
    – Joncarre
    Jul 26, 2021 at 15:46
  • Maybe a silly question, but... how can i see my dapp on my browser? I mean: i have all of that but now...? Because I tried localhost with the port but I think I'm doing something in a wrong way.
    – Joncarre
    Jul 26, 2021 at 18:55
  • @Joncarre - try localhost:3000 - I'm guessing you are using truffle that ships with create-react-app so starting the frontend client will be a different command yarn start
    – HAS-Jack
    Jul 26, 2021 at 20:46
  • @HAS-Jack in my app.js I have my web3.providers.httpprovider('http://localhost:7545') but I'm trying to access to it via browser and nothing happen (Unable to connect error). By the way, do I need node running? Sorry but I'm still trying to understand all the components here. Because I thought that part is executed in Kovan (or I'm wrong?) Moreover, I'm trying to access via https://kovan.infura.io/v3/API_KEY cause I'm using Infura
    – Joncarre
    Jul 26, 2021 at 21:53
  • 1
    @Joncarre by default don't think truffle creates a dapp for you, so you will have to do it yourself or use an existing truffle box boilerplate project, there the docs will guide you. Jul 28, 2021 at 19:09

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.