# WalletInitialization Error: Invalid params passed in, targetId is required for embed widget

**URL:** <https://builder.metamask.io/t/walletinitialization-error-invalid-params-passed-in-targetid-is-required-for-embed-widget/2545>\
**Category:** Embedded Wallets (Web3Auth)\
**Created:** [October 16, 2025, 4:40pm UTC](https://builder.metamask.io/t/walletinitialization-error-invalid-params-passed-in-targetid-is-required-for-embed-widget/2545 "2025-10-16T16:40:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arto\_Eskola](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/arto_eskola/32/1559_2.png) [@Arto\_Eskola](https://builder.metamask.io/u/Arto_Eskola)\
**Post date:** [October 16, 2025, 4:40pm UTC](https://builder.metamask.io/t/walletinitialization-error-invalid-params-passed-in-targetid-is-required-for-embed-widget/2545/1 "2025-10-16T16:40:31Z")

</div>

I’m trying to make default setup for Vite+React

This is after i have done the getting started section. There no reference on target id or embed widget on docs and im first timer on web3auth

Any help?

---

<div class="post-metadata">

**Author:** ![shana](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@shana](https://builder.metamask.io/u/shana)\
**Post date:** [October 20, 2025, 11:42am UTC](https://builder.metamask.io/t/walletinitialization-error-invalid-params-passed-in-targetid-is-required-for-embed-widget/2545/2 "2025-10-20T11:42:23Z")

</div>

Hi could you please reference the documentation you are using? Are you still looking for help apologies for the wait

---

<div class="post-metadata">

**Author:** ![Jason\_Martin-Smith](https://yyz1.discourse-cdn.com/flex011/user_avatar/builder.metamask.io/jason_martin-smith/32/2100_2.png) [@Jason\_Martin-Smith](https://builder.metamask.io/u/Jason_Martin-Smith)\
**Post date:** [December 4, 2025, 11:02am UTC](https://builder.metamask.io/t/walletinitialization-error-invalid-params-passed-in-targetid-is-required-for-embed-widget/2545/3 "2025-12-04T11:02:58Z")

</div>

I’m getting this same issue, i have installed the latest. and followed this step:

> **[React Hooks for Ethereum (via Wagmi) | MetaMask developer documentation](https://docs.metamask.io/embedded-wallets/sdk/react/ethereum-hooks/)**
>
> @web3auth/modal Ethereum React Hooks | Embedded Wallets

oddly it worked yesterday but now i get the following error:

`chunk-M7DFPOBX.js?v=a4ae09ab:4663 Error: Invalid params passed in, targetId is required for embed widget`  
`at overrideDefaultMethod (chunk-M7DFPOBX.js?v=a4ae09ab:4659:30)`  
`at Logger.error (chunk-M7DFPOBX.js?v=a4ae09ab:4704:13)Caused by: WalletInitializationError: Invalid params passed in, targetId is required for embed widget`  
`at _WalletInitializationError.fromCode (chunk-P2ZZLXAH.js?v=a4ae09ab:11039:12)`  
`at _WalletInitializationError.invalidParams (chunk-P2ZZLXAH.js?v=a4ae09ab:11073:39)`  
`at new LoginModal (chunk-ZF4GU45I.js?v=a4ae09ab:37278:39)`  
`at Web3Auth.init (chunk-ZF4GU45I.js?v=a4ae09ab:37416:25)`  
`at async init (chunk-F3WT6QBF.js?v=a4ae09ab:63:9) ‘Failed to initialize modal’`

I thought maybe it was a cache issue so i dropped node\_modules and installed everything again, still same issue. so i removed it all and followed the tutorial again.. same issue.

I debugged the issue and found in your code you have this check (note its transpiled)

`if (_uiConfig.widgetType === WIDGET_TYPE.EMBED && !_uiConfig.targetId) { log.error("targetId is required for embed widget"); throw WalletInitializationError.invalidParams("targetId is required for embed widget"); }`

where the uiConfig object exists, but “targetId” does not. This is odd, because i thought version 10 did not require a targetId given that the UI config is handled on the web3auth dashboard? Anyway, if i manually provide a targetId, it stops erroring. but obviously breaks the layout of my site…

EDIT: so the only way to force it to use modal is to add a uiconfig object and put `widgetType: ‘modal’` as the key value pair. so its not quite _all_ managed in the web3auth dashboard.

---

<div class="post-metadata">

**Author:** ![shana](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@shana](https://builder.metamask.io/u/shana)\
**Post date:** [December 6, 2025, 10:25am UTC](https://builder.metamask.io/t/walletinitialization-error-invalid-params-passed-in-targetid-is-required-for-embed-widget/2545/4 "2025-12-06T10:25:57Z")

</div>

It’s very strange, is it still throwing the same error?
