You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected it to return the value of the smart contract I called.
Actual behavior
Steps to reproduce the behaviour
[First step]
[Second step]
[and so on...]
Logs
I ran node web3.js in the terminal to test contract functions and it returned
internal/validators.js:125
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type object
at validateString (internal/validators.js:125:11)
at Module.require (internal/modules/cjs/loader.js:632:3)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (D:\Sammy\Projects\Altostream-Smartcontract\Web3\web3.js:5:14)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Environment
node version v10
web3 v1.2.11
Windows 10
The text was updated successfully, but these errors were encountered:
It looks like you you try to call a function of your smart contract with an argument that is of the wrong type (id should be a string and not an object).
It seems it is a normal behavior as web3 checks the arg type before making the request.
try to log the arguments before making the call and see what happens
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.
Expected behaviour
I expected it to return the value of the smart contract I called.
Actual behavior
Steps to reproduce the behaviour
Logs
I ran node web3.js in the terminal to test contract functions and it returned
internal/validators.js:125
throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
^
TypeError [ERR_INVALID_ARG_TYPE]: The "id" argument must be of type string. Received type object
at validateString (internal/validators.js:125:11)
at Module.require (internal/modules/cjs/loader.js:632:3)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (D:\Sammy\Projects\Altostream-Smartcontract\Web3\web3.js:5:14)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
Environment
node version v10
web3 v1.2.11
Windows 10
The text was updated successfully, but these errors were encountered: