Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode 16 causing JSCRuntime crash on initialising app #50395

Open
rodrigo-nexudus opened this issue Mar 31, 2025 · 8 comments
Open

Xcode 16 causing JSCRuntime crash on initialising app #50395

rodrigo-nexudus opened this issue Mar 31, 2025 · 8 comments
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available

Comments

@rodrigo-nexudus
Copy link

rodrigo-nexudus commented Mar 31, 2025

Description

I've run into this issue as part of updating my Xcode to version 16. App builds and runs fine on previous Xcode version, but after updating I'm getting the following JSCRuntime crash:

Image

There's not much more information on the error, it happens right after building once the packager finishes bundling. I'm using the old architecture. Here's the stack trace from Xcode:

Image

So far I've only tried running this on a few of the simulators on Xcode 16, no actual device as of yet, but regardless this does seem like a bug. If I can provide any more information please let me know, but as the error doesn't itself return much, I'm unsure as to what else I can provide.

Steps to reproduce

Run the RN app on a simulator using Xcode 16 on the old architecture

React Native Version

0.78.1 (also tried 0.76.6)

Affected Platforms

Runtime - iOS

Output of npx @react-native-community/cli info

System:
  OS: macOS 14.5
  CPU: (8) arm64 Apple M1
  Memory: 164.19 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 23.7.0
    path: /opt/homebrew/bin/node
  Yarn:
    version: 4.7.0
    path: /opt/homebrew/bin/yarn
  npm:
    version: 10.9.2
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2025.02.17.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.18034.62.2411.12169540
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.7
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.3
    wanted: ^15.0.1
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.78.1
    wanted: 0.78.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

Stacktrace or Logs

com.facebook.react.JavaScript (12): EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)

Reproducer

to follow

Screenshots and Videos

No response

@react-native-bot react-native-bot added Needs: Author Feedback Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available labels Mar 31, 2025
@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - 0.76.8. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@react-native-bot
Copy link
Collaborator

Warning

Missing reproducer: We could not detect a reproducible example in your issue report. Please provide either:

@react-native-bot
Copy link
Collaborator

Tip

Newer version available: You are on a supported minor version, but it looks like there's a newer patch available - undefined. Please upgrade to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.

@cipolleschi
Copy link
Contributor

@rodrigo-nexudus thanks for the issue, but I don't think that this is a problem of Xcode 16.

This looks like that the JS bundle is wrong or broken somehow. Are you sure there were no other changes other than Xcode 16?
Can you try spin up a new app using:

npx @react-native-community/cli init NewApp --version 0.78.1

and report back?
Another thing you can do is to try and reinstall cocoapods.

@rodrigo-nexudus
Copy link
Author

@cipolleschi thanks for the quick reply! No other changes were made, just installed Xcode 16. Xcode 15 was working without issue, I did the full update to 0.78.1 and had the app working fine on that version, then separately did the Xcode update and encountered this error. I will create a new repo as you suggested and see if I still run into the issue.

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Mar 31, 2025
@rodrigo-nexudus
Copy link
Author

rodrigo-nexudus commented Mar 31, 2025

@cipolleschi unfortunately on a new repo I'm running into the same issue other devs have reported, #50168, so I'm not able to see if the issue still manifests, as it happened after bundling.

Edit: I'll add the patch for the issue locally and see if I can continue the process.

@rodrigo-nexudus
Copy link
Author

@cipolleschi the new repo builds and bundles correctly after adding the patch for the separate issue, but the app in question still has the issue above, even with adding the same patch to that repo.

Any other ideas on what might cause this? I will be testing this tomorrow on an actual device, just to ensure that it is not simulator specific, but I'm not sure what else to look at here, considering the app works fine on Xcode 15.

@cipolleschi
Copy link
Contributor

it is more likely something related to the migration to 0.78.1, in my opinion.
I am using Xcode 16 for apps on 0.78.1 with no issues whatsoever...
New projects running properly means that there is something on the project that is not compatible with 0.78.1...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Attention Issues where the author has responded to feedback. Needs: Repro This issue could be improved with a clear list of steps to reproduce the issue. Newer Patch Available
Projects
None yet
Development

No branches or pull requests

3 participants