非常重要:如果使用Metamask运行以太坊区块链(web3.js)程序,一定不能开启【隐私模式】,否则会报如下错误:
web3-utils.umd.js?f5e0:452 Uncaught (in promise) Error: Given address "null" is not a valid Ethereum address.
at Object.toChecksumAddress (web3-utils.umd.js?f5e0:452)
at eval (web3-eth.umd.js?bb40:261)
at Array.forEach (<anonymous>)
at Proxy.set (web3-eth.umd.js?bb40:260)
at CollectionICO._callee$ (CollectionICO.js?b960:15)
at tryCatch (runtime.js?96cf:62)
at Generator.invoke [as _invoke] (runtime.js?96cf:288)
at Generator.prototype.(:8001/anonymous function) [as next] (webpack-internal:///./node_modules/regenerator-runtime/runtime.js:114:21)
at asyncGeneratorStep (asyncToGenerator.js?3b8d:5)
at _next (asyncToGenerator.js?3b8d:27)
Metamask现在安装的时候,自动开启了隐私,就是第三方应用程序不可以读取账号的信息,所以一定要开启,才能正常访问以太坊应用程序!
如何关闭隐私模式: