{"record":{"id":"7509c7cfe5a613c8","repo":"unionlabs/union","slug":"connector-evmwalletid-not-found","errorCode":null,"errorMessage":"Connector ${evmWalletId} not found","messagePattern":"Connector (.+?) not found","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"app2/src/lib/wallet/evm/config.svelte.ts","lineNumber":248,"sourceCode":"        ? \"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 1000'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='-14.94' y1='914.64' x2='1159.05' y2='-86.81' gradientUnits='userSpaceOnUse'%3E%3Cstop offset='0' stop-color='%2312ff80'/%3E%3Cstop offset='.13' stop-color='%2315fd85'/%3E%3Cstop offset='.29' stop-color='%231ff896'/%3E%3Cstop offset='.49' stop-color='%2330f1b2'/%3E%3Cstop offset='.69' stop-color='%2348e7d9'/%3E%3Cstop offset='.87' stop-color='%235fddff'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='500' cy='500' r='500' fill='url(%23g)'/%3E%3Cpath fill='%23121312' d='M780.07 499.81h-68.31a36.93 36.93 0 0 0-36.93 36.93v99.14a36.93 36.93 0 0 1-36.93 36.93H366.13a36.93 36.93 0 0 0-36.93 36.93v68.31a36.93 36.93 0 0 0 36.93 36.93h287.5a36.93 36.93 0 0 0 36.71-36.93v-54.8a34.88 34.88 0 0 1 36.93-34.88h52.8a36.93 36.93 0 0 0 36.93-36.93v-115.14a36.5 36.5 0 0 0-36.93-36.5Z'/%3E%3Cpath fill='%23121312' d='M329.18 364.11a36.93 36.93 0 0 1 36.93-36.93h271.6a36.93 36.93 0 0 0 36.93-36.93v-68.31a36.93 36.93 0 0 0-36.93-36.93H350.37a36.93 36.93 0 0 0-36.93 36.93v52.63a36.93 36.93 0 0 1-36.93 36.93h-52.57a36.93 36.93 0 0 0-36.93 36.93v115.26a36.1 36.1 0 0 0 37 36.1h68.31a36.93 36.93 0 0 0 36.93-36.93l-.06-98.74Z'/%3E%3Cpath fill='%23121312' d='M469.85 428.01h65.62a38.74 38.74 0 0 1 38.74 38.74v65.62a38.74 38.74 0 0 1-38.74 38.74h-65.62a38.74 38.74 0 0 1-38.74-38.74v-65.62a38.74 38.74 0 0 1 38.74-38.74Z'/%3E%3C/svg%3E\"\n        : connector.icon) as string,\n      type: connector.type as ConnectorType,\n      download: \"\",\n    }\n  })\n  .filter(wallet => !excludeWalletList.includes(wallet.id)) satisfies Array<Connector>\n\nexport type EvmWalletId = (typeof evmWalletsInformation)[number][\"id\"]\n\nexport async function evmConnect(\n  evmWalletId: EvmWalletId,\n  chainId: ConfiguredChainId = mainnet.id,\n) {\n  const connector = getWagmiConfig().connectors.find(connector => connector.id === evmWalletId)\n  if (connector) {\n    return await _connect(getWagmiConfig(), { connector, chainId })\n  }\n  throw new Error(`Connector ${evmWalletId} not found`)\n}\n\nexport async function evmDisconnect() {\n  try {\n    const connector = getAccount(getWagmiConfig()).connector\n    if (connector) {\n      await _disconnect(getWagmiConfig(), { connector })\n    } else {\n      await _disconnect(getWagmiConfig())\n    }\n  } catch (error) {\n    console.error(\"Error during disconnect:\", error)\n    throw error\n  }\n}\n\nexport const evmSwitchChain = (chainId: ConfiguredChainId) =>\n  _switchChain(getWagmiConfig(), { chainId })","sourceCodeStart":230,"sourceCodeEnd":266,"githubUrl":"https://github.com/unionlabs/union/blob/031785bb6dc6b957c624e62bc64c184409c97d7b/app2/src/lib/wallet/evm/config.svelte.ts#L230-L266","documentation":"evmConnect resolves a wallet id against wagmi's configured connectors (a list already filtered by excludeWalletList) and throws when find() returns nothing. It means wagmi has no live connector registered under that id: the wallet is not installed, was excluded from the config, or the id string no longer matches this wagmi version's connector ids.","triggerScenarios":"User selects a wallet absent from getWagmiConfig().connectors (extension not installed, mobile browser with no injected provider, wallet disabled via excludeWalletList), or a persisted wallet id from localStorage that wagmi no longer uses after an upgrade (e.g. 'metaMask' vs wagmi v2's 'io.metamask').","commonSituations":"wagmi v1 to v2 migrations renaming connector ids; stale localStorage 'last connected wallet'; wallets filtered out by the app's excludeWalletList; mobile browsers where only the embedded wallet exists.","solutions":["Before calling evmConnect, check getWagmiConfig().connectors for the id and only render selectable wallets that are actually present","Clear or re-map persisted wallet ids after wagmi upgrades (connector ids changed in wagmi v2)","Verify the wallet's browser extension is installed and enabled for the site","Fall back to the injected connector when the requested one is missing"],"exampleFix":"// before\nawait evmConnect(walletId)\n\n// after\nconst available = new Set(getWagmiConfig().connectors.map(c => c.id))\nif (!available.has(walletId)) {\n  notify(`Wallet ${walletId} is unavailable. Is the extension installed?`)\n  return\n}\nawait evmConnect(walletId)","handlingStrategy":"validation","validationCode":"const connectorIds = new Set(getWagmiConfig().connectors.map(c => c.id))\n\nif (!connectorIds.has(evmWalletId)) {\n  notify(`Wallet ${evmWalletId} is unavailable — is it installed?`)\n  return\n}\nawait evmConnect(evmWalletId)","typeGuard":"const isAvailableEvmWallet = (id: string): id is EvmWalletId =>\n  getWagmiConfig().connectors.some(c => c.id === id)","tryCatchPattern":"try {\n  await evmConnect(walletId)\n} catch (e) {\n  if (e instanceof Error && /Connector .* not found/.test(e.message)) {\n    notify(\"Wallet not detected. Install the extension or pick another wallet.\")\n    return\n  }\n  throw e\n}","preventionTips":["Derive the selectable wallet list from the live connectors, not a static manifest","Re-validate persisted wallet ids after wagmi upgrades (connector ids changed in v2)","Test wallet flows in a clean browser profile with no extensions to see the not-found path"],"tags":["wagmi","evm","wallet","connector"],"backgroundTag":null,"analyzedSha":"031785bb6dc6b957c624e62bc64c184409c97d7b","analyzedAt":"2026-08-16T06:24:09.996Z","schemaVersion":2},"datasetVersion":"2026-08-16T08:17:34.114Z"}