I’m getting this same issue, i have installed the latest. and followed this step:
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.