web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

TypeError at NewAccountMethod.set

Open cypheron opened this issue 7 years ago • 4 comments

Expected behavior

When running this line of code: web3.eth.personal.newAccount("").then(console.log); I should get the address of newly created account according to documentation.

Actual behavior / Steps to reproduce the behavior

However, I do get following error message when running the code on different platforms and different node versions (see further below for version details):

Error Logs

`/root/dev/bot/node_modules/web3/node_modules/web3-core-method/dist/web3-core-method.cjs.js:411 throw new TypeError("The latest parameter should be a function otherwise it can't be used as callback"); ^

TypeError: The latest parameter should be a function otherwise it can't be used as callback at NewAccountMethod.set (/root/dev/bot/node_modules/web3/node_modules/web3-core-method/dist/web3-core-method.cjs.js:411:17) at Proxy.anonymousFunction (/root/dev/bot/node_modules/web3/node_modules/web3-core-method/dist/web3-core-method.cjs.js:224:28) at Object. (/root/dev/bot/index.js:7:19) at Module._compile (internal/modules/cjs/loader.js:736:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:747:10) at Module.load (internal/modules/cjs/loader.js:628:32) at tryModuleLoad (internal/modules/cjs/loader.js:568:12) at Function.Module._load (internal/modules/cjs/loader.js:560:3) at Function.Module.runMain (internal/modules/cjs/loader.js:801:12) at executeUserCode (internal/bootstrap/node.js:526:15) at startMainThreadExecution (internal/bootstrap/node.js:439:3)`

Versions

NPM 6.5.0, Node v7.10.1 / v8.15.0 / v11.8.0, Web3-1.0.0-beta.41, Debian (Stretch) / Arch, 4.9.0-8-amd64 / 4.20.3-arch1-1-ARCH

cypheron avatar Jan 30 '19 02:01 cypheron

same issue.

servantcdh avatar Jan 31 '19 02:01 servantcdh

Similiar error when running web3.eth.personal.sendTransaction

`/root/dev/bot/node_modules/web3-core-method/dist/web3-core-method.cjs.js:411 throw new TypeError("The latest parameter should be a function otherwise it can't be used as callback"); ^

TypeError: The latest parameter should be a function otherwise it can't be used as callback at SendTransactionMethod.set (/root/dev/bot/node_modules/web3-core-method/dist/web3-core-method.cjs.js:411:17) at Proxy.anonymousFunction (/root/dev/bot/node_modules/web3-core-method/dist/web3-core-method.cjs.js:224:28) ...`

cypheron avatar Jan 31 '19 12:01 cypheron

Thanks for submitting this issue @cypheron will fix and release it on Monday.

nivida avatar Jan 31 '19 18:01 nivida

#theSameIssue. o-O

zymtx5g79k avatar Feb 01 '19 05:02 zymtx5g79k