Repository navigation
fix: keep the WalletConnect connection timeout out of Sentry - #543
decentraland-bot wants to merge 2 commits into
Conversation
decentraland-connect's WalletConnectV2Connector rejects with a bare
Error("Connection timeout") when the AppKit modal stays open for five
minutes without a wallet approving the connection. Every event on the
current release (auth@5.3.0, which already contains #523) shows the same
shape: the modal opens, the user clicks around it, nothing pairs, and the
timer fires exactly five minutes later. That is the user abandoning the
QR, not a fault in the app.
Classify it as an unreported wallet condition: it stays out of Sentry,
still reaches the console and the LOGIN_ERROR analytics event, and the
login screen keeps showing "Connection timeout" as the error detail.
The match is narrow: a real Error, no code, exact message.
Sentry: https://decentraland.sentry.io/issues/7192792184/ (AUTH-SITE-HZ)
Exception: Error: Connection timeout
Culprit: decentraland-connect/dist/connectors/WalletConnectV2Connector.js (timeout)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
… described Review follow-up: the handleError comment and the predicate's summary still described only wallet-originated messages. Sentry: https://decentraland.sentry.io/issues/7192792184/ (AUTH-SITE-HZ) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sentrysweep review (advisory)Verdict: no P0/P1. Approvable pending human approval. The bot opened this PR, so this is a comment, not an approval. Review covered: the full pr-review checklist (bugs, error handling, unused imports, tests, API contract, security, performance, git conventions), plus TypeScript/pattern, security/architecture and simplicity review passes. Consumer impact: none. The change is internal to the auth site's error classification ( Security: nothing to report. Only Sentry reporting changes. The error is still logged, still tracked as Architecture: Of the 32 Fixed during review
P2 suggestions (non-blocking)
Merge gates
Sentry: https://decentraland.sentry.io/issues/7192792184/ Reviewed by Jarvis 🤖 · Requested by the weekly sentrysweep schedule (<@U026ADH14BU>) via Slack |
Summary
Error: Connection timeoutfrom decentraland-connect'sWalletConnectV2Connectoris now classified as an unreported wallet condition: it stays out of Sentry, but still reaches the console and theLOGIN_ERRORanalytics event, and the login screen still shows "Connection timeout" as the error detail.Error, nocode, exact messageConnection timeout.Sentry issue: https://decentraland.sentry.io/issues/7192792184/ (
AUTH-SITE-HZ, unresolved since 2026-01-15, 87 events / 30 users)Exception:
Error: Connection timeoutCulprit:
node_modules/decentraland-connect/dist/connectors/WalletConnectV2Connector.js→timeout(the 300 000 ms timer inopenModalAndWaitForConnection), captured throughhandleError(error, 'Error during login connection')inLoginPage.tsx.Root cause
#523 (merged 2026-09-22, shipped in
auth@5.3.0) fixed the split wagmi/WalletConnect state that could leave a paired wallet waiting on the wrong AppKit instance. The issue kept firing onauth@5.3.0afterwards (6 events, 2026-10-01 → 2026-10-18), so this run looked at what those events have in common. All six have the same breadcrumb shape:ui.click body > w3m-modal.open),Connection timeout.That is the user leaving the QR modal open without finishing the pairing: the same kind of event as "User closed the modal without connecting", which is already kept out of Sentry. Nothing in the app failed. The login screen already handles it (connection-failed copy with the timeout as the detail).
It goes into
isUnreportedWalletConditionrather thanisExpectedWalletErroron purpose: the latter blanks the error detail on the login screen, and "Connection timeout" is the line that tells the user what happened.Trade-off
The same timer would also fire if a wallet paired but AppKit never reported the account (the case #523 targeted). None of the post-5.3.0 events show a pairing, but if that case comes back it would no longer surface in Sentry. It is still counted: every timeout keeps emitting
LOGIN_ERRORwitherror: "Connection timeout", so a rise is visible in analytics.eth-connect(a transitive dependency, not imported bysrc/) can also reject withError("Connection timeout"); it is not on any pathhandleErrorsees today.Changes
src/shared/errors.ts: one more case inisUnreportedWalletCondition, docs updated.src/shared/errors.spec.ts: matches the bare timeout; does not match a plain object, an error with acode, or a different message; stays out ofisExpectedWalletError.src/shared/utils/errorHandler.spec.ts: the timeout is not sent to Sentry and is still tracked.Testing
npx jest: 74 suites, 1926 tests passednpx eslinton the touched files: cleannpx tsc --noEmit: cleannpm run build: passesTracking
No GitHub issue: the Sentry issue above is the tracker for this fix.
Opened by the weekly sentrysweep run (scheduled; schedule owner <@U026ADH14BU>). Draft: needs human review and approval.
🤖 Generated with Claude Code