Skip to content

Commit 5dbbe5a

Browse files
authored
Merge branch 'main' into alwx/refactor/migrate-private-sentry-sdk-only
2 parents c70a93a + 6ca36d2 commit 5dbbe5a

27 files changed

Lines changed: 235 additions & 39 deletions

File tree

.github/workflows/buildandtest.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,28 @@ jobs:
3434
- name: Test
3535
run: yarn test
3636

37+
job_native_link_check:
38+
name: Android Native Link Check
39+
runs-on: ubuntu-latest
40+
needs: [diff_check]
41+
if: ${{ needs.diff_check.outputs.skip_ci != 'true' }}
42+
steps:
43+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
44+
- run: corepack enable
45+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
46+
with:
47+
package-manager-cache: false
48+
node-version: 18
49+
cache: 'yarn'
50+
cache-dependency-path: yarn.lock
51+
- name: Install Dependencies
52+
run: yarn install
53+
# Guards against regressing the #6398 fix: verifies libsentry-tm-perf-logger.so
54+
# still links for armeabi-v7a under --no-undefined when the reactnative prefab
55+
# reference is unresolved. Uses the runner's preinstalled NDK (ANDROID_NDK_LATEST_HOME).
56+
- name: Check libsentry-tm-perf-logger.so links (armeabi-v7a)
57+
run: ./scripts/check-tm-perf-logger-link.sh
58+
3759
job_lint:
3860
name: Lint
3961
runs-on: ubuntu-latest

.github/workflows/sample-application-expo.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,11 @@ jobs:
187187
run: |
188188
[[ "${{ matrix.build-type }}" == "production" ]] && CONFIG='Release' || CONFIG='Debug'
189189
echo "Building $CONFIG"
190-
./gradlew ":app:assemble$CONFIG" -PreactNativeArchitectures=x86
190+
# Build all ABIs (not just x86): the Sentry perf-logger native library is
191+
# compiled from source per ABI, and #6398 (armeabi-v7a link failure) was
192+
# reported on an Expo build. Keeps ABI coverage consistent with the bare
193+
# RN sample.
194+
./gradlew ":app:assemble$CONFIG" -PreactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
191195
192196
- name: Export Expo
193197
working-directory: samples/expo

.github/workflows/sample-application.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,12 @@ jobs:
185185
[[ "${{ matrix.build-type }}" == "production" ]] && export CONFIG='release' || export CONFIG='debug'
186186
187187
./scripts/set-dsn-aos.mjs
188-
./scripts/build-android.sh -PreactNativeArchitectures=x86
188+
# Build all ABIs (not just x86) so armeabi-v7a and the 64-bit ABIs are
189+
# exercised too. The Sentry perf-logger native library is compiled from
190+
# source per ABI, and ABI-specific breakage has shipped before (#6394
191+
# 16 KB alignment, #6398 armeabi-v7a link) precisely because CI only
192+
# built x86. The 16 KB alignment check below then runs across every ABI.
193+
./scripts/build-android.sh -PreactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
189194
190195
- name: Check 16 KB native library alignment
191196
# Only Sentry-owned libraries are checked: third-party/React Native

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,22 +6,26 @@
66
> make sure you follow our [migration guide](https://docs.sentry.io/platforms/react-native/migration/) first.
77
<!-- prettier-ignore-end -->
88
9-
## Unreleased
9+
## 8.17.2
1010

1111
### Fixes
1212

13+
- Fix Android New Architecture build failing to link `libsentry-tm-perf-logger.so` with an undefined `TurboModulePerfLogger::enableLogging` symbol on some setups (e.g. armeabi-v7a) ([#6406](https://github.com/getsentry/sentry-react-native/pull/6406))
1314
- Fix Android New Architecture build failing at CMake configure on React Native 0.75 by gating the `libsentry-tm-perf-logger.so` native build to RN 0.76+ ([#6407](https://github.com/getsentry/sentry-react-native/pull/6407))
1415

1516
## 8.17.1
1617

18+
> [!WARNING]
19+
> ⚠️ **Known Issue (Android):** New Architecture builds on `sentry-react-native` **8.17.1** can fail to build `libsentry-tm-perf-logger.so` (subset-ABI builds such as `armeabi-v7a`/Expo, and React Native 0.75) ([#6398](https://github.com/getsentry/sentry-react-native/issues/6398)). **Please use [8.17.2](https://github.com/getsentry/sentry-react-native/releases/tag/8.17.2)**.
20+
1721
### Fixes
1822

1923
- Force 16 KB ELF alignment for `libsentry-tm-perf-logger.so` so it does not break 16 KB page size compatibility on Android 15+ ([#6396](https://github.com/getsentry/sentry-react-native/pull/6396))
2024

2125
## 8.17.0
2226

2327
> [!WARNING]
24-
> ⚠️ **Known Issue (Android):** Apps built with the New Architecture on `sentry-react-native` **8.17.0** bundle a native library (`libsentry-tm-perf-logger.so`) that is not 16 KB page aligned, which breaks [16 KB page size](https://developer.android.com/guide/practices/page-sizes) compatibility on Android 15+ (and fails Google Play's 16 KB requirement). See [#6394](https://github.com/getsentry/sentry-react-native/issues/6394). **Please use [8.17.1](https://github.com/getsentry/sentry-react-native/releases/tag/8.17.1)**.
28+
> ⚠️ **Known Issue (Android):** Apps built with the New Architecture on `sentry-react-native` **8.17.0** bundle a native library (`libsentry-tm-perf-logger.so`) that is not 16 KB page aligned, which breaks [16 KB page size](https://developer.android.com/guide/practices/page-sizes) compatibility on Android 15+ (and fails Google Play's 16 KB requirement). See [#6394](https://github.com/getsentry/sentry-react-native/issues/6394). **Please use [8.17.2](https://github.com/getsentry/sentry-react-native/releases/tag/8.17.2)**.
2529
2630
### Internal
2731

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.17.2](https://github.com/getsentry/sentry-react-native/releases/tag/8.17.2) | [8.47.0](https://github.com/getsentry/sentry-java/releases/tag/8.47.0) | [9.19.1](https://github.com/getsentry/sentry-cocoa/releases/tag/9.19.1) | [10.63.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.63.0) |
1516
| [8.17.1](https://github.com/getsentry/sentry-react-native/releases/tag/8.17.1) | [8.47.0](https://github.com/getsentry/sentry-java/releases/tag/8.47.0) | [9.19.1](https://github.com/getsentry/sentry-cocoa/releases/tag/9.19.1) | [10.63.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.63.0) |
1617
| [8.17.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.17.0) | [8.47.0](https://github.com/getsentry/sentry-java/releases/tag/8.47.0) | [9.19.1](https://github.com/getsentry/sentry-cocoa/releases/tag/9.19.1) | [10.63.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.63.0) |
1718
| [8.16.0](https://github.com/getsentry/sentry-react-native/releases/tag/8.16.0) | [8.45.0](https://github.com/getsentry/sentry-java/releases/tag/8.45.0) | [9.19.0](https://github.com/getsentry/sentry-cocoa/releases/tag/9.19.0) | [10.61.0](https://github.com/getsentry/sentry-javascript/releases/tag/10.61.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.17.1",
3+
"version": "8.17.2",
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.63.0",
17-
"@sentry/react-native": "8.17.1",
17+
"@sentry/react-native": "8.17.2",
1818
"@types/node": "^20.9.3",
1919
"@types/react": "^19.1.4",
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.17.1",
4+
"version": "8.17.2",
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.17.1",
3+
"version": "8.17.2",
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.17.1",
3+
"version": "8.17.2",
44
"packages": [
55
"packages/*",
66
"dev-packages/*",

packages/core/android/build.gradle

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ def isNewArchitectureEnabled() {
66
return project.hasProperty("newArchEnabled") && project.newArchEnabled == "true"
77
}
88

9+
// The ABIs the host app is building, from its `reactNativeArchitectures`
10+
// property (the same knob React Native, react-native-screens and reanimated
11+
// read). Falls back to all four when unset. We must honour this: when the app
12+
// builds a subset (e.g. `-PreactNativeArchitectures=arm64-v8a`), React Native
13+
// only provides its `reactnative` prefab for that subset, so building any other
14+
// ABI fails to resolve `TurboModulePerfLogger::enableLogging` at link time
15+
// (#6398). Hardcoding all four ABIs is what caused that failure.
16+
def reactNativeArchitectures() {
17+
def value = project.getProperties().get("reactNativeArchitectures")
18+
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
19+
}
20+
921
// `libsentry-tm-perf-logger.so` links against React Native's `reactnative`
1022
// prefab target. The merged `libreactnative.so` (exposed as the
1123
// `ReactAndroid::reactnative` prefab) only ships from RN 0.76 onward; on RN
@@ -135,7 +147,7 @@ android {
135147
versionCode 1
136148
versionName "1.0"
137149
ndk {
138-
abiFilters "x86", "armeabi-v7a", "x86_64", "arm64-v8a"
150+
abiFilters(*reactNativeArchitectures())
139151
}
140152
compileOptions {
141153
sourceCompatibility JavaVersion.VERSION_1_8

0 commit comments

Comments
 (0)