Getting below error when calling myContract.methods.myMethod().call()
TypeError: Invalid attempt to spread non-iterable instance
This this was working fine in previous beta versions 37, 36 etc. When I upgraded to beta.38 I started getting above error.
I've tested it on my local environment and couldn't replicate this issue. Could you please use the issue template and provide all the information.
I got same trouble, too.
my contract methods using openzeppelin-solidity(v2.1.2) failed even if contract.methods.totalSupply().call().
my enviroment is here.
Truffle v5.0.2 (core: 5.0.2)
Solidity v0.5.0 (solc-js)
Node v10.14.2
solc: Version: 0.5.2+commit.1df8f40c.Darwin.appleclang
Tested it again and got the same error. It was because of the deep cloning of the arguments. (fixed in #2232)
@nivida This seems to be working fine now. Thanks for providing quick fix.
I am getting the same error in this function:
const balanceOf = (application, web3, address) => {
return application.contract.methods.balanceOf(address).call()
.then(balance => {
console.log(`[TOKEN] Balance of '${address}' is ${balance}.`);
return { balance };
});
};
Most helpful comment
@nivida This seems to be working fine now. Thanks for providing quick fix.