Open master96 opened 3 months ago
:warning: | Missing Reproducible Example |
---|---|
:information_source: | We could not detect a reproducible example in your issue report. Please provide either:
|
@master96 thanks for reporting. The crash will be fixed with the PR #44185
Added cherry pick requests:
The fix with the next release of each RN patch version
I've tryed the fix for 0.72.10 -> when I build with XCode 15.3 (15E204a), same than @master96 , I have the following error :
/..../node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp:406:7 Use of undeclared identifier '__AVAILABILITY_INTERNALIPHONE_16_4'
Here is the patch that worked for me :
diff --git a/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp b/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
index 523b1be..c667741 100644
--- a/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
+++ b/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
@@ -403,11 +403,13 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx)
{
#ifndef NDEBUG
#ifdef _JSC_HAS_INSPECTABLE
- if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
+#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 16400
+ if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *))
JSGlobalContextSetInspectable(ctx_, true);
}
#endif
#endif
+#endif
}
JSCRuntime::~JSCRuntime() {
FYI according to apple support, heree is the documentation for running code on a specific platform or OS version :
https://developer.apple.com/documentation/xcode/running-code-on-a-specific-version/
cc. @Saadnajmi
Here is the patch that worked for me :
diff --git a/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp b/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp index 523b1be..c667741 100644 --- a/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp +++ b/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp @@ -403,11 +403,13 @@ JSCRuntime::JSCRuntime(JSGlobalContextRef ctx) { #ifndef NDEBUG #ifdef _JSC_HAS_INSPECTABLE - if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) { +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 16400 + if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) JSGlobalContextSetInspectable(ctx_, true); } #endif #endif +#endif } JSCRuntime::~JSCRuntime() {
__MAC_OS_X_VERSION_MAX_ALLOWED >= 16400
means you're checking that you're compiling for an Xcode version that supports macOS 16.4+.. which doesn't exist (the latest is macOS 14). So it just ifdefs the code out, which means that direct debugging with JavascriptCore is broken for iOS 16.4+. This is currently the case with the latest fixes to React Native. The "proper" fix AFAIK is to weak link JacascriptCore. I have a fix for cocoapods out (https://github.com/facebook/react-native/pull/39549) but I'm not sure it will get merged due to other issues. If you aren't using JSC and are using Hermes, then I suppose it doesn't matter if you keep the ifdef in.
The fix for this was patched to all version of RN >= 0.72: https://github.com/facebook/react-native/commit/ae4c62a933f7ffcfe4be8a3499fb6e1cbe7f1c43
Description
When trying to run release built on iOS 15.8.2. App crashes as soon as it starts.
I was able to find issue in https://forums.developer.apple.com/forums/thread/749534
Note - We have react-native-firebase integration which requires to use static framework bundling.
I am assuming following check in
/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
isnt workingi get following error
I got it working for now updating it to following bit in ->
/node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp
Steps to reproduce
React Native Version
0.72.12
Affected Platforms
Runtime - iOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
-
Screenshots and Videos
No response