WalletConnect handshake hangs or fails across multiple mobile wallets on production #220
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#220
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Surfaced while walking A5 sanity check on #219. The issue is broader than Keplr — WalletConnect appears to be broken on yieldomega.com production across multiple wallets.
Summary
WalletConnect QR scan from multiple mobile wallets fails to complete the connection handshake on production https://yieldomega.com.
Observed
Direct extension connect for non-WC wallets (Keplr desktop extension via EIP-6963) works end-to-end — see #219.
Possible causes (not verified)
Repro
Useful diagnostic to add
Severity
Launch-day impact class — most mobile users connect via WalletConnect QR. If WC is broken across multiple wallets, the mobile flow is effectively dead.
Related
Asks of dev
@PlasticDigits — confirming whether VITE_WALLETCONNECT_PROJECT_ID is set on the production deploy would unblock most of the diagnostic work here.
Update — Trust Wallet does connect successfully, but only when entering through the wallet's WalletConnect-specific scan flow.
Working path on Trust Wallet:
So WC isn't broken systemically. The handshake works when entered through the wallet's WC-specific flow. The failure mode is:
When the user scans with the wallet's MAIN camera or some non-WC scan flow, the wallet doesn't establish the WC session and the dapp just sits at the QR screen with no error feedback.
So this is more discoverability + per-wallet quirks than a yieldomega bug. Still worth keeping the issue open because:
changed the description
WC id confirmed set correctly on VITE_WALLETCONNECT_PROJECT_ID in prod
Marking as low priority for now but we may need to switch to an sdk like privy
Investigation note (codebase + docs + external WC/RainbowKit guidance)
Scope: Read-only review of
frontend/src/wagmi-config.ts,docs/frontend/wallet-connection.md, deployment guide, related issues (#89, #203, #215), and Reown/RainbowKit/MetaMask public issue threads. No code changes in this pass.Bottom line
This does not look like a single “WC is off in the bundle” regression. Maintainer confirmed
VITE_WALLETCONNECT_PROJECT_IDis set on production (2026-05-20). Brouie’s follow-up that Trust Wallet connects successfully via Settings → WalletConnect → in-app scanner (with Verified domain + MegaETH network) is strong evidence the relay + projectId + chain 4326 path can work.Remaining pain is a mix of wallet-specific entry points, silent failures when users scan with the wrong in-wallet flow, relay/network latency, and optional Reown dashboard / metadata hygiene — not necessarily a YieldOmega-only bug. MetaMask desktop ~2 min and MetaMask mobile stuck at “Connecting…” may still warrant infra checks.
Code paths (what production should be doing)
wagmi-config.ts)VITE_WALLETCONNECT_PROJECT_IDset (prod)getDefaultConfig+walletConnectWalletin Popular group (with SafePal, MetaMask, etc.)getDefaultConfigwithoutwalletConnectWallet; console: "VITE_WALLETCONNECT_PROJECT_ID is empty — using injected-detection wallets only" (#203)VITE_E2E_MOCK_WALLET=1mockconnector onlyImplication: If users see a WalletConnect QR in RainbowKit, the production build almost certainly took the projectId-set branch. An empty project id would omit the WC wallet option entirely (not “QR that never completes”). Initial hypothesis #1 in the issue description is therefore unlikely for prod given maintainer confirmation + QR visibility.
Wiring is minimal:
AppProviders.tsx→WagmiProvider+RainbowKitProvider; no custom WC relay URL. Stack: RainbowKit ^2.2.4, wagmi ^2.14.15, WalletConnect/Reown 2.21.0 (via lockfile; several WC packages carry upstream “reliability improvements” deprecation notices).Chain:
configuredChain()→ 4326 with RPC fromVITE_RPC_URL(defaulthttps://mainnet.megaeth.com/rpc). Display name isVITE_CHAIN_NAMEor fallbackChain 4326— Trust’s UI showed “MegaETH network”, so wallets can still present a friendly label via their own chain DB / Verify.Likely causes (ranked)
1. Wallet entry-point / UX (high confidence — matches Brouie update)
Many wallets do not treat the main camera / generic QR as WalletConnect v2 URI handling. Failures look like “nothing happens” or generic errors (Keplr “try again”, Trust silent on main camera) even when the WC-specific scanner works.
Not a dapp bug, but launch-impacting: users lack guidance at the QR step.
Mitigations (product, no protocol change): Short copy under the QR: “Open your wallet → WalletConnect → scan here (not the main camera).” Link to wallet-specific paths. Reown docs explicitly recommend QR-from-wallet-app when deep links fail (in-app browsers, Android WebViews).
2. Reown Cloud domain allowlist / Verify metadata (medium — verify in dashboard)
Reown APKT002 / “origin isn’t in your allowlist” and Verify API compare the running origin to configured domains. Misconfiguration can cause warnings, slow paths, or blocked sessions on some wallets.
Checks:
https://yieldomega.com(andwwwif used).app.metadata.urlmatches the live origin (RainbowKitgetDefaultConfigusesappName: "YieldOmega"; consider settingappUrl/ ensuring build usesVITE_SITE_URL=https://yieldomega.comfor consistent metadata — optional env exists in.env.example/vite.config.tsOG injection but is not wired intogetDefaultConfigtoday).3. Relay / network / VPN (medium — explains stalls, multi-wallet)
Common production failures: WSS to
relay.walletconnect.com/relay.walletconnect.orgstalled, VPN/firewall/corporate Wi‑Fi, regional blocking. RainbowKit GitHub has multiple “works on localhost, stalls in prod” reports; Reown FAQ lists relay unreachable as primary cause of greyed-out connect.Checks during repro: DevTools → Network → WS to relay; console for
transportOpen has stalled/ socket errors. Try different network, disable VPN, ping relay host.4. MetaMask-specific slowness / mobile bugs (medium — matches MM desktop ~2 min + mobile stuck)
Public MetaMask Mobile issues: WC handshake instability on iOS, delayed approval UI, QR misreads, background timeout. 2+ minute desktop extension confirm may be relay + extension backlog or pending
-32002request (MetaMask Connect troubleshooting: don’t double-callconnect).Less likely YieldOmega-specific if Trust completes on same site/session.
5. MegaETH chain 4326 at session time (lower — partial)
Custom chains often fail after pairing on
wallet_switchEthereumChain/wallet_addEthereumChain, not always at QR scan. Trust success with MegaETH shown suggests chain is not universally rejected at handshake.If issues appear after Connect: ensure wallets have MegaETH; session namespaces must include
eip155:4326. Optional: setVITE_CHAIN_NAME=MegaETHin prod build for clearer WC chain labels (cosmetic).6. Missing production E2E for WC path (process gap — #89)
Local QA stack historically runs without project id; #89 tracks real mobile WC matrix. No automated Playwright coverage for WC (Anvil E2E uses mock wallet). Doesn’t explain prod failure but explains late discovery.
Ruled out or deprioritized
VITE_WALLETCONNECT_PROJECT_IDon prodgetDefaultConfigbranchesRecommended fixes / next steps
Ops / dashboard (no deploy needed):
Low-risk product improvements (future MRs):
appUrlfromVITE_SITE_URLorwindow.location.origininto RainbowKit config for Verify parity.VITE_CHAIN_NAME=MegaETHin production env template (deployment-guide.md).Larger alternative (already noted by maintainer): Privy / Reown AppKit — would change connector surface but not fix user education on scan paths.
Investigation / regression:
Diagnostic playbook (for next QA pass)
Related issues
Suggested issue disposition: Keep open as low priority per maintainer, but track as UX/docs + wallet-matrix QA rather than “WC broken on prod.” Upgrade priority if relay allowlist or MetaMask timing proves systemic after dashboard + network checks.
mentioned in issue #215