Next.js integration builder demo app fails to connect to Plug and Play

I am new to web3auth, and tried to start with the app from the Next.js integration builder.
I used that code and set up my Plug and Play project on the web3auth dashboard.
But the app fails to connect to that Plug and Play project with the following error:
"WalletInitializationError: Invalid params passed in, Please initialize Web3Auth with a valid clientId in constructor"

But I am passing the right clientId:

const clientId = ‘BOUw8Nm5-yTWjxUrAz2wgTL2n1W-6HKnv2eLK0VxldDgWJ3zc2s-r7n5eq2XxyPv6Lj1hIg8vvquPWhC39UcqCk’;
useEffect(() => {
const init = async () => {
try {
const web3authConfig: Web3AuthOptions = {
web3AuthNetwork: ‘testnet’,
enableLogging: true,
clientId: clientId,
chainConfig: {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: “0x1”,
rpcTarget: “https://rpc.ankr.com/eth”,
},
};
const web3auth = new Web3Auth(web3authConfig);
setWeb3auth(web3auth);
await web3auth.initModal();
setProvider(web3auth.provider);
} catch (error) {
console.error(error);
}
};

init();

}, []);

And the Plug and Play project (with the clientId):
Screenshot 2022-12-07 at 21 19 16

The full code is available here:
https://github.com/beynd/web3auth-trial

What do I miss about this clientId passing?

Any help is appreciated,
Thanks in advance



Originally posted by: szmizorsz

Check the discussion at: https://github.com/orgs/Web3Auth/discussions/1030

It seems to be a version problem, if I downgrade from the latest version (4.0.0-alpha.0) to 3.3.0, both the @web3auth/modal
and the @web3auth/base, the problem is gone.
BTW: why the alpha is the latest version?



Originally posted by: szmizorsz