I have currently building DAPP project and I am using the sepolia test net with metamask. I do have sepolia network in my metamask and the smart contract is also works. The Problem is when we trying to connect the frontend with the backend.'

    var provider = new ethers.providers.Web3Provider(

But when I change the the network from the sepolia to goerli the error gets resolved, But i am not having enough ethers to deploy from goerli and most faucets are not working for me.enter image description here

2 Answers 2


Try downgrading your ethers version. I know there are numerous problems in connecting with Sepolia > 6, so try a popular version such as 5.7.2

  • thx, I downgrade ethers from 6.3.0 to 5.7.2 and now I can connect to Sepolia test net
    – Adri HM
    Apr 10, 2023 at 9:50

How your web3 object is configured currently? Maybe that object currently doesn't contain the relevant information for connecting to the Sepolia network.

You could also try instantiating your provider without web3:

var provider = ethers.getDefaultProvider("sepolia");

Other options involve using Infura or Alchemy keys directly in Ethers.

Regarding Goerli faucets, try this one, usually works for me though requires some patience:


  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Apr 7, 2023 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.