Error logging into Web3Auth Smart Account

Hi, I’m seeing an issue when using metamask smart accounts with my web3auth instance using sapphire devnet locally. I tried honing in on the issue and found that it is also happening in the example smart account project leading me to think this is an SDK/Server Side issue. please help and take a look!

Example Project link so you can run locally and see: web3auth-examples/other/smart-account-example at main · Web3Auth/web3auth-examples · GitHub

SDK version: “@web3auth/modal”: “10.0.4”
Platform: web

I’m using the web3auth smart account example project, provider initialization code is found here: web3auth-examples/other/smart-account-example/src/provider.tsx at main · Web3Auth/web3auth-examples · GitHub

Error Message

chunk-ND7OWMWQ.js?v=8c36952f:3402 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'substring')
    at checksumAddress (chunk-ND7OWMWQ.js?v=8c36952f:3402:81)
    at chunk-6SUKJWZG.js?v=8c36952f:8195:37
    at Array.map (<anonymous>)
    at getAddresses (chunk-6SUKJWZG.js?v=8c36952f:8195:20)
    at async MetamaskSmartAccount.getSmartAccount (chunk-DV3NKGXT.js?v=8c36952f:108648:26)
    at async AccountAbstractionProvider.setupProvider (chunk-6FRC4KUZ.js?v=8c36952f:431:26)
    at async AccountAbstractionProvider.getProviderInstance (chunk-6FRC4KUZ.js?v=8c36952f:490:3)
    at async AuthConnector.<anonymous> (chunk-MHVGSCGV.js?v=8c36952f:16086:28)
<Web3AuthProvider>		
AppProvider	@	provider.tsx:22
<AppProvider>		
(anonymous)	@	main.tsx:9

Thank you for the detailed report, Cyphera! Here’s a summary of your issue for the Web3Auth support team:


Issue Summary

  • SDK: Web3Auth Plug and Play (PnP) Web SDK
  • SDK Version: @web3auth/modal v10.0.4
  • Platform: Web
  • Network: Sapphire Devnet (locally)
  • Error Context: Occurs when using Metamask Smart Accounts with Web3Auth in the smart account example project.
  • Error Message:
    Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'substring')
        at checksumAddress ...
    
  • Provider Initialization Code: provider.tsx
  • Screenshot: Provided (shows the error in the browser console).
  • Reproducibility: Happens both in your local project and in the official example.

Next Steps & Suggestions

  • The error trace suggests that an address value is undefined when the SDK tries to process it (likely in the checksumAddress function).
  • Since this happens in the official example, it could be an SDK or server-side regression.
  • Please confirm:
    • Which login method/provider are you using (e.g., Google, Email, etc.)?
    • Are you using any custom authentication/verifier, or is this out-of-the-box Web3Auth + Metamask Smart Account?
  • If you have made any modifications to the example, please share those details.

In the meantime, you can try:

  • Ensuring all dependencies are up to date (npm install in the example project).
  • Clearing browser cache/local storage and retrying the flow.

Reference


Thank you for providing the code links and screenshot—this will help the team investigate faster. If you have any additional logs or context, feel free to add them here!

The support team will review and get back to you soon.

Note: This response was generated by an AI bot and may require further verification. The Web3Auth support team has tracked this issue and will be responding as soon as possible.

Additionally, we would recommend you to join our biweekly Office Hours to get this resolved even faster. Web3Auth Developer Office Hours

I am getting the same issue. Web3Auth’s native smart account (MetaMask’s smart account) fails to initialize with the same error: Cannot read properties of undefined (reading 'substring')

seems fixed now, thanks for the quick fix

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.