Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .pubignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ migrate_working_dir/
# The device verification harness (doc/verification.md) and the app it drives: dev tooling, never published.
/scripts/device/
/example/lib/verify_main.dart
/example/lib/e2e_main.dart
/test/device_harness_test.dart
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
A rewrite for the Bugsee 7.x native SDKs (Android 7.6.0, iOS 7.1.0). **Not published yet; a prerelease.** Existing 9.x apps
should stay on 9.x: there is no compatibility layer (the decision is open), see `doc/migration-from-9x.md`.

### Known gaps

* Symbolication was exercised end to end on apidev (obfuscated release builds on an iPhone XS and an Android phone): Android, including Dart 3.14 stacks, and iOS native
crashes are symbolicated; **iOS Dart exceptions stayed raw** because of a backend symbol-lookup collision (fixes in review: bugsee-appserver#280, bugsee-background-worker#182).
The production endpoint was not used (`doc/verification.md` scenario 11). The harness's own read-back of the backend and its other later checks have not run on a device or backend; the results were read by hand.
On iOS the Dart `.symbols` file and the `App.framework` dSYM share one UUID, so the documented upload flow can leave Dart frames raw until those fixes are deployed (README, symbols section).

### Features

* **Launch and configuration.** `Bugsee.launch(token, {options})` returning `LaunchResult` (`launched`, `alreadyRunning`, `deferred`),
Expand Down
8 changes: 6 additions & 2 deletions PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Contents: [Status](#status) | [Decisions taken](#decisions-taken) | [Open decisi
| Device verification harness (emulator and simulator) | Done, not in CI | [verification](doc/verification.md) |
| Documentation pass, migration guide | Done (this pass) | [doc/README.md](doc/README.md) |
| **Not exposed on purpose** | APM transactions and spans, the appearance system, `relaunch`, secure rectangles and activities (replaced by `BugseeSecureView`), `deleteCollectedDataOnDevice`, native views | [api-surface](doc/api-surface.md) |
| **Not verified** | any physical device; iOS recovered crash reports and exception bundles (simulator limits); a valid token and the production backend | [verification](doc/verification.md) |
| **Not verified** | the production backend; what a backend (apidev, 2026-11-23) made of the uploaded symbols and crashes: symbolication was read back by hand (apidev, 2026-11-24): Android and iOS native frames symbolicated, iOS Dart exceptions raw until bugsee-appserver#280 and bugsee-background-worker#182 are deployed; the harness's own read-back and its other later checks have never run on a device or backend, see scenario 11 | [verification](doc/verification.md) |

## Decisions taken

Expand Down Expand Up @@ -87,7 +87,11 @@ Other gaps, none with an issue:
reports for native signals, Objective-C exceptions and a Swift trap; a `raise(7)`, which is SIGEMT on Darwin and not SIGBUS (10), left no report; SIGBUS itself is not yet measured on a device). The workbook's iOS recovery claims (off-main, capped,
a late completion re-persists) were not measured.
* The Gradle plugin 4.0.6 failure arm was not run; `optimizeExtensionsLoading=false` and the feedback safety-net path were not run.
* A real token and the production backend: the harness uses a loopback stand-in; server-side symbolication was run offline with the
* **End-to-end symbolication (2026-11-23/24, `doc/verification.md` scenario 11):** read back from apidev. Android (obfuscated release, R8): everything symbolicated, including the
Dart 3.14 stack. iOS: native crashes symbolicated; **Dart exceptions stay raw** because two ready records share the build-id UUID and the backend's batch lookup returned the
App dSYM (not the Dart `.symbols`): backend bug, fixes in review (bugsee-appserver#280, bugsee-background-worker#182), nothing to change in the wrapper. The tokens exist on
apidev only (production answers `ApplicationNotFoundError`), so the runs used apidev. Next step: re-run the iOS scenario once both fixes are deployed.
* A production-backend run: not done (no production tokens); the harness otherwise uses a loopback stand-in; server-side symbolication was run offline with the
backend's `dart_symbolize` (2026-11-18, `doc/exceptions.md`): it decodes the Android arm64 stack of a Dart 3.14 build only because the worker strips the
stack's header (with the header it crashes, as Flutter 3.50's `flutter symbolize` does: `_kDartSnapshotText`, no `_kDartIsolateSnapshotInstructions`);
its vendored `native_stack_traces` copy is from 2023 and needs a bump to 0.7.x to stop depending on that (owner: the backend; not changed here). A real iOS stack
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,13 @@ every build you ship.
| iOS native frames (the app, `Flutter.framework`) | the build's dSYMs | **manual in a Flutter app**: a Run Script phase after "Embed Frameworks" running `bugsee-cli xcode upload-dsyms --app-token "$BUGSEE_APP_TOKEN"` ([Bugsee CLI, Xcode](https://docs.bugsee.com/cli/xcode/)), or `bugsee-cli debug-files upload <archive>/dSYMs --type dsym --version <v> --build <n>` in CI; with Xcode 15 and newer set `ENABLE_USER_SCRIPT_SANDBOXING = NO` on the target; `$BUGSEE_APP_TOKEN` must exist in the script's environment (a user-defined build setting of the target named `BUGSEE_APP_TOKEN` does that), and the CLI fails the build, exit code 20, when it is missing or empty |

Dart symbols and iOS dSYMs are not uploaded for you by this package: nothing in a Flutter build calls the Bugsee uploader. The iOS
row is taken from Bugsee's CLI documentation and has not been measured with a Flutter build here.
dSYM upload was run once with a Flutter build (an iPhone XS, apidev, `doc/verification.md` scenario 11).

**Known issue, iOS Dart frames.** On iOS the Dart `app.ios-arm64.symbols` file and the `App.framework` dSYM carry the same UUID. When both
are uploaded (the flow above), the backend currently may pick the dSYM, which has no Dart information, and leave the Dart frames of an
obfuscated build raw (`_kDartSnapshotText+0x...`) while the issue is `ready`. Fixes are in review (bugsee-appserver#280,
bugsee-background-worker#182); until they are deployed, expect this. Native iOS frames and everything on Android were symbolicated in the same
run. Uploading only the `.symbols` file may avoid it; that was not tried. This note goes away once the fixes are deployed and the run is repeated.

## Privacy model

Expand Down
2 changes: 1 addition & 1 deletion doc/design-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ Feedback package (`packages/bugsee_flutter_feedback`, doc `packages/bugsee_flutt

## Device verification

Device verification (`scripts/device/`, the app `example/lib/verify_main.dart`, results and evidence `doc/verification.md`): workbook Part 9 as a harness, NOT in CI. Its guards are the default and must stay so: the SDK banner's version AND build (`android.sdkBuild`, `ios.sdkBuild` in `native-versions.json`), the artefact set (NDK artefact, Gradle plugin alone at the pin, four `libbugsee*.so`, provider kept at `initOrder` 200; iOS SwiftPM tag AND revision), launched, staged preconditions read back, the death of signal 11 proven (logcat plus exit info, launchd on iOS), a positive control next to every absence. A new check goes through `Run.guard`/`Run.expect`; a new parser goes in `scripts/device/core/` with a test that shows it failing (`test/device_harness_test.dart`, which also holds the drift guards for what the harness repeats). Facts that cost time: the workbook's logcat-grep for four libraries reads 1 to 2 on a correct build (it only sees libraries executed from files in the data directory; measure the in-process pair from `/proc/PID/maps` of the package's own base.apk and the crashpad pair in the handler process's maps); network capture never records the Bugsee endpoint's host, so a check must request another host name (`adb reverse` gives the emulator a second one); the iOS simulator slice has no crash reporter and files no logged exception, so recovered iOS reports and iOS exception bundles need a physical iPhone; `flutter build ios --simulator` fails on Flutter 3.41 / Xcode 27.1 (the harness uses `--config-only` plus `xcodebuild` for one simulator and `ARCHS=arm64`) and release/profile are not buildable for a simulator; iOS bundles are zstd-compressed zips (`dart:io` cannot read them: the mock's `/__plain` re-writes them); the Android report screenshot was all black in the default SurfaceView render mode at SDK 7.4.2 (bugsee-android#316); 7.5.0 captures SurfaceViews and scenario 9 FAILS when the screenshot is one flat colour while the display is not (both render modes are checked), so a black screenshot is a regression, not a known gap; the video frame remains the stronger redaction evidence; a NOT POSSIBLE scenario exits 2 unless `--allow-not-possible`.
Device verification (`scripts/device/`, the app `example/lib/verify_main.dart`, results and evidence `doc/verification.md`): workbook Part 9 as a harness, NOT in CI. Its guards are the default and must stay so: the SDK banner's version AND build (`android.sdkBuild`, `ios.sdkBuild` in `native-versions.json`), the artefact set (NDK artefact, Gradle plugin alone at the pin, four `libbugsee*.so`, provider kept at `initOrder` 200; iOS SwiftPM tag AND revision), launched, staged preconditions read back, the death of signal 11 proven (logcat plus exit info, launchd on iOS), a positive control next to every absence. A new check goes through `Run.guard`/`Run.expect` (the exception is `scripts/device/e2e_symbolication.dart`, a RUN with its own verdict and exit codes 0/1/3 whose checks are tested pure functions in `core/e2e.dart`); a new parser goes in `scripts/device/core/` with a test that shows it failing (`test/device_harness_test.dart`, which also holds the drift guards for what the harness repeats). Facts that cost time: the workbook's logcat-grep for four libraries reads 1 to 2 on a correct build (it only sees libraries executed from files in the data directory; measure the in-process pair from `/proc/PID/maps` of the package's own base.apk and the crashpad pair in the handler process's maps); network capture never records the Bugsee endpoint's host, so a check must request another host name (`adb reverse` gives the emulator a second one); the iOS simulator slice has no crash reporter and files no logged exception, so recovered iOS reports and iOS exception bundles need a physical iPhone; `flutter build ios --simulator` fails on Flutter 3.41 / Xcode 27.1 (the harness uses `--config-only` plus `xcodebuild` for one simulator and `ARCHS=arm64`) and release/profile are not buildable for a simulator; iOS bundles are zstd-compressed zips (`dart:io` cannot read them: the mock's `/__plain` re-writes them); the Android report screenshot was all black in the default SurfaceView render mode at SDK 7.4.2 (bugsee-android#316); 7.5.0 captures SurfaceViews and scenario 9 FAILS when the screenshot is one flat colour while the display is not (both render modes are checked), so a black screenshot is a regression, not a known gap; the video frame remains the stronger redaction evidence; a NOT POSSIBLE scenario exits 2 unless `--allow-not-possible`.
5 changes: 5 additions & 0 deletions doc/exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,11 @@ It zips `build/symbols/*.symbols` with a manifest (`{'target':'flutter','items':
`POST {endpoint}apps/{token}/symbols` (`{uuid, version, build}`), then `PUT`s the zip to the presigned URL it
returns. Keep the symbols of every release you ship; the build id ties a stack to them.

**Known issue (iOS).** The `.symbols` file of an iOS build and the `App.framework` dSYM share one UUID. With both uploaded, the backend
currently may select the dSYM, which holds no Dart information, so the Dart frames stay raw (`_kDartSnapshotText+0x...`) on a `ready` issue,
until bugsee-appserver#280 and bugsee-background-worker#182 are deployed (measured on apidev, `doc/verification.md` scenario 11; Android is
unaffected). Not verified: whether uploading only the `.symbols` file avoids it. Remove this note when the fixes are deployed and the run is repeated.

**Verifying a build's symbols against a captured stack, offline:**

```bash
Expand Down
Loading
Loading