Skip to content

Exception capture edge cases: render errors need Bugsee.wrap, <ErrorBoundary> ignores detect.crash, log-and-rethrow loses the crash, no crash reports on the iOS Simulator #140

Open

Description

@krassx

Found while documenting the 7.x beta (docs PR bugsee/docs#110). Checked against the source on main at 7.0.0-beta3; file:line references are to the SDK repo unless a repo is named. Not reproduced on a device unless a line says so.

  1. Uncaught render errors on React Native 0.81+ bypass ErrorUtils, so they are reported only when the app root uses Bugsee.wrap. A third-party or React error boundary above the app hides the error from Bugsee entirely.
  2. <ErrorBoundary> ignores com.bugsee.option.detect.crash: it reports even when the option is false, as logException does, whereas the root reporter honours the option (src/exceptions/ErrorBoundary.tsx). May or may not be intended.
  3. Log then rethrow: dedup is by error object (markReported, src/exceptions/report.ts:40-49), so logException(e) followed by a rethrow that ends the app is not reported again as a crash, and logUnhandledException(e) after logException(e) does nothing either. An error is also claimed when its report is dropped (logException before launch).
  4. iOS Simulator: the simulator slice has no crash reporter, and logUnhandledException is compiled out there (BugseeModule.mm), so crash capture cannot be exercised on a Simulator in this beta.
  5. Unhandled promise rejections are reported as handled errors (reportHandled), not as crashes, and Hermes has no getter for the rejection tracker: the last caller of enablePromiseRejectionTracker wins.

Suggested direction

Decide and document each (2 and 3 are behaviour decisions); for 1 consider installing the render-error hook without requiring Bugsee.wrap, or warn when the root is not wrapped.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions