我在web3提供程序上运行时出错(本地主机:8545)
Not possible to connect to the Web3 provider. Make sure the provider is running and a connection is open (via IPC or RPC).所以我想出了下面的方法。
我在本地运行geth,我给出了一些连接remix和testnet的选项。
$ geth —testnet —rpc —rpcapi “db, net, web3, personal” —rpccorsdomain “https://remix.ethereum.org” console我给了-rpccorsdomain,因为混音是在https上。
无论如何,在remix集成开发环境的Run选项卡上检查一下'web3 prover‘。
然后,将地址修改为'http://127.0.0.1:8545‘而不是'http://localhost:8545’。
我不知道为什么,但不管怎样,当我像这样修复它时,它还是起作用了。我做了我的账户并做了一些事情。
然而,由于某种原因,我不得不重新下载geth。(我已经更换了我的电脑)。我现在正在同步这些区块。我认为同步还没有完成,因为blockNumber是0。
> eth.blockNumber
0所以..。我现在正在等待,但我想知道当eth.syncing还没有完全完成时,错误可能会发生。
发布于 2018-03-28 00:01:29
HTTPS不会让你连接到在HTTP上运行的TestRPC。因此,您需要使用HTTP运行IDE。
http://remix.ethereum.org/发布于 2018-02-16 20:07:40
只需从地址栏中删除HTTPS并使用HTTP,它就会起作用:-)
参考:https://ethereum.stackexchange.com/users/32516/cryptoparticle
发布于 2018-04-04 02:27:53
如上所述,从地址栏中删除HTTPS并使用HTTP。另外,我在http://localhost:8545上运行了它
geth --datadir . --port <your_port_no> --networkid 1234 --rpc --rpcport "8545" --rpccorsdomain "*" console 2>console.log我使用这个,它总是对我有效。
注意:如果你只使用一个节点,那么网络id是没有用的,不管怎么说,如果你只是把它留在那里也没有什么坏处。如果你进一步遇到任何其他问题,一定要让我知道。
https://stackoverflow.com/questions/48273500
复制相似问题