This contract object doesn't have address set yet (Truffle React Box error)


I’m trying to access to localhost:3000 using Truffle React box. When I execute npm run start I get this error:

Unhandled Rejection (Error): This contract object doesn’t have address set yet, please set an address first.

Screenshot from 2021-07-28 12-39-30

The page shows a problem about the contract address. But the contract address has its address when it has been deployed to kovan network (I can see it everytime I execute migrate --network kovan ). Am I missing something? I followed these steps:

My enviroment:

Operating System: Linux Mint 20.1 Cinnamon
Ethereum client: Infura (with Metamask wallet)
Truffle v5.4.2 (core: 5.4.2)
Solidity - 0.6.6 (solc-js)
Node v14.17.3
Web3.js v1.4.0

Solutions that I’ve already tried:

Please, this error is driving me crazy :pensive:

Found a solution. After this piece of code:

      const instance = new web3.eth.Contract(
        deployedNetwork && deployedNetwork.address,

I’ve added this line:

instance.options.address = "[my contract' address on kovan]"