Skip to content

Commit b3e4364

Browse files
authored
Merge branch 'main' into dependabot/npm_and_yarn/uuid-14.0.0
2 parents f5832be + 3188423 commit b3e4364

31 files changed

Lines changed: 268 additions & 48 deletions

File tree

.craft.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ targets:
99
npm:@sentry/react-native:
1010
includeNames: /^sentry-react-native-\d.*\.tgz$/
1111
npm:@sentry/expo-upload-sourcemaps:
12+
name: '@sentry/expo-upload-sourcemaps'
1213
includeNames: /^sentry-expo-upload-sourcemaps-\d.*\.tgz$/

.github/workflows/buildandtest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ jobs:
166166
name: ${{ github.sha }}
167167
path: |
168168
${{ github.workspace }}/packages/core/*.tgz
169+
${{ github.workspace }}/packages/expo-upload-sourcemaps/*.tgz
169170
170171
job_type_check:
171172
name: Type Check Typescript 3.8

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
99
## Unreleased
1010

11+
### Fixes
12+
13+
- Stop the Hermes sampling profiler on React instance teardown to prevent `pthread_kill` SIGABRT when the JS thread is torn down with profiling active ([#6035](https://github.com/getsentry/sentry-react-native/pull/6035))
14+
15+
## 8.9.1
16+
1117
### Features
1218

1319
- Add new `@sentry/expo-upload-sourcemaps` package for uploading JavaScript bundles and source maps from Expo builds to Sentry ([#6027](https://github.com/getsentry/sentry-react-native/pull/6027))
@@ -20,7 +26,9 @@
2026

2127
### Fixes
2228

29+
- Fix `@sentry/expo-upload-sourcemaps` publishing issue ([#6037](https://github.com/getsentry/sentry-react-native/pull/6037))
2330
- Fix iOS UI profiling options being silently ignored ([#6012](https://github.com/getsentry/sentry-react-native/pull/6012))
31+
- Fix `_experiments.enableUnhandledCPPExceptionsV2` being silently ignored on iOS ([#6014](https://github.com/getsentry/sentry-react-native/pull/6014))
2432
- Check `captureReplay` return value in iOS bridge to avoid linking error events to uncaptured replays ([#6008](https://github.com/getsentry/sentry-react-native/pull/6008))
2533
- Report the expected properties file path and any missing keys when using `flavorAware` on Android, instead of failing with an opaque `Illegal null value provided in this collection` error ([#6031](https://github.com/getsentry/sentry-react-native/pull/6031))
2634

SDK-VERSIONS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ To manually update the table with the current version, run `./scripts/update-sdk
1212

1313
| React Native SDK | Android SDK | Cocoa SDK | JavaScript SDK |
1414
| ---------------- | ----------- | --------- | -------------- |
15+
| [8.9.1](https://github.com/getsentry/sentry-react-native/releases/tag/8.9.1) | [8.40.0](https://github.com/getsentry/sentry-java/releases/tag/8.40.0) | [9.11.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.11.0) | [10.49.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.49.0) |
1516
| [8.8.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.8.0) | [8.38.0](https://github.com/getsentry/sentry-java/releases/tag/8.38.0) | [9.10.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.10.0) | [10.48.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.48.0) |
1617
| [8.7.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.7.0) | [8.37.1](https://github.com/getsentry/sentry-java/releases/tag/8.37.1) | [9.8.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.8.0) | [10.47.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.47.0) |
1718
| [8.6.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.6.0) | [8.36.0](https://github.com/getsentry/sentry-java/releases/tag/8.36.0) | [9.8.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.8.0) | [10.46.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.46.0) |

dev-packages/e2e-tests/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sentry-react-native-e2e-tests",
3-
"version": "8.8.0",
3+
"version": "8.9.1",
44
"private": true,
55
"description": "Sentry React Native End to End Tests Library",
66
"main": "dist/index.js",
@@ -14,7 +14,7 @@
1414
"@babel/preset-env": "^7.25.3",
1515
"@babel/preset-typescript": "^7.18.6",
1616
"@sentry/core": "10.49.0",
17-
"@sentry/react-native": "8.8.0",
17+
"@sentry/react-native": "8.9.1",
1818
"@types/node": "^20.9.3",
1919
"@types/react": "^18.2.64",
2020
"appium": "3.2.2",

dev-packages/type-check/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sentry-react-native-type-check",
33
"private": true,
4-
"version": "8.8.0",
4+
"version": "8.9.1",
55
"scripts": {
66
"type-check": "./run-type-check.sh"
77
}

dev-packages/utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sentry-react-native-samples-utils",
3-
"version": "8.8.0",
3+
"version": "8.9.1",
44
"description": "Internal Samples Utils",
55
"main": "index.js",
66
"license": "MIT",

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "8.8.0",
3+
"version": "8.9.1",
44
"packages": [
55
"packages/*",
66
"dev-packages/*",
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package io.sentry.react
2+
3+
import org.junit.Test
4+
import org.junit.runner.RunWith
5+
import org.robolectric.RobolectricTestRunner
6+
7+
/**
8+
* Tests for the profiling lifecycle on the RNSentryModuleImpl.
9+
*
10+
* Note: the Hermes sampling profiler is a JNI-backed static API and cannot be loaded in a pure
11+
* JVM unit-test environment. These tests exercise only the paths that do not cross the JNI
12+
* boundary — specifically, the invalidate() guard that returns early when profiling is not
13+
* active. If the guard were to regress and call into Hermes, the tests would fail with
14+
* UnsatisfiedLinkError.
15+
*/
16+
@RunWith(RobolectricTestRunner::class)
17+
class RNSentryProfilingTest {
18+
@Test
19+
fun `invalidate is a no-op on a fresh module`() {
20+
val module = Utils.createRNSentryModuleWithMockedContext()
21+
// isProfiling starts false; invalidate() should return early without touching
22+
// HermesSamplingProfiler. If it didn't, the JNI call would throw UnsatisfiedLinkError.
23+
module.invalidate()
24+
}
25+
26+
@Test
27+
fun `invalidate is idempotent`() {
28+
val module = Utils.createRNSentryModuleWithMockedContext()
29+
module.invalidate()
30+
module.invalidate()
31+
module.invalidate()
32+
}
33+
}

packages/core/RNSentryCocoaTester/RNSentryCocoaTesterTests/RNSentryTests.m

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,6 +1471,60 @@ - (void)testStartCreateOptionsWithDictionaryEmptyExperimentsDoesNotInstallConfig
14711471
}
14721472
#endif
14731473

1474+
- (void)testStartCreateOptionsWithDictionaryEnableUnhandledCPPExceptionsV2Enabled
1475+
{
1476+
NSError *error = nil;
1477+
1478+
NSDictionary *_Nonnull mockedReactNativeDictionary = @{
1479+
@"dsn" : @"https://abcd@efgh.ingest.sentry.io/123456",
1480+
@"_experiments" : @ {
1481+
@"enableUnhandledCPPExceptionsV2" : @YES,
1482+
},
1483+
};
1484+
SentryOptions *actualOptions =
1485+
[RNSentryStart createOptionsWithDictionary:mockedReactNativeDictionary error:&error];
1486+
1487+
XCTAssertNotNil(actualOptions, @"Did not create sentry options");
1488+
XCTAssertNil(error, @"Should not pass no error");
1489+
XCTAssertTrue(actualOptions.experimental.enableUnhandledCPPExceptionsV2,
1490+
@"enableUnhandledCPPExceptionsV2 should be enabled");
1491+
}
1492+
1493+
- (void)testStartCreateOptionsWithDictionaryEnableUnhandledCPPExceptionsV2Disabled
1494+
{
1495+
NSError *error = nil;
1496+
1497+
NSDictionary *_Nonnull mockedReactNativeDictionary = @{
1498+
@"dsn" : @"https://abcd@efgh.ingest.sentry.io/123456",
1499+
@"_experiments" : @ {
1500+
@"enableUnhandledCPPExceptionsV2" : @NO,
1501+
},
1502+
};
1503+
SentryOptions *actualOptions =
1504+
[RNSentryStart createOptionsWithDictionary:mockedReactNativeDictionary error:&error];
1505+
1506+
XCTAssertNotNil(actualOptions, @"Did not create sentry options");
1507+
XCTAssertNil(error, @"Should not pass no error");
1508+
XCTAssertFalse(actualOptions.experimental.enableUnhandledCPPExceptionsV2,
1509+
@"enableUnhandledCPPExceptionsV2 should be disabled");
1510+
}
1511+
1512+
- (void)testStartCreateOptionsWithDictionaryEnableUnhandledCPPExceptionsV2Default
1513+
{
1514+
NSError *error = nil;
1515+
1516+
NSDictionary *_Nonnull mockedReactNativeDictionary = @{
1517+
@"dsn" : @"https://abcd@efgh.ingest.sentry.io/123456",
1518+
};
1519+
SentryOptions *actualOptions =
1520+
[RNSentryStart createOptionsWithDictionary:mockedReactNativeDictionary error:&error];
1521+
1522+
XCTAssertNotNil(actualOptions, @"Did not create sentry options");
1523+
XCTAssertNil(error, @"Should not pass no error");
1524+
XCTAssertFalse(actualOptions.experimental.enableUnhandledCPPExceptionsV2,
1525+
@"enableUnhandledCPPExceptionsV2 should default to disabled");
1526+
}
1527+
14741528
- (void)testStartEventFromSentryCocoaReactNativeHasOriginAndEnvironmentTags
14751529
{
14761530
SentryEvent *testEvent = [[SentryEvent alloc] init];

0 commit comments

Comments
 (0)