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
selimerunkut/nft_troubleshoot

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