Repository navigation
Report every app and server error to Exceptionless and fix the top crashes - #125
Merged
Merged
Conversation
… top crashes Telemetry - Report on-screen, swallowed, and console-logged errors with Supabase details, network tags, de-duplication, and stable grouping. - Report edge function 5xx failures from game-action and delete-account. - Add `npm run errors` to read Exceptionless stacks and events. Fixes - Give every realtime subscription a unique channel so returning to a game no longer reuses a subscribed channel and crashes. - Show Waiting for Friend instead of a one-player board for an open invite. - Store sessions readable after first unlock so locked background wakes stop failing with keychain errors. - Let the signed-in account claim a device's push destination from a stale owner. - Retry background move recovery with backoff instead of reporting transient network failures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From an independent review of the Exceptionless work. Server - Report unexpected game-action faults even when they respond 4xx, with GameId and RequestId; game rules still reject with a plain Error. - Never throw from the reporter, time out submissions, keep wrapped causes, and redact messages, stacks and details. - Remove unregistered Expo push tokens and report other ticket failures without retrying, and keep Expo response bodies out of error messages. App - One unit-tested policy: skip expected player mistakes and game rule rejections, send network failures at most once per operation every 10 minutes, and stack library and coded errors by operation and code. - Redact emails, push tokens and endpoints, JWTs and row values, and exclude credential fields. - Retry pending moves that fail during background recovery with backoff and report only when retries run out; share one recovery pass at a time. - Restore the saved session if the keychain migration write fails. - Attach GameId to game screen events, mark render crashes critical, report realtime channel errors, stop double-reporting sign-in failures, and cover two silent catches. - Identify releases by build plus over-the-air update, or web commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
Production errors were reaching Exceptionless only partly. Many were caught and shown to players, or logged and dropped, and the server never reported its own failures. Unrelated failures also piled into a few big stacks. This PR closes that loop so every real error a player hits arrives with enough context to fix it, without flooding the project with noise. It also fixes the top crashes found in the data.
Crash and bug fixes
Cannot read property 'scorecard' of undefined. Opening your own invite before a friend joined mounted a one-player board. That case now shows "Waiting for Friend" instead.claim_push_token/claim_web_push_subscriptionfunctions let the signed-in account take over a stale device registration.Telemetry
console.warn/console.error, realtime channel error and render crash is reported. Render crashes are marked critical.src/monitoring/errorPolicy.ts, unit tested):game-actionreports unexpected faults even when it responds 4xx, withGameIdandRequestId. Game rules reject with a plainError, andInternalServerErrormarks server invariants. The reporter never throws and times out its submissions. Unregistered Expo push tokens are removed, and other ticket failures are reported.shared/redaction.ts): emails, push tokens and endpoints, JWTs and database row values. Credential fields are excluded on the client.GameId. Native versions include the over-the-air update ID, and web versions include the commit (EXPO_PUBLIC_RELEASE_ID, set by the web build).npm run errorslists stacks and events for an AI agent or developer. The rules are documented indocs/release-quality.md.Deploy order (required)
The app no longer reports 4xx game-action errors itself; it relies on the server to report real faults. Before the web deploy or any over-the-air update that carries this client:
20261023130000_claim_push_destinations.sql. The new client calls these functions, so push registration fails without it.EXCEPTIONLESS_API_KEY.game-actionanddelete-account.Validation
npm run typecheck,npm run typecheck:edge,npm run lintnpm run test: 228 pass, including the newerrorPolicytestsnpm run test:edge: 49 pass, including the new server classification and reporter testsremote-turn-revealwas updated for the per-subscription topic names. Screenshot baselines are Linux-rendered, so this PR's CI is what verifies them.Known follow-ups
🤖 Generated with Claude Code