Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in jsonRpcProvider #4827

Closed
block98ct opened this issue Sep 3, 2024 · 2 comments
Closed

error in jsonRpcProvider #4827

block98ct opened this issue Sep 3, 2024 · 2 comments
Assignees
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6

Comments

@block98ct
Copy link

Ethers Version

6.13.2

Search Terms

No response

Describe the Problem

JsonRpcProvider failed to detect the network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)
getting this error on the server on my local machine it is working fine

network:- polygon-amoy
infuraUrl:- https://polygon-amoy.infura.io/v3/${myPrivateKey}

Code Snippet

const contractInstance = async (privateKey, address, abi) => {
  try {
       const wallet = new ethers.Wallet(privateKey);
       const provider = new ethers.JsonRpcProvider(
       process.env.INFURA_PROVIDER_URL
      );

    const connectedWallet = wallet.connect(provider);
    const contract = new ethers.Contract(address, abi, connectedWallet);

    return contract;
  } catch (error) {
    console.log(error);
  }
};

Contract ABI

No response

Errors

No response

Environment

Ethereum (mainnet/ropsten/rinkeby/goerli)

Environment (Other)

No response

@block98ct block98ct added investigate Under investigation and may be a bug. v6 Issues regarding v6 labels Sep 3, 2024
@apetersson
Copy link

is it possible this is related to this error? #4837

@ricmoo
Copy link
Member

ricmoo commented Oct 12, 2024

This has been fixed in v6.13.4.

Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. v6 Issues regarding v6
Projects
None yet
Development

No branches or pull requests

3 participants