Repository navigation
feat(devices): catch app crashes on physical iPhones - #21
Draft
lauridskern wants to merge 2 commits into
Draft
lauridskern wants to merge 2 commits into
lauridskern wants to merge 2 commits into
Conversation
Watch SpringBoard's exit lines through a second relay stream for an instant crash toast, then copy the matching .ips report off the phone with a new --crash-reports mode in the bundled log reader.
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.
Stacked on #20. Merge that first; this PR's base is its branch.
What
The crash toast now works on a connected physical iPhone, for debug and release builds alike. Before this, physical iPhones were skipped because their crash reports stay on the phone.
SpringBoard, catches the crash-signal exit line, which is parsed by the sameparseIosAppExitas on simulators. The app's executable name comes from adevicectl device info appscache that is loaded once per watch and reloaded when an unknown app crashes.--crash-reports <since-unix-ms>mode inmobile-dev-ios-logstriggerscom.apple.crashreportmover, then copies new top-level.ipsreports over AFC fromcom.apple.crashreportcopymobile. The server polls it every 3 s for up to 2 min and picks the report that matches the exit's PID and bundle ID. Nothing is deleted from the phone. Reports over 8 MiB are skipped.parseIosCrashReportnow takes an optional simulator ID, so phone reports parse without the CoreSimulator path check.Telemetry
logs.crash.*metrics now carrydevice_kind(simulatororphysical).logs.crash.report_waitgauge: how long a phone's report took to become readable after its exit was seen.connecttiming keeps its meaning (log streaming became ready).docs/telemetry.md.Native rebuild
npm run rebuild:ios-logsrebuilt the reader and its bundled dylibs. Homebrew's OpenSSL moved from 3.6.2 to 3.6.3 since the last build, so the bundledlibssl/libcryptoand the license text changed accordingly. Matching symbols are in.sentry/native.Verification
npm test: 730 tests, 729 pass, 1 skipped. New tests cover the physical watcher (instant exit, then the matching report after a non-matching one), parsing phone reports, the report-mode helper invocation, thedevicectlapp-name lookup, the UI watching connected iPhones and not disconnected ones, and the crash metrics with opt-out.npm run packageandcheck:mcp-budgetpass; the budget is unchanged.devicectl, but libimobiledevice couldn't reach it over USB or Wi-Fi during this work. Two things still need a real crash to confirm: that the phone's SpringBoard prints the sameProcess exited … domain:signalline as the simulator, and how long the phone takes to write the.ips.Release builds
Release builds behave the same as debug. Exit detection and reports come from iOS, not the app. App frames in a release report are addresses until symbolicated with the build's dSYM, which this PR doesn't do.