# \[Archive\] Email Login Error: Must provide fallback error with integer number code and string message

**URL:** <https://builder.metamask.io/t/archive-email-login-error-must-provide-fallback-error-with-integer-number-code-and-string-message/1319>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [June 26, 2024, 1:31am UTC](https://builder.metamask.io/t/archive-email-login-error-must-provide-fallback-error-with-integer-number-code-and-string-message/1319 "2024-06-26T01:31:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ezekaemmanuel1710](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@ezekaemmanuel1710](https://builder.metamask.io/u/ezekaemmanuel1710)\
**Post date:** [June 26, 2024, 1:31am UTC](https://builder.metamask.io/t/archive-email-login-error-must-provide-fallback-error-with-integer-number-code-and-string-message/1319/1 "2024-06-26T01:31:52Z")

</div>

> **🏛 Archived Content from Web3Auth Community**
> 
> This topic was originally posted by **ezekaemmanuel1710** on 6/26/2024.  
> This content has been migrated from our previous community forum to preserve valuable discussions.

* * *

Hi Team,

I’m having the following error while logging in with an email address.

- **SDK Version** (package.json): “^7.3.0”
- **Platform** : Chrome
- **Browser Console Screenshots** :  

[![image](https://canada1.discourse-cdn.com/flex011/uploads/metamaskbuilderhub/original/1X/69c6e3c12d609a3883e1d2b2c7e2defffc16a657.png)
image784×333 17.7 KB
](https://web3auth.io/community/uploads/default/original/2X/2/24a302a4cde8d3f4ff4285b6ae2cc512f749b955.png "image")

---

<div class="post-metadata">

**Author:** ![Ayush](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/ayush/32/1540_2.png) [@Ayush](https://builder.metamask.io/u/Ayush)\
**Post date:** [June 26, 2024, 1:47am UTC](https://builder.metamask.io/t/archive-email-login-error-must-provide-fallback-error-with-integer-number-code-and-string-message/1319/2 "2024-06-26T01:47:52Z")

</div>

Hey @ezekaemmanuel1710 can you please share the initialization code, and login code?

---

<div class="post-metadata">

**Author:** ![ezekaemmanuel1710](https://avatars.discourse-cdn.com/v4/letter/e/ad7895/32.png) [@ezekaemmanuel1710](https://builder.metamask.io/u/ezekaemmanuel1710)\
**Post date:** [June 26, 2024, 7:05am UTC](https://builder.metamask.io/t/archive-email-login-error-must-provide-fallback-error-with-integer-number-code-and-string-message/1319/3 "2024-06-26T07:05:58Z")

</div>

Hi @Ayush , Thank you for your response.

Below is the initialization code

```auto
  useEffect(() => {
const initializeWeb3Auth = async () =&gt; {
  try {
    const web3auth = new Web3Auth({
      clientId: process.env.NEXT_PUBLIC_WEB3AUTH_CLIENT_ID as string,
      web3AuthNetwork:
        process.env.NODE_ENV === "production" ? "mainnet" : "testnet",
      chainConfig: {
        chainNamespace: "eip155",
        chainId: process.env.NEXT_PUBLIC_POLYGON_CHAIN_ID,
      },
    });
    // await web3auth.initModal();

    await web3auth.initModal({
      modalConfig: {
        [WALLET_ADAPTERS.OPENLOGIN]: {
          label: "openlogin",
          loginMethods: {
            google: {
              name: "google login",
              logoDark:
                "url to your custom logo which will shown in dark mode",
            },
            facebook: {
              // it will hide the facebook option from the Web3Auth modal.
              name: "facebook login",
              showOnModal: false,
            },
          },
          // setting it to false will hide all social login methods from modal.
          showOnModal: true,
        },
      },
    });
    dispatch(setWeb3Auth(web3auth));
  } catch (error) {
    console.log(error);
  }
};

initializeWeb3Auth();

```

Below is the login code:

```auto
const login = async () => {
  const dispatch = store.dispatch;
  const {
    web3Auth: { provider, web3Auth: web3auth },
  } = store.getState() as RootState;
  if (web3auth?.status === "connected") {
    dispatch(setProvider(web3auth.provider)); 
  } else {
    const connectedProvider = await web3auth.connect();
    dispatch(setProvider(connectedProvider));
  }
};

```

---

<div class="post-metadata">

**Author:** ![yashovardhan](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/yashovardhan/32/1526_2.png) [@yashovardhan](https://builder.metamask.io/u/yashovardhan)\
**Post date:** [June 27, 2024, 9:14am UTC](https://builder.metamask.io/t/archive-email-login-error-must-provide-fallback-error-with-integer-number-code-and-string-message/1319/4 "2024-06-27T09:14:13Z")

</div>

Hey @ezekaemmanuel1710

Can you specify which SDK you are currently using? If it is Web3Auth Modal SDK, you are on quite an old version of it. Please make sure you have updated to the latest v8.7

Additionally, I see your chain config is incomplete

```auto
chainConfig: {
            chainNamespace: "eip155",
            chainId: process.env.NEXT_PUBLIC_POLYGON_CHAIN_ID,
          },

```

Please make sure you are following the chainConfig mentioned here: [https://web3auth.io/docs/connect-blockchain/evm/polygon/web](https://web3auth.io/docs/connect-blockchain/evm/polygon/web)

Additionally, your modal config seems incorrect, I see the logo dark field, which is supposed to be a URL, has a random string over there. I’d recommend you to ideally delete the extra modal config fields that are not required.

Also try adding a try catch block in your login code, it will help you know if the error is being emitted on login or not.
