Commit d5c32e3
feat: v8: Capture app start errors before JS (#5582)
* ref(ios): Extract Cocoa SDK init into standalone file (#4442)
* ref(android): Extracts Android native initialization to standalone structures (#4445)
* Extract Android SDK Init
* Update tests
* Adds changelog
* Fix lint issues
* Rename RNSentryStart instance for clarity
* Converts RNSentryStart to utility class
* Update CHANGELOG.md
---------
Co-authored-by: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com>
* feat(experimental): Add native `startWithConfigureOptions` for Apple platforms (#4444)
* feat: Read `sentry.options.json` during cocoa init (#4447)
* Adds utility class for converting `JsonObject` to `WritableMap` (#4479)
* Convert json object to writable map
* Make class/methods package-private(default)
* feat: Automatically load `sentry.options.json` file (#4476)
* feat(experimental): Initialize Android SDK from json configuration (#4451)
* misc: Add `sentry.options.json` example to the changelog (#4509)
* feat(init): Load options from `sentry.options.json` in JS (#4510)
* release: 6.7.0-alpha.0
* misc(sample): Change RN Sample to use native file init by default (#4522)
* chore(sample-rn): Remove duplicate init options from code (#4532)
* chore(sample-rn): Always use fhe file option (including auto init) (#4533)
* internal(sample-rn): Add Detox for integration/e2e tests of the rn sample (#4535)
* internal(sample-rn): Add header and message envelope tests (#4536)
* fix(sample-e2e): Fix type errors missing sentry/core and afterAll (#4564)
* chore(samples): Add package scripts for native builds, dsn and testing (#4561)
* test(e2e): Verify captured Errors Screen transaction (#4584)
* test(e2e): Add auto init from JS tests (#4588)
* test(e2e): Add app start crash test for iOS (#4593)
* test(e2e): Avoid race conditions when waiting for captured message (#4595)
* chore(sample-e2e): Move Detox related files to e2e-detox dir
* fix: remove unused SentryPackage import
Removed unused import that was causing CI lint failure
* fix: update RNSentryStartTest for Sentry Android SDK v7 API changes
- Removed assertions for packages getter (not available in v7)
- Removed assertion for enableTracing property (removed in v7)
- Added comments explaining the API changes
* fix: remove unused addPackages method to fix PMD lint error
The method was a no-op after v7 API changes, so removing it entirely
to avoid unused parameter warnings from PMD.
* fix: update RNSentrySDKTest for Sentry Android SDK v7 API changes
- Removed assertions for enableTracing property (removed in v7)
- Removed assertions for packages getter (not available in v7)
- Added comments explaining the API changes
* fix: use relative path for RNSentrySDK+Test.h import in bridging header
The file is in the parent directory, so use ../ prefix to fix the import path
* fix: remove deprecated enableTracing property in iOS RNSentryStart
The property is deprecated in v7. Tracing is already disabled by setting
tracesSampleRate and tracesSampler to nil.
* fix: remove enableTracing assertions from iOS tests
The enableTracing property is deprecated in Sentry Cocoa SDK v7.
Tracing is already verified to be disabled by checking that
tracesSampleRate and tracesSampler are nil.
* Update Podspec
* Fix lint issue
* ref(sample-e2e): v7: Migrate from Detox to Maestro (#5473)
* chore(sample-e2e): Migrate from Detox to Maestro
* fix set dsn script path
* fix: Update script paths after detox-to-maestro migration
The set-dsn scripts were moved from scripts/detox/ to scripts/ during the migration
* Update script paths
* Fix tests
* Fix test failure
* Fix idle issue
* fix(e2e): Fix Maestro flows for captureMessage and captureSpaceflightNewsScreen
- Add scrollUntilVisible for 'Capture message' button (might be off-screen)
- Add proper waiting and scrolling for SpaceflightNewsScreen to trigger auto-load
- Wait for 'Load More Articles' button to appear after autoLoadCount threshold
* chore(e2e-sample): Increase Maestro driver startup timeout
(cherry picked from commit ee429b5)
* increase timeout
* Increase timeouts on Android too
---------
Co-authored-by: Krystof Woldrich <krystof.woldrich@sentry.io>
* chore: Merge Android UI profiling on the capture startup crashes branch (#5544)
* chore: Merge Android UI profiling on the capture startup crashes branch
* Fix logger compilation issue
* Properly check logging values
* fix SR iOS issue (#5560)
* Remove duplicate changelog entry
* feat(expo): Add RNSentrySDK APIs support to @sentry/react-native/expo plugin (#4633)
* useNativeInit Android implementation
* Adds changelog
* useNativeInit iOS implementation
* Fix indentation
* Extend test cases with realistic data
* Adds code sample in the changelog
* Fix CHANGELOG.md
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
* Warn if RESentySDK.init/start wasn't injected
* Make useNativeInit opt-in
* Make Android failure warning more clear
Co-authored-by: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com>
* Make Android no update warning more clear
Co-authored-by: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com>
* Use path.basename to get last path component
* Update tests to account for the new warnings
* Explicitly check for kotlin
* Add filename in the warning message
* Import only if init injection succeeds
* Explicitly check for Objective-C
* Add filename in the warning
* Make iOS file not found warning more clear
* Import only if init injection succeeds
* Reset test mock config in a function
* Lint issue
* Add missing quote
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
* Remove unneeded async
Co-authored-by: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com>
* Set useNativeInit = false by default
* dynamically fill white spaces
* Add unsupported language in warning message
* Add objcpp in detected languages
Co-authored-by: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com>
* Update tests for objcpp
* ref(expo-plugin): Split utils to logger, version and utils (#4906)
Co-authored-by: Antonis Lilis <antonis.lilis@gmail.com>
* Update changelog
* fix(ios): Add Swift module support for RNSentrySDK native init
Fixes Swift compilation errors when using the useNativeInit Expo plugin feature.
Changes:
- Updated RNSentry.h to use angle bracket import for RNSentrySDK, properly
exposing it through the module system
- Added DEFINES_MODULE to RNSentry.podspec to enable Swift module generation
- Fixed Expo plugin to insert import after first import statement (supports
modern Expo AppDelegate structure without UIKit import)
This enables Swift code to successfully import RNSentry and call
RNSentrySDK.start() when using native initialization.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix test
* Update changelog
* Fix native tests
* Fix lint issue
* Fix native tests
* Revert unneeded changes
* Fix sample app build
---------
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
Co-authored-by: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* Fix native ios tests
* Mark area
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
* fix(android): Fix ConcurrentModificationException (#5588)
* fix(android): Fix ConcurrentModificationException when disabling native crash handling
When enableNativeCrashHandling is set to false, the code was iterating over
the integrations list with a for-each loop while calling remove() directly,
which causes a ConcurrentModificationException at runtime.
Fixed by using Java 8's removeIf() method which safely handles iteration
and removal in a single operation. This is more concise and follows modern
Java best practices.
Added unit tests to verify the fix and ensure integrations are properly
removed without throwing exceptions.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Lint fix
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(android): Fix crash when spotlight is enabled without defaultSidecarUrl
The code attempted to read defaultSidecarUrl without checking if the key
exists in the options map. This caused a NoSuchKeyException crash during
startup when spotlight was set to true in sentry.options.json without
providing defaultSidecarUrl.
Added key existence check to match iOS implementation behavior and prevent
the crash while maintaining backward compatibility.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* test(e2e): Add auto init from JS tests for Android (#5583)
* test(e2e): Add auto init from JS tests for Android
Implements Android E2E testing infrastructure to verify both manual native initialization and auto initialization from JavaScript, matching the iOS implementation and resolving issue #4912.
Key additions:
- Jest configs for android.auto and android.manual test modes
- Build scripts that toggle SENTRY_DISABLE_NATIVE_START at compile time
- Test scripts to run auto and manual test suites separately
- App start crash testing via flag file mechanism
- TestControlModule to enable/disable crash-on-start from JS
- Comprehensive E2E test documentation
Unlike iOS which uses launch arguments at runtime, Android requires separate builds with different build configurations to control native initialization.
Closes #4912
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(e2e): Add scrolling to find crash control buttons in Android test
The crash control buttons are off-screen, so the Maestro flow needs to
scroll to find them before tapping. This matches the pattern used in
other Android E2E tests.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(e2e): Make Android crash flag auto-expire after one crash
The crash flag file was persisting across app launches, causing the app
to crash indefinitely. Now the flag auto-deletes when read, allowing:
1. First launch: Enable flag
2. Second launch: Read flag, delete it, then crash
3. Third launch: Start normally and send crash report
This solves the chicken-and-egg problem where the app couldn't reach
JavaScript to clear the flag because it kept crashing before JS loaded.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(e2e): Handle wrapped exceptions in Android crash test
Android wraps exceptions thrown in Application.onCreate() with:
"Unable to create application... RuntimeException: <original message>"
Updated the test to check if ANY exception in the chain contains our
intentional crash message, rather than expecting an exact match on the
first exception.
Test now passes locally and should pass in CI.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
* Clean up notes for now
---------
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
* fix(android): Fix crash when dsn or devServerUrl are missing from options
Fixes a crash on Android startup when initializing from sentry.options.json
without dsn or devServerUrl fields. The code was calling getString() on
ReadableMap without checking if the keys exist first, which throws
NoSuchKeyException for missing keys.
Both fields are optional in configuration files, so the code now checks
for key existence before accessing values, returning null when keys are
missing. This matches the pattern used throughout the rest of the file
and is already handled correctly by the null-checks in the breadcrumb
filter logic.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Krystof Woldrich <31292499+krystofwoldrich@users.noreply.github.com>
Co-authored-by: Krystof Woldrich <krystof.woldrich@sentry.io>
Co-authored-by: getsentry-bot <bot@sentry.io>
Co-authored-by: getsentry-bot <bot@getsentry.com>
Co-authored-by: LucasZF <lucas-zimerman1@hotmail.com>
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent db9c1a8 commit d5c32e3
File tree
132 files changed
+5863
-1082
lines changed- .github/workflows
- packages/core
- RNSentryAndroidTester/app/src
- androidTest
- assets
- java/io/sentry/react
- test/java/io/sentry/react
- RNSentryCocoaTester
- RNSentryCocoaTesterTests
- TestAssets
- android/src/main/java/io/sentry/react
- ios
- plugin/src
- scripts
- src/js
- tools
- utils
- test
- expo-plugin
- tools
- samples
- expo
- react-native-macos/scripts
- react-native
- android
- app
- src
- androidTest/java/io/sentry/reactnative/sample
- main/java/io/sentry/reactnative/sample
- e2e
- tests
- captureAppStartCrash
- captureErrorScreenTransaction
- captureHeader
- captureMessage
- captureSpaceflightNewsScreenTransaction
- utils
- ios
- sentryreactnativesample.xcodeproj
- sentryreactnativesample
- scripts
- src
- Screens
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
132 files changed
+5863
-1082
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
| 115 | + | |
| 116 | + | |
117 | 117 | | |
118 | | - | |
119 | | - | |
| 118 | + | |
| 119 | + | |
120 | 120 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 121 | + | |
| 122 | + | |
125 | 123 | | |
126 | 124 | | |
127 | 125 | | |
128 | | - | |
| 126 | + | |
129 | 127 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
| 128 | + | |
| 129 | + | |
143 | 130 | | |
144 | | - | |
| 131 | + | |
| 132 | + | |
145 | 133 | | |
146 | 134 | | |
147 | 135 | | |
148 | | - | |
| 136 | + | |
149 | 137 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
165 | 142 | | |
166 | 143 | | |
167 | 144 | | |
168 | 145 | | |
169 | 146 | | |
170 | | - | |
| 147 | + | |
171 | 148 | | |
172 | 149 | | |
173 | 150 | | |
| |||
184 | 161 | | |
185 | 162 | | |
186 | 163 | | |
| 164 | + | |
187 | 165 | | |
188 | | - | |
189 | 166 | | |
190 | 167 | | |
191 | 168 | | |
192 | 169 | | |
193 | 170 | | |
194 | 171 | | |
195 | 172 | | |
196 | | - | |
197 | 173 | | |
198 | 174 | | |
199 | | - | |
| 175 | + | |
| 176 | + | |
200 | 177 | | |
201 | 178 | | |
202 | 179 | | |
| |||
272 | 249 | | |
273 | 250 | | |
274 | 251 | | |
275 | | - | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
276 | 255 | | |
277 | 256 | | |
278 | 257 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
34 | 103 | | |
35 | 104 | | |
36 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | | - | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | | - | |
| 66 | + | |
63 | 67 | | |
64 | 68 | | |
65 | 69 | | |
| |||
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 103 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
0 commit comments