Contract Upgrade Error "No Codec found"

After upgrading to the newest versions of hardhat which auto check for unsafe upgrades, i get the following error after launching a contract upgrade.

Note: The contract was successfully launched to the network, but now i’m concerned upgrading it since i get this error

Error: no codec found to encode value in union type ((({| address: string |} & Partial<{ txHash: string }>) & {| layout: any |}) | undefined)

Edit: I attempted to upgrade the same contract on ropsten and did not receive this error
Edit: #2 When i downgrade the packages and attempt to upgrade the contract i get the error TypeError: Cannot read property ‘length’ of undefined
at /Users/_/Desktop/Axion/axion-contracts/node_modules/@openzeppelin/upgrades-core/src/validate.ts:180:102. Only this time it’s before the contract gets sent to mainnet

1 Like

Hi @Dellybro,

I haven’t come across this before.

If I understand correctly, you have an upgradeable contract on mainnet, when you went to upgrade, you received the No Codec found error, but didn’t get the same on ropsten.

Can you share your upgrade script containing your upgradeProxy?

Please don’t include any secrets (e.g. provider API keys, mnemonics etc)

Hi @Dellybro, sorry about this issue. I’m going to be looking into it.

Can you please share more details: what plugin and what version were you using before? Please share the exact version (the one in package-lock.json or yarn.lock).

1 Like

Hey guys sorry for not responding but i actually figured out the issue. My .openzeppelin file was incorrect

1 Like