Local Tests are working, error while trying to test on testnets

Tests are running fine on local ganache instance;

as soon as I try to run it on some test network, rinkeby or BSC testnet I get the following error:

Error: invalid address (argument="address", value=undefined, code=INVALID_ARGUMENT, version=address/5.0.5) (argument="_to", value=undefined, code=INVALID_ARGUMENT, version=abi/5.0.7)

:computer: Environment
@openzeppelin/contracts-upgradeable”: “^4.0.0”,
“truffle”: “^5.3.1”

:1234: Code to reproduce

This looks like using an undefined address, either for a contract that has not been deployed, of a call parameter that is not set.

Can you nail down which file / line causes that ?

1 Like

It was a rookie mistake, the tests were using multiple accounts (wallet addresses), but only one was “initialized”

Thanks for pointing to the right direction

How did you resolve that? I am also stuck on the same problem

Hi, welcome! :wave:

Maybe you can open a new topic to show more details.