Skip to content

fix(react-native): forward attachments added after init to Android native crash reports - #389

Merged
KishanPRao merged 3 commits into
mainfrom
fix/attachments-after-init-native-crash-android
Aug 21, 2026
Merged

fix(react-native): forward attachments added after init to Android native crash reports#389
KishanPRao merged 3 commits into
mainfrom
fix/attachments-after-init-native-crash-android

Conversation

@KishanPRao

@KishanPRao KishanPRao commented Aug 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Attachments added after initialize() never reached Android native crash reports; the bridge had no useAttachments method, and addAttachment entrypoint is now available with updated native library.

Changes

  • packages/react-native/android/src/main/java/backtrace/library/BacktraceDatabase.java: declare the addAttachment JNI method.
  • packages/react-native/android/src/main/java/backtrace/library/BacktraceReactNative.java: add useAttachments, skipping paths already registered, and record the paths passed to the crash handler in initialize().
  • packages/react-native/src/crashReporter/CrashReporter.ts: drop the stale comment now that Android exposes useAttachments.

ref: BT-7502

@KishanPRao
KishanPRao requested a review from melekr August 20, 2026 18:59
@KishanPRao KishanPRao self-assigned this Aug 20, 2026
@KishanPRao KishanPRao added the bug Something isn't working label Aug 20, 2026
@KishanPRao
KishanPRao marked this pull request as ready for review August 21, 2026 11:53
@KishanPRao
KishanPRao merged commit 6d51fac into main Aug 21, 2026
10 checks passed
@KishanPRao
KishanPRao deleted the fix/attachments-after-init-native-crash-android branch August 21, 2026 12:05
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