Web3auth (mumbai chain) blocked by CORS

Can you post what you’ve done in Web3AuthConnector.js as well as your Moralis authenticate code - the RPC change is still working from my end.

If you want to log it, add console.log("Current RPC", ethChainConfig.rpcTarget).

Although unfortunately it seems the same issue is happening occasionally with this different RPC as of today (but it doesn’t happen on each app load).

There is likely something wrong on Web3Auth’s side.

Below is what i done in Web3AuthConnector.js.
Interestingly, the console log is not found as well.

Below is my code for Moralis authentication.

Odd, can you doublecheck you are working with the same connector file at the path mentioned above moralis\lib\browser\Web3Connector. What does your package.json look like? Maybe there’s something else involved.

case 7:

  if (chainId === '0x13881') {
    ethChainConfig = {
      chainNamespace: 'eip155',
      chainId: (0, _verifyChainId.default)(chainId),
      rpcTarget: 'https://rpc-mumbai.matic.today'
    }; // Build Web3Auth

  } else {
    ethChainConfig = {
      chainNamespace: 'eip155',
      chainId: (0, _verifyChainId.default)(chainId),
    }; // Build Web3Auth
  }

  console.log("Current RPC", ethChainConfig.rpcTarget)

Any idea what is _N_E and where does it resides?
I verified I made the code change in Web3AuthConnector.js based on the directory you mentioned but it does not seems to be reflected.
The file I am editing is not correct?
I reinstalled the app server and copied only the pages and components over and I am still getting the same error.

I see node_modules folder there too, below that _N_E folder

what kind of project do you run: vanilla js, react, something else?

I got it to work.
It is because of the cache in the browser.
I am using Next.js.
I am not sure whether it is nature of Next.js or Web3Auth, there are openlogin data cache in the browser.
Once I cleared them, it is working.
Thank you!

2 Likes