Web3auth social login suddenly stopped working on mainnet, getting following errors in console, please find the screenshots attached

1 Like

Please provide more details like,

  1. package.json for version
    2.web3Auth instance code

Check whether you have added the prod URL on web3dashboard mainnet section or not.

Hi i am also facing the same issue

using this
@web3auth/web3auth": "^1.1.1 in package.json
attached screenshot for instance code

use this package @web3auth/modal”: “^4.4.2”, and try this

         const web3auth = new Web3Auth({
          clientId: web3clientId,
          web3AuthNetwork: "mainnet",
          chainConfig: {
          chainNamespace: CHAIN_NAMESPACES.EIP155,
          chainId: "0x1",
          rpcTarget: "https://rpc.ankr.com/eth",
          },
          uiConfig: {
            appName:'Test Web3 Auth',
            theme: "dark",
            loginMethodsOrder: ["google"],
          }
        });

       await web3auth.initModal();
       if (web3auth.provider) {
         const web3Instance = new Web3(web3auth.provider);
         const user = await this.web3auth.getUserInfo();
      }else{
         await this.web3auth.connect();
      }

Hey @akashswamy.maticz @puneet @Bluerain

Please see this to fix it for your prod build.

@shahbaz
hi
i am getting this error in initial connect
TypeError: Cannot convert a BigInt value to a number

here is my code

useEffect(() => {
const init = async () => {
try {
const web3auth = new Web3Auth({
clientId: “BLXQnJzDLd8Pvx6LwL8arxLz-fj8Zbx-PTi4lEOSc9tg20w1vptaiiqBPMd0gZ8mkM5E_Ubj7r3sPZJrW9k3xz4”,
web3AuthNetwork: “testnet”,
chainConfig: {
chainNamespace: “eip155”,
chainId: “0x97”,
rpcTarget: “https://data-seed-prebsc-1-s1.binance.org:8545/”,
// Avoid using public rpcTarget in production.
// Use services like Infura, Quicknode etc
displayName: “Polygon Mumbai”,
blockExplorer: “https://data-seed-prebsc-1-s1.binance.org:8545/”,
ticker: “BNB”,
tickerName: “Binance”,
},

    });
    console.log("initial Web3Auth", web3auth);
    setWeb3auth(web3auth);

    await web3auth.initModal();
  } catch (error) {
    console.error("Catch error in Web3Auth", error);
  }
};

init();

}, []);

in catch console i am getting this error TypeError: Cannot convert a BigInt value to a number

and error in web3auth.initModal();

Hey @akashswamy.maticz
Please share your package.json file here.

Hi Shahbaz, I am one of the subscribers to Web3Auth and my programmer is trying to solve this for me. Thanks for helping us.

@akashswamy.maticz is my programmer

Hi @shahbaz ,

I have sent the package.json file yesterday in the mail. Hope you received it. When can we expect an update from you.

Hey @patrick and @akashswamy.maticz

I did not receive the package.json. Which email did you send it to? Please send it to my email.

Aka, can you send please?

Hi @shahbaz can you share you mail ID or you can mailto : akashswamy.maticz@gmail.com so I can share you the json file.

I have shared you the json file to this mail id : community@web3auth.io

Hey @akashswamy.maticz

Can you try changing your package.json’s browserlist from:

"browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all",
      "chrome >= 67",
      "edge >= 79",
      "firefox >= 68",
      "opera >= 54",
      "safari >= 14"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }

to

"browserslist": {
    "production": [
      "chrome >= 67",
      "edge >= 79",
      "firefox >= 68",
      "opera >= 54",
      "safari >= 14"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }

Hi @shahbaz

i have try this its not worked.I am getting still error
TypeError: Cannot convert a BigInt value to a number

Hi @shahbaz

i have changed and try this in package.json .but i am still getting the error
Screenshot from 2023-03-24 15-02-13

@shahbaz
How’s the status?

Hey @patrick @akashswamy.maticz

This should have fixed the issue. Can you share you package.json once again? a demo video would also help.