Skip to content

Commit 336d50f

Browse files
authored
Fix/crash app (#69)
* fix: bump version to 1.11.3 (build 72) for native rebuild Previous build 71 crashed on startup due to Hermes V1 bytecode mismatch (expo-updates ErrorRecovery.tryRelaunchFromCache → SIGABRT). Native rebuild required after removing useHermesV1/buildReactNativeFromSource. * fix: patch RCTTurboModule.mm for iOS 26 PAC crash (react-native#56265) Void method invocations in ObjCTurboModule accessed the Hermes JS runtime from the native dispatch queue thread. On iOS 26 physical devices with arm64e PAC enforcement this caused an immediate SIGABRT during startup (ErrorRecovery.tryRelaunchFromCache → crash). Applied upstream fix from facebook/react-native#56265 via patch-package: replace convertNSExceptionToJSError with @throw to re-throw natively. * fix: re-enable buildReactNativeFromSource for patch to compile Without buildReactNativeFromSource, EAS uses prebuilt RN frameworks and the RCTTurboModule.mm patch would be ignored. Re-enabled without useHermesV1 to use default Hermes V2 while compiling from patched source.
1 parent 8771d90 commit 336d50f

4 files changed

Lines changed: 205 additions & 7 deletions

File tree

app.base.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "De Woordenaar",
44
"slug": "dutch-learning-app",
55
"description": "AI-powered Dutch vocabulary learning app with spaced repetition system",
6-
"version": "1.11.2",
6+
"version": "1.11.3",
77
"orientation": "portrait",
88
"icon": "./src/assets/icons/ios-light.png",
99
"scheme": "dutchlearning",
@@ -21,7 +21,7 @@
2121
"usesAppleSignIn": true,
2222
"supportsTablet": true,
2323
"bundleIdentifier": "com.oldrefery.dutch-learning-app",
24-
"buildNumber": "71",
24+
"buildNumber": "72",
2525
"icon": "./src/assets/icons/ios-light.png",
2626
"infoPlist": {
2727
"UIBackgroundModes": ["audio"],
@@ -30,7 +30,7 @@
3030
"appleTeamId": "7FQ395U52U"
3131
},
3232
"android": {
33-
"versionCode": 71,
33+
"versionCode": 72,
3434
"adaptiveIcon": {
3535
"foregroundImage": "./src/assets/icons/adaptive-icon.png",
3636
"backgroundColor": "#ffffff"
@@ -80,7 +80,17 @@
8080
}
8181
}
8282
],
83-
"expo-build-properties"
83+
[
84+
"expo-build-properties",
85+
{
86+
"ios": {
87+
"buildReactNativeFromSource": true
88+
},
89+
"android": {
90+
"buildReactNativeFromSource": true
91+
}
92+
}
93+
]
8494
],
8595
"updates": {
8696
"url": "https://u.expo.dev/d968536e-1e9b-4224-9ed7-a1e9c6d821c8",

package-lock.json

Lines changed: 171 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "dutch-learning-app",
33
"main": "expo-router/entry",
4-
"version": "1.11.2",
4+
"version": "1.11.3",
55
"scripts": {
66
"start": "expo start",
77
"android": "expo run:android",
@@ -17,6 +17,7 @@
1717
"lint:fix": "eslint . --ext .ts,.tsx,.js,.jsx --fix",
1818
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
1919
"format:check": "prettier --check \"**/*.{ts,tsx,js,jsx,json,md}\"",
20+
"postinstall": "patch-package",
2021
"prepare": "husky",
2122
"deploy:edge-functions": "npx supabase functions deploy gemini-handler && npx supabase functions deploy get-multiple-images",
2223
"deploy:constants": "echo '🚀 Deploying Edge Functions due to constants change...' && npm run deploy:edge-functions && echo '✅ Edge Functions updated with new constants!'",
@@ -108,6 +109,7 @@
108109
"jest": "^29.2.1",
109110
"jest-expo": "~55.0.13",
110111
"lint-staged": "^15.5.2",
112+
"patch-package": "^8.0.1",
111113
"prettier": "^3.6.2",
112114
"react-test-renderer": "19.2.0",
113115
"typescript": "~5.9.2"

patches/react-native+0.83.4.patch

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm b/node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm
2+
index 6646570..4217c7a 100644
3+
--- a/node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm
4+
+++ b/node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm
5+
@@ -470,7 +470,11 @@ void ObjCTurboModule::performVoidMethodInvocation(
6+
@try {
7+
[inv invokeWithTarget:strongModule];
8+
} @catch (NSException *exception) {
9+
- throw convertNSExceptionToJSError(runtime, exception, std::string{moduleName}, methodNameStr);
10+
+ // Void methods are always async — re-throw natively instead of
11+
+ // converting to JSError (which would access the JS runtime from
12+
+ // the wrong thread, causing PAC crashes on iOS 26+).
13+
+ // See https://github.com/facebook/react-native/pull/56265
14+
+ @throw exception;
15+
} @finally {
16+
[retainedObjectsForInvocation removeAllObjects];
17+
}

0 commit comments

Comments
 (0)