Failed to connect with wallet on No Modal SDK when using in Svelte

logins are getting error

Failed to connect with wallet. Failed to login with openlogin

not sure whats going on

I also face the same error:

https://status.web3auth.io/ nothing shows here but i do believe its down

https://openlogin.com/ seems to be down

I see. Hope web3auth can look into this asap.

Could you share more info on the issue? Since when are you seeing this, and is this intermittent or continuous?

This was an external site for us, did you mean to say https://app.openlogin.com? For me, it’s working.

connect.svelte:195 Failed to connect with openlogin provider LoginError: login popup has been closed by the user, 
    at _LoginError.fromCode (errors.ts:91:12)
    at _LoginError.popupClosed (errors.ts:103:23)
    at PopupHandler.<anonymous> (OpenLogin.ts:375:27)
    at PopupHandler.emit (events.js:153:5)
    at PopupHandler.ts:46:20
connect @ openloginAdapter.ts:132
await in connect (async)
connectTo @ noModal.ts:218
google @ connect.svelte:195
login @ connect.svelte:219
await in login (async)
click_handler @ connect.svelte:555

connect.svelte:329 WalletLoginError: Failed to connect with wallet. Failed to login with openlogin
    at _WalletLoginError.fromCode (index.ts:148:12)
    at _WalletLoginError.connectionError (index.ts:152:29)
    at OpenloginAdapter.connect (openloginAdapter.ts:141:30)
    at async Web3AuthNoModal.connectTo (noModal.ts:218:22)
    at async Object.google (connect.svelte:194:5)
    at async login (connect.svelte:219:5)

still getting these errors from openlogin its just failing to connect

It says the login popup has been closed by the user.

Could you share more details of your app? or is it related to @josephrios56’s issue?

I didn’t close the pop up, it auto close by itself

Could you share the screen capture of this?

how do i share the error is openlogin failed to connect with wallet

Please provide the following details

  • SDK Version:
  • Platform:
  • Browser Console Screenshots:
  • Related to Custom Authentication? Please provide the following info too: (Optional)
    • Verifier Name:
    • JWKS Endpoint:
    • Sample idToken(JWT)

Please provide the Web3Auth initialization and login code snippet below:

		"@web3auth/base": "^7.0.1",
		"@web3auth/ethereum-provider": "^7.0.1",
		"@web3auth/modal": "^7.0.1",
		"@web3auth/no-modal": "^7.0.1",
		"@web3auth/openlogin-adapter": "^7.0.1",
		"@web3auth/torus-wallet-connector-plugin": "^7.0.1",
		"@web3auth/web3auth-wagmi-connector": "^5.0.0",
	    "viem": "^1.16.6",

Platform - Web
Screenshot 2023-11-02 at 12.18.19 AM


looks like its failing from the openlogin-adapter

Please share these too @josephrios56

npm package:
“@web3auth/modal”: “^7.0.5”,
“@web3auth/torus-evm-adapter”: “^7.0.4”,
“@web3auth/torus-wallet-connector-plugin”: “^7.0.4”,
“@web3auth/wallet-connect-v2-adapter”: “^7.0.4”,

web platform , with next.js

Verifier name: anifie-honda-google-verifier

JWKS Endpoint: https://api.openlogin.com/jwks

Sample idToken from yesterday:
eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IlRZT2dnXy01RU9FYmxhWS1WVlJZcVZhREFncHRuZktWNDUzNU1aUEMwdzAifQ.eyJpYXQiOjE2OTg4NDM3MjAsImF1ZCI6IkJFQXFjSzBhRHEyMk9LNDNGMDZlUlk5aFlEdDJtZ3NOeDgzVWI4a2hhTklpeUFNZVYtT0UwckNuLTQ4dWFHRUZRMnV1YlZIaGZWem82b2lSdUdMZVBmTSIsIm5vbmNlIjoiMDI5MjQ4ZmM3MjMwNjhkOTMyMmM5MDUxZWMzYjc1NzIwZWI3MmRkMjM3YzVjZWYzYmEwMTdmMTdiNzdlYmJmYTkxIiwiaXNzIjoiaHR0cHM6Ly9hcGktYXV0aC53ZWIzYXV0aC5pbyIsIndhbGxldHMiOlt7InB1YmxpY19rZXkiOiIwM2QwMDM2NzhhMTlkNDNiNjAyNGY1ZjNjNWRhYzlmYzlhMTg0ZjEyNmQyOTg1NmNjZDJlZTgyNTkzOThhN2NkOTUiLCJ0eXBlIjoid2ViM2F1dGhfYXBwX2tleSIsImN1cnZlIjoic2VjcDI1NmsxIn1dLCJlbWFpbCI6InRrY2hhdzgwQGdtYWlsLmNvbSIsIm5hbWUiOiJUYW5nIEt3YW4gQ2hhdyIsInByb2ZpbGVJbWFnZSI6Imh0dHBzOi8vbGgzLmdvb2dsZXVzZXJjb250ZW50LmNvbS9hL0FDZzhvY0pySm5jcUE5YVVjUTdFQmR6RGEzNFp0VEplQTAzYUFIOU5mZW03RHhYbF8yaz1zOTYtYyIsInZlcmlmaWVyIjoid2ViM2F1dGgiLCJ2ZXJpZmllcklkIjoidGtjaGF3ODBAZ21haWwuY29tIiwiYWdncmVnYXRlVmVyaWZpZXIiOiJ3ZWIzYXV0aC1nb29nbGUtc2FwcGhpcmUtZGV2bmV0IiwiZXhwIjoxNjk4OTMwMTIwfQ.gVI51l5UEz0WWQ0GniYuxKgJfxa1q2XNWBl5GyeLzRgPPqL7Mn7QioCV4ZHYLrAsrBHSqbwsoF1CGHAdkYnJlQ

const _web3auth = new Web3Auth({
clientId: process.env.WEB3AUTH_CLIENTID,
web3AuthNetwork: “sapphire_devnet”,
chainConfig: {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: “0x13881”,
rpcTarget: “https://polygon-mumbai.infura.io/v3/a420a103db93401980fad9a3492ed17a”,
displayName: “Polygon Mumbai”,
blockExplorer: “https://mumbai.polygonscan.com/”,
ticker: “MATIC”, // EVM chain’s Ticker
tickerName: “Polygon MATIC”, // EVM chain’s Ticker Name
},
uiConfig: {
appName: “Anifie Community”,
mode: “light”,
loginMethodsOrder: [“google”],
logoLight: “https://web3auth.io/images/w3a-L-Favicon-1.svg”,
logoDark: “https://web3auth.io/images/w3a-D-Favicon-1.svg”,
defaultLanguage: “en”, // en, de, ja, ko, zh, es, fr, pt, nl
loginGridCol: 3,
primaryButton: “externalLogin”,
},
});

web3auth init

export const config = async () => {
	const { chains, publicClient, webSocketPublicClient } = configureChains(
		defaultChains,
		[alchemyProvider({ apiKey: PUBLIC_ALCHEMY_KEY }), publicProvider()],
		{
			pollingInterval: 10_000
		}
	);

	const chainConfig = {
		chainNamespace: CHAIN_NAMESPACES.EIP155,
		chainId: '0x' + chains[0].id.toString(16),
		rpcTarget: chains[0].rpcUrls.default.http[0] as string,
		tickerName: chains[0].nativeCurrency?.name,
		displayName: chains[0].name,
		ticker: chains[0].nativeCurrency?.symbol,
		blockExplorer: chains[0]?.blockExplorers.default?.url as string
	};

	const web3AuthInstance = new Web3AuthNoModal({
		clientId: PUBLIC_WEB3AUTH_ID,
		chainConfig,
		web3AuthNetwork: 'cyan',
		sessionTime: 86400 * 7
	});

	const privateKeyProvider = new EthereumPrivateKeyProvider({ config: { chainConfig } });
	const openloginAdapterInstance = new OpenloginAdapter({
		privateKeyProvider,
		adapterSettings: {
			uxMode: isMobile.any() ? 'redirect' : 'popup',
			network: 'cyan',
			whiteLabel: {
				appName: 'wagr',
				logoLight: WagrLogo1,
				logoDark: WagrLogo1,
				defaultLanguage: 'en',
				mode: 'dark'
			}
		}
	});
	web3AuthInstance.configureAdapter(openloginAdapterInstance);

	// await web3AuthInstance.addPlugin(torusPlugin); // add plugin to web3auth instance
	let defaultConnectors: any[] = [];
	defaultConnectors = [
		...defaultConnectors,
		new Web3AuthConnector({
			chains,
			options: {
				web3AuthInstance,
				loginParams: {
					loginProvider: WALLET_ADAPTERS.OPENLOGIN
				}
			}
		})
	];
	configuredConnectors.set(defaultConnectors);
	createConfig({
		autoConnect: true,
		webSocketPublicClient,
		publicClient,
		connectors: defaultConnectors
	});

	await web3AuthInstance.init();
	web3Auth.set(web3AuthInstance);
	// torus.set(torusPlugin);

	return { init };
};

login code

	const login = async (type: string, isSocial = false) => {
		try {
			await disconnect();
			if ($web3Auth?.status === 'connected') {
				await $web3Auth?.logout();
			}
			loading = true;
			let account: any;
			const connectorTypes: any = {
				WalletConnect: async () => await $web3Modal?.openModal(),
				Injected: async () => await connect({ connector: $configuredConnectors[1] }),
				'Coinbase Wallet': async () => await connect({ connector: $configuredConnectors[3] }),
				google: async () =>
					await $web3Auth?.connectTo(WALLET_ADAPTERS.OPENLOGIN, { loginProvider: 'google' }),
				twitter: async () =>
					await $web3Auth?.connectTo(WALLET_ADAPTERS.OPENLOGIN, { loginProvider: 'twitter' }),
				twitch: async () =>
					await $web3Auth?.connectTo(WALLET_ADAPTERS.OPENLOGIN, { loginProvider: 'twitch' }),
				discord: async () =>
					await $web3Auth?.connectTo(WALLET_ADAPTERS.OPENLOGIN, { loginProvider: 'discord' }),
				sms: async () =>
					await $web3Auth?.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
						loginProvider: 'sms_passwordless',
						extraLoginOptions: {
							login_hint: text
						}
					}),
				email: async () =>
					await $web3Auth?.connectTo(WALLET_ADAPTERS.OPENLOGIN, {
						loginProvider: 'email_passwordless',
						extraLoginOptions: {
							login_hint: text
						}
					})
			};

			if (connectorTypes[type]) {
				account = await connectorTypes[type]();
			}
	} catch (err) {
			console.log(err);
	}
}

Hey is web3auth down for you guys? I’m getting this error.

I too am using svelte and found a lot of issues on my end too:

@shahbaz this is app breaking I need this fix asap

1 Like