Running new function in upgraded contract causes revert in tutorial

I ran through the tutorial and didn't get the same issue that you are having when I ran myContract.increment()

Suggest you check the address that you specified in truffle console:
Make sure you replace with the address of the upgradeable instance your created of MyContract . This address was returned by the create command we ran in the previous section, which is the same as the one returned by the update command we ran above.

truffle(local)> myContract = await'<your-contract-address>')

Also when you setup the session, use a ganache account which isn't the first one.

How to create an upgradeable smart contract using ZeppelinOS — example of fixing smart contract vulnerable to underflow/overflow attacks
npx zos session --network local --from 0x9ea26a91A3eF090498827989d17FC0E7eEA0987f --expires 3600
Remember to replace the address after --from flag with one of your Ganache accounts, but do not use the first one ( account[0] ). I usually choose the second ( accounts[1] ) or the last one (accounts[9]). You should also use network specified in your truffle-config.js (in our case it is local ).

1 Like