REMIX | Not possible to connect to the Web3 Provider

10,280

Solution 1

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

http://remix.ethereum.org/

Solution 2

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

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

Solution 3

As everyone mentioned above, remove HTTPS from the address bar and use HTTP. Also, I ran it on http://localhost:8545

geth --datadir . --port <your_port_no> --networkid 1234 --rpc --rpcport "8545" --rpccorsdomain "*" console 2>console.log

I use this and it always works for me.

NOTE: network id is useless if you are using only one node, anyway there is no harm if you just leave it there. Do let me know if you face any other issue further.

Share:
10,280
rachel_hong
Author by

rachel_hong

Updated on July 18, 2022

Comments

  • rachel_hong
    rachel_hong almost 2 years

    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.

    • Adam Kipnis
      Adam Kipnis over 6 years
      There's a lot of "I had this problem then fixed it like this" comments in this question. I have no idea what's being asked. Please edit your question to be more concise. See stackoverflow.com/help/how-to-ask.
  • Dariusz Woźniak
    Dariusz Woźniak about 6 years
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
  • CryptoParticle
    CryptoParticle about 6 years
    Thanks for the comment. Formatted the answer :-)
  • Akhil Kintali
    Akhil Kintali about 5 years
    I used http as suggested. But I still am getting the same error.
  • Lam Le
    Lam Le over 4 years
    I can confirm this works. My Azure Ethereum POA Network runs on HTTP. Changing Remix URL from HTTPS to HTTP fixed the problem.