Skip to content

Symbol not found: (_JSGlobalContextSetInspectable)  #44077

@master96

Description

@master96

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 working

if (__builtin_available(macOS 13.3, iOS 16.4, tvOS 16.4, *)) {
   JSGlobalContextSetInspectable(ctx_, true);
 }

i get following error

dyld[1327]: Symbol not found: (_JSGlobalContextSetInspectable)
  Referenced from: '/private/var/containers/Bundle/Application/1867E253-BC84-4E34-BE05-EA20CAF16CD3/ProviderApp.app/ProviderApp'
  Expected in: '/System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore'
Message from debugger: killed

I got it working for now updating it to following bit in -> /node_modules/react-native/ReactCommon/jsc/JSCRuntime.cpp

  #if ( __OSX_AVAILABLE_STARTING(MAC_NA, IPHONE_16_4))
      JSGlobalContextSetInspectable(ctx_, true);
#endif

Steps to reproduce

  1. Change scheme to release in XCode
  2. Run it on iOS =< 15.8.2

React Native Version

0.72.12

Affected Platforms

Runtime - iOS

Output of npx react-native info

System:
  OS: macOS 14.2.1
  CPU: (12) arm64 Apple M2 Pro
  Memory: 186.39 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.18.2
    path: ~/.nvm/versions/node/v18.18.2/bin/node
  Yarn:
    version: 1.22.22
    path: ~/.nvm/versions/node/v18.18.2/bin/yarn
  npm:
    version: 10.2.2
    path: ~/.nvm/versions/node/v18.18.2/bin/npm
  Watchman:
    version: 2023.12.04.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2023.1 AI-231.9392.1.2311.11076708
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.72.12
    wanted: 0.72.12
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: false
  newArchEnabled: false

Stacktrace or Logs

dyld[1327]: Symbol not found: (_JSGlobalContextSetInspectable)
  Referenced from: '/private/var/containers/Bundle/Application/1867E253-BC84-4E34-BE05-EA20CAF16CD3/ProviderApp.app/ProviderApp'
  Expected in: '/System/Library/Frameworks/JavaScriptCore.framework/JavaScriptCore'
Message from debugger: killed

Reproducer

Screenshots and Videos

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions