feat: hang detection (ANR) — Android support#16
Draft
bobbyg603 wants to merge 1 commit into
Draft
Conversation
Upgrades bugsplat-android from 1.2.0 to 1.3.0, which automatically captures historical ANRs via ApplicationExitInfo on Android 11+ at init() time. Exposes a cross-platform hang() test helper that blocks the native main thread on Android and warns on iOS/Expo Go/web. iOS hang detection is pending upstream bugsplat-apple support. Closes #15 Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
com.bugsplat:bugsplat-android1.2.0 → 1.3.0, which automatically detects and reports historical ANRs viaApplicationExitInfoon Android 11+ each timeinit()is called (no additional config needed).hang()test helper that blocks the native main thread on Android for end-to-end ANR verification. iOS / Expo Go / web log a warning.ApplicationExitInfo, and uploaded byAnrReporteron the nextinit().Closes #15.
Draft — awaiting iOS implementation
This PR is kept in draft while iOS hang detection lands upstream in bugsplat-apple. The iOS Swift module currently no-ops
hang()with an NSLog, matching the "not yet supported" contract in the TypeScript layer. Once the iOS SDK exposes a hang helper, a follow-up commit on this branch will wire it through and we can mark the PR ready for review.Test plan
npm test— 76/76 pass (addedhangcoverage to native, Expo Go, and web suites)npx tsc --noEmitcleangoogle_apisimage): tap Init → tap Trigger Hang → system ANR dialog fires → relaunch → ANR report uploaded to BugSplat ascrash_type = Android.ANR🤖 Generated with Claude Code