Link to minimal reproducible example
No hosted link — a real, working live demo needs a Project ID allowlisted for its own domain (confirmed: reusing a Project ID from a different origin is correctly rejected with "Unauthorized: origin not allowed"), so I can't host a public one myself without registering a new project. Instead: the exact, complete, minimal code below (paste into any page with your own valid Project ID) plus a screen recording showing it running end-to-end, attached as a comment below.
Steps to Reproduce
Step 1 — Load any page that initializes AppKit with a WagmiAdapter (code below).
Step 2 — In the console, run:
localStorage.setItem('@appkit/connected_connector', 'WALLET_CONNECT');
localStorage.setItem('wagmi.store', JSON.stringify({ state: { connections: { __type: 'Map', value: [] }, chainId: 11155111, current: null }, version: 2 }));
Step 3 — Reload the page.
Step 4 — Check wagmiCore.getAccount(wagmiConfig).isConnected — it's false — while AppKit's own cached flag (@appkit/connected_connector) says a connector should be connected.
Step 5 — Opening the AppKit modal at this point shows a stale "connected" account view (address, balance, Disconnect button) that disagrees with the real wagmi state.
Step 6 — In real, non-scripted usage this same mismatch also causes wagmiCore.disconnect(wagmiConfig) to throw, surfaced in AppKit's own modal as "Failed to disconnect" with no way to recover except manually clearing localStorage — observed repeatedly in a real deployed app after normal, repeated connect/disconnect cycles across a short session (not contrived). In this minimal, scripted repro specifically, disconnect() completes without throwing — the throw appears to depend on additional internal AppKit state beyond these two localStorage keys that this minimal repro doesn't fully replicate. The state desync itself (Step 4) reproduces reliably and is the root cause either way.
Minimal code (paste into any HTML page, replace YOUR_PROJECT_ID with your own valid, allowlisted Project ID):
<script type="module">
const PROJECT_ID = 'YOUR_PROJECT_ID';
const mod = await import('https://cdn.jsdelivr.net/npm/@reown/appkit-cdn@1.1.0/dist/wagmi.js');
const chains = await import('https://esm.sh/viem@2/chains?bundle');
const wagmiAdapter = new mod.AppKitWagmi.WagmiAdapter({ networks: [chains.sepolia], projectId: PROJECT_ID });
const wagmiConfig = wagmiAdapter.wagmiConfig;
mod.AppKit.createAppKit({
adapters: [wagmiAdapter], networks: [chains.sepolia], projectId: PROJECT_ID,
metadata: { name: 'Repro', description: 'Repro', url: window.location.origin, icons: [] },
});
console.log('appkit flag:', !!localStorage.getItem('@appkit/connected_connector'));
console.log('wagmi isConnected:', mod.WagmiCore.getAccount(wagmiConfig).isConnected);
</script>
A screen recording of this exact sequence running (clean state, craft the mismatch, reload, mismatch shown, disconnect attempt) is attached as a comment below.
Summary
Expected: AppKit's own connection state and wagmi's live connector state (wagmiCore.getAccount(wagmiConfig).isConnected) should always agree. disconnect() should always either succeed or fail with a recoverable, actionable error.
Actual: After a session gets into a specific, real, reachable state (confirmed via localStorage inspection: @appkit/connected_connector present but wagmi.store's connections map empty), AppKit's own modal shows a stale "connected" account view while wagmiCore.getAccount().isConnected correctly reports false. In real (non-scripted) usage, this same mismatch causes wagmiCore.disconnect() to throw, surfaced in AppKit's own UI as "Failed to disconnect" — with no in-app recovery path; the only fix found was manually clearing the relevant localStorage keys and reloading.
Real-world trigger: observed repeatedly in a real, deployed web app (vanilla JS, no framework) using @reown/appkit-cdn + WagmiAdapter, after normal usage — connecting, disconnecting, and reconnecting a wallet a handful of times within a session, no unusual or contrived actions.
Affected platform: Chrome desktop. Package: @reown/appkit-cdn@1.1.0 (CDN build, no bundler), WagmiAdapter, Sepolia testnet. Not yet tested against other package versions or delivery methods (npm/bundled).
List of related npm package versions
- @reown/appkit-cdn: 1.1.0 (loaded directly via CDN — https://cdn.jsdelivr.net/npm/@reown/appkit-cdn@1.1.0/dist/wagmi.js — no bundler, no package.json)
-
- wagmi: bundled inside @reown/appkit-cdn@1.1.0 itself (exposed as mod.WagmiCore) — exact pinned version not visible from outside the bundle
-
-
- viem: loaded via https://esm.sh/viem@2/chains?bundle (range, not pinned to an exact patch version)
Note: this is a no-build-step, CDN-only setup — no package.json, no bundler. Node.js/package-manager fields below are answered as N/A for that reason.
Node.js Version
N/A
Package Manager
N/A
Link to minimal reproducible example
No hosted link — a real, working live demo needs a Project ID allowlisted for its own domain (confirmed: reusing a Project ID from a different origin is correctly rejected with "Unauthorized: origin not allowed"), so I can't host a public one myself without registering a new project. Instead: the exact, complete, minimal code below (paste into any page with your own valid Project ID) plus a screen recording showing it running end-to-end, attached as a comment below.
Steps to Reproduce
Step 1 — Load any page that initializes AppKit with a WagmiAdapter (code below).
Step 2 — In the console, run:
localStorage.setItem('@appkit/connected_connector', 'WALLET_CONNECT');
localStorage.setItem('wagmi.store', JSON.stringify({ state: { connections: { __type: 'Map', value: [] }, chainId: 11155111, current: null }, version: 2 }));
Step 3 — Reload the page.
Step 4 — Check wagmiCore.getAccount(wagmiConfig).isConnected — it's false — while AppKit's own cached flag (@appkit/connected_connector) says a connector should be connected.
Step 5 — Opening the AppKit modal at this point shows a stale "connected" account view (address, balance, Disconnect button) that disagrees with the real wagmi state.
Step 6 — In real, non-scripted usage this same mismatch also causes wagmiCore.disconnect(wagmiConfig) to throw, surfaced in AppKit's own modal as "Failed to disconnect" with no way to recover except manually clearing localStorage — observed repeatedly in a real deployed app after normal, repeated connect/disconnect cycles across a short session (not contrived). In this minimal, scripted repro specifically, disconnect() completes without throwing — the throw appears to depend on additional internal AppKit state beyond these two localStorage keys that this minimal repro doesn't fully replicate. The state desync itself (Step 4) reproduces reliably and is the root cause either way.
Minimal code (paste into any HTML page, replace YOUR_PROJECT_ID with your own valid, allowlisted Project ID):
<script type="module"> const PROJECT_ID = 'YOUR_PROJECT_ID'; const mod = await import('https://cdn.jsdelivr.net/npm/@reown/appkit-cdn@1.1.0/dist/wagmi.js'); const chains = await import('https://esm.sh/viem@2/chains?bundle'); const wagmiAdapter = new mod.AppKitWagmi.WagmiAdapter({ networks: [chains.sepolia], projectId: PROJECT_ID }); const wagmiConfig = wagmiAdapter.wagmiConfig; mod.AppKit.createAppKit({ adapters: [wagmiAdapter], networks: [chains.sepolia], projectId: PROJECT_ID, metadata: { name: 'Repro', description: 'Repro', url: window.location.origin, icons: [] }, }); console.log('appkit flag:', !!localStorage.getItem('@appkit/connected_connector')); console.log('wagmi isConnected:', mod.WagmiCore.getAccount(wagmiConfig).isConnected); </script>A screen recording of this exact sequence running (clean state, craft the mismatch, reload, mismatch shown, disconnect attempt) is attached as a comment below.
Summary
Expected: AppKit's own connection state and wagmi's live connector state (wagmiCore.getAccount(wagmiConfig).isConnected) should always agree. disconnect() should always either succeed or fail with a recoverable, actionable error.
Actual: After a session gets into a specific, real, reachable state (confirmed via localStorage inspection: @appkit/connected_connector present but wagmi.store's connections map empty), AppKit's own modal shows a stale "connected" account view while wagmiCore.getAccount().isConnected correctly reports false. In real (non-scripted) usage, this same mismatch causes wagmiCore.disconnect() to throw, surfaced in AppKit's own UI as "Failed to disconnect" — with no in-app recovery path; the only fix found was manually clearing the relevant localStorage keys and reloading.
Real-world trigger: observed repeatedly in a real, deployed web app (vanilla JS, no framework) using @reown/appkit-cdn + WagmiAdapter, after normal usage — connecting, disconnecting, and reconnecting a wallet a handful of times within a session, no unusual or contrived actions.
Affected platform: Chrome desktop. Package: @reown/appkit-cdn@1.1.0 (CDN build, no bundler), WagmiAdapter, Sepolia testnet. Not yet tested against other package versions or delivery methods (npm/bundled).
List of related npm package versions
Note: this is a no-build-step, CDN-only setup — no package.json, no bundler. Node.js/package-manager fields below are answered as N/A for that reason.
Node.js Version
N/A
Package Manager
N/A