Skip to content

bugfix: deliver unhandled java exception reports before process death - #393

Merged
KishanPRao merged 1 commit into
mainfrom
bugfix/unhandled-java-exceptions
Sep 3, 2026
Merged

bugfix: deliver unhandled java exception reports before process death#393
KishanPRao merged 1 commit into
mainfrom
bugfix/unhandled-java-exceptions

Conversation

@KishanPRao

Copy link
Copy Markdown
Collaborator

Summary

In the default configuration an unhandled Java exception report never left the device: the handler killed the process right after handing the exception to JS.

Changes

  • BacktraceAndroidBackgroundUnhandledExceptionHandler.java: blocks the crashing thread on a CountDownLatch until JS calls the new reportProcessed method, 5s cap, invokes the JS callback once, synchronizes uncaughtException.
  • AndroidUnhandledExceptionHandler.ts: awaits client.send, calls reportProcessed from a finally, swallows a failed send.
  • androidUnhandledExceptionHandlerTests.spec.ts: new, covers signalling native after a successful and a failed send, the error type, no start without the bridge, stop on dispose.

ref: BT-7513

@KishanPRao
KishanPRao requested a review from melekr September 2, 2026 16:10
@KishanPRao KishanPRao self-assigned this Sep 2, 2026
@KishanPRao KishanPRao added the bug Something isn't working label Sep 2, 2026

@melekr melekr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@KishanPRao
KishanPRao marked this pull request as ready for review September 3, 2026 10:47
@KishanPRao
KishanPRao merged commit 8902cc2 into main Sep 3, 2026
12 checks passed
@KishanPRao
KishanPRao deleted the bugfix/unhandled-java-exceptions branch September 3, 2026 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants