fix: Sentry audit — crash fixes, 404s for bot traffic, hydration and noise routing - #1360
Open
tyhonchik wants to merge 7 commits into
Open
fix: Sentry audit — crash fixes, 404s for bot traffic, hydration and noise routing#1360tyhonchik wants to merge 7 commits into
tyhonchik wants to merge 7 commits into
Conversation
|
🚀 Preview Deployment: View Here |
|
E2E results (preview) Smoke
|
SPP evaluates a body through the stage plugin's interface type while the totalSupply enrichment keyed off the sub-proposal's own interface type, so a sub-proposal with inconsistent backend data reached the lock-to-vote status utils without the enrichment and crashed the proposals page. Enrich by stage body address as well and make the supply lookup tolerant to missing data. Fixes APP-NEXT-2ES
…resses The create proposal/process pages destructured the first useDaoPlugins result unconditionally, so a direct load with an unknown or uninstalled plugin address (or a not-yet-loaded DAO) crashed the page both server- and client-side. The pages now render the standard not-found error state and the permission guard skips its check until the plugin is resolved. Fixes APP-NEXT-2EX Fixes APP-NEXT-2EP
Unknown or malformed DAO addresses and proposal slugs (HEAD/GET bot traffic, stale links) failed the server render and were reported to Sentry as errors. URL-addressed lookups now map backend client errors to notFound(), the metadata utils suppress the same class, and onRequestError skips expected not-found errors for render paths without their own handling. The backend error class also carries its name so Sentry titles are no longer a bare "Error: ...". Fixes APP-NEXT-248 Fixes APP-NEXT-2CF Fixes APP-NEXT-2CE Fixes APP-NEXT-2D9 Fixes APP-NEXT-24C Fixes APP-NEXT-24D
formatterUtils.formatDate renders in the viewer's timezone (and RELATIVE recomputes against "now"), while the server renders in UTC, so the members, proposals, proposal-details and dashboard pages hydrated different text than the server sent whenever a timestamp crossed a UTC boundary for the viewer's zone. Gate those values behind useIsMounted, following the existing pattern in daoProcessDetailsPageClient. Fixes APP-NEXT-267 Fixes APP-NEXT-155 Fixes APP-NEXT-1YB Fixes APP-NEXT-22
…ts) as expected Adds an environmentNoisePatterns list to the beforeSend taxonomy for errors injected by the user's environment rather than our code: WKWebView scripts serializing cyclic structures, wallet extensions fighting over window.ethereum, extensions mutating the DOM behind React, private-mode storage, deploy skew and aborted streaming responses. Routed like expected user behaviour — kept searchable, tagged expected, demoted to info — plus the AppKit disconnect failure as expected wallet behaviour. Fixes APP-NEXT-2B5 Fixes APP-NEXT-2D1 Fixes APP-NEXT-272 Fixes APP-NEXT-29W Fixes APP-NEXT-2ED Fixes APP-NEXT-2EZ
The linked-accounts-off filter compared plugin.daoAddress with the DAO record address by strict string equality, so a checksum/lowercase mismatch between the two backend fields silently dropped the plugin client-side while the server-side daoUtils.getDaoPlugins kept it — crashing pages that dereference the first plugin (e.g. gauge voter). Fixes APP-NEXT-2B9
tyhonchik
force-pushed
the
fix/sentry-audit-hardening
branch
from
September 2, 2026 15:14
14520b1 to
49f8c6a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes what a Sentry audit of
app-nextproduction surfaced: four real crash classes, a bot-traffic class that failed server renders instead of serving 404s, and a set of environment-noise patterns polluting the error stream. Previously the top unclassified issues were hydration mismatches (~200 events/14d), bot-probed dead URLs reported as server errors (~250 events), and in-app-browser junk (~150 events) — drowning out the genuine crashes hiding among them. Now each class is either fixed at the source or routed through the existingnoise_classtaxonomy — the unclassified error stream is left for actual bugs.Changes
tokensTotalSupplyenrichment keyed off the sub-proposal's ownpluginInterfaceType— a sub-proposal with inconsistent backend data reachedlockToVoteProposalUtilswithout the enrichment and crashed the whole proposals page withCannot read properties of undefined (reading '0xe703…'). Enrichment now also matches by stage body address, andgetProposalTokenTotalSupplytolerates missing data (tokensTotalSupplyis typed optional).createProposalPageClient,createProcessPageClientanduseProposalPermissionCheckGuarddestructureduseDaoPlugins(...)![0]unconditionally, so a direct load with an unknown or uninstalledpluginAddresscrashed both server- and client-side. They now use safe access and render the standardPage.Errornot-found state; the permission guard skips its check until the plugin resolves.%20) producedError: Not found/Error: Bad parametersserver errors — ~250 Sentry events/14d with zero users. A newnotFoundUtils.fetchOrNotFoundmaps backend 4xx on URL-addressed lookups tonotFound(), the metadata utils suppress the same class, andonRequestErrorskips expected not-found codes. Real users with stale links now get a proper 404 page instead of a generic error.formatterUtils.formatDaterenders in the viewer's timezone (RELATIVE additionally recomputes against "now") while Vercel renders in UTC, so members/proposals/proposal-details/dashboard hydrated different text than the server sent whenever a timestamp crossed a UTC boundary. Those values are now gated behinduseIsMounted, following the existingdaoProcessDetailsPageClientpattern. Relative dates rendered inside gov-ui-kit'sProposalDataListItemhave the same issue and need a kit-side follow-up.daoAddressfilter dropped plugins client-side (APP-NEXT-2B9). With linked accounts off,useDaoPluginscomparedplugin.daoAddress === dao.addressby strict string equality while the server-side filter didn't — a checksum mismatch between the two backend fields emptied the plugin list only on the client and crashed pages dereferencingplugins[0](gauge voter). The comparison is now case-insensitive.expected(APP-NEXT-2B5, APP-NEXT-2D1, APP-NEXT-272, APP-NEXT-29W, APP-NEXT-2ED, APP-NEXT-2EZ). NewenvironmentNoisePatternslist inmonitoringUtils.beforeSend: WKWebView in-app-browser scripts stringify-ing cyclic structures (100% of APP-NEXT-2B5 events are WKWebView with zero app frames), wallet extensions fighting overwindow.ethereum, extensions mutating the DOM behind React, private-modeindexedDB, deploy skew and aborted streaming responses — plus AppKit'sFailed to disconnectas expected wallet behaviour. Kept searchable in Sentry, taggedexpected, demoted to info — routed, not dropped.AragonBackendServiceErrornow setsthis.name, so Sentry issue titles readAragonBackendServiceError: Bad parametersinstead of a bareError: ….Note
Deliberately untouched:
transactionDialog: transaction confirmation timed out(APP-NEXT-2E1) is an intentional warning-level signal for stuck-transaction monitoring; RPC/backend failures stay in theinfraclass. The generic Chrome cyclic-JSON message (no__reactFiber) still surfaces untagged so a genuine serialization bug of ours is never hidden — only the Safari/WKWebView variant is demoted. APP-NEXT-2DS/2DQ/20D last fired on releases ≤1.36 and should be resolved in Sentry after this deploys if they stay quiet; the gauge-voter client still dereferencesplugins[0]without a guard (stale issue, root cause fixed here) — a defensive rewrite of that page is a separate follow-up.🤖 Generated with Claude Code