Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REMIX | Not possible to connect to the Web3 Provider

I had an error to run on web3 provider (localhost:8545)

Not possible to connect to the Web3 provider. Make sure the provider is running and a connection is open (via IPC or RPC).

So I figured out like below.

I'm running geth on my local and I gave some options to connect with remix and testnet.

$ geth —testnet —rpc —rpcapi “db, net, web3, personal” —rpccorsdomain “https://remix.ethereum.org” console

I gave the -rpccorsdomain becuase the remix is on https.

anyway, check the 'web3 prover' on Run tab in remix IDE.

Then, modified the address like 'http://127.0.0.1:8545' not the 'http://localhost:8545'.

I don't know the reason why but it worked anyway when I fixed like that. I made my accounts and did something.

However, I had to redownload the geth again in some reason. (I've changed my pc). and I'm syncing the blocks right now. I think the syncing is not finished yet because the the blockNumber is 0.

> eth.blockNumber
0

so... I'm waiting now but I'm wondering that the error could occur when eth.syncing is not completely done.

like image 845
rachel_hong Avatar asked Dec 11 '22 08:12

rachel_hong


2 Answers

HTTPS won't let you connect to TestRPC running on HTTP. So you need to run the IDE with HTTP.

http://remix.ethereum.org/
like image 107
gtech Avatar answered Dec 27 '22 05:12

gtech


Just remove HTTPS from address bar and just use HTTP, and it will work :-)

Ref: https://ethereum.stackexchange.com/users/32516/cryptoparticle

like image 44
CryptoParticle Avatar answered Dec 27 '22 05:12

CryptoParticle