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

Cannot build for iOS 17.4 with JSC - Expo 51 Beta #28487

Closed
nathansbird opened this issue Apr 26, 2024 · 4 comments · Fixed by #28492
Closed

Cannot build for iOS 17.4 with JSC - Expo 51 Beta #28487

nathansbird opened this issue Apr 26, 2024 · 4 comments · Fixed by #28492

Comments

@nathansbird
Copy link

nathansbird commented Apr 26, 2024

Minimal reproducible example

https://github.com/nathansbird/expo-dev-menu-jsc-demo

What platform(s) does this occur on?

iOS

Did you reproduce this issue in a development build?

Yes

Summary

Expo app cannot compile for iPhone Simulator 17.4 with Expo 51 beta, latest expo-dev-client, and JSC. Have not tested using a device SDK instead of the Simulator SDK.

Steps to reproduce:

  1. Initialize a new project with SDK 51 beta: npx create-expo-app@latest --template default@beta
  2. Specify jsc as the iOS or project jsEngine
  3. Install latest expo-dev-client: npx expo install expo-dev-client
  4. Attempt to run the app npx expo run:ios --device
› Compiling expo-dev-menu Pods/expo-dev-menu » DevClientRootViewFactory.mm

❌  (/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator17.4.sdk/usr/include/c++/v1/__memory/unique_ptr.h:66:19)

  64 | 
  65 |   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 void operator()(_Tp* __ptr) const _NOEXCEPT {
> 66 |     static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
     |                   ^ invalid application of 'sizeof' to an incomplete type 'facebook::react::JSExecutorFactory'
  67 |     static_assert(!is_void<_Tp>::value, "cannot delete an incomplete type");
  68 |     delete __ptr;
  69 |   }

› Compiling expo-dev-menu Pods/expo-dev-menu » DevClientAppDelegate.mm
› Compiling expo-dev-menu Pods/expo-dev-menu » DevMenuRCTBridge.mm
› Compiling expo-dev-menu Pods/expo-dev-menu » DevMenuRootView.m

I don't speak fluent C++ but it seems the problem lies with DevClientRootViewFactory.mm not seeing the facebook::react::JSExecutorFactory type if you're not using hermes. 🤷🏼‍♂️

Note: tying down the expo-dev-menu version to 5.0.3 via resolutions in package.json clears the issue. I think it is reasonable to assume this commit is the problematic one: 616efad

Environment

expo-env-info 1.2.0 environment info:
    System:
      OS: macOS 14.4
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 22.0.0 - /usr/local/bin/node
      Yarn: 1.22.22 - /usr/local/bin/yarn
      npm: 10.5.1 - /usr/local/bin/npm
    Managers:
      CocoaPods: 1.15.2 - /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
    IDEs:
      Android Studio: 2023.2 AI-232.10300.40.2321.11668458
      Xcode: 15.3/15E204a - /usr/bin/xcodebuild
    npmPackages:
      expo: ~51.0.0-preview.6 => 51.0.0-preview.6 
      expo-router: ~3.5.3 => 3.5.3 
      react: 18.2.0 => 18.2.0 
      react-dom: 18.2.0 => 18.2.0 
      react-native: 0.74.0 => 0.74.0 
      react-native-web: ~0.19.10 => 0.19.11 
    Expo Workflow: managed

Expo Doctor Diagnostics

npx expo-doctor@latest
(node:62228) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check native tooling versions
✔ Check dependencies for packages that should not be installed directly
✔ Check for common project setup issues
✔ Check for issues with metro config
✔ Check npm/ yarn versions
✔ Check Expo config (app.json/ app.config.js) schema
✔ Check that packages match versions required by installed Expo SDK
✔ Check for legacy global CLI installed locally
✔ Check that native modules do not use incompatible support packages
✔ Check that native modules use compatible support package versions for installed Expo SDK

Didn't find any issues with the project!
@nathansbird nathansbird added the needs validation Issue needs to be validated label Apr 26, 2024
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels Apr 26, 2024
@expo-bot
Copy link
Collaborator

Thank you for filing this issue!
This comment acknowledges we believe this may be a bug and there’s enough information to investigate it.
However, we can’t promise any sort of timeline for resolution. We prioritize issues based on severity, breadth of impact, and alignment with our roadmap. If you’d like to help move it more quickly, you can continue to investigate it more deeply and/or you can open a pull request that fixes the cause.

@github-actions github-actions bot removed the needs review Issue is ready to be reviewed by a maintainer label Apr 26, 2024
@brentvatne
Copy link
Member

@nathansbird - thanks for the report! out of curiosity, what is your use case for using JSC instead of Hermes?

@nathansbird
Copy link
Author

Appreciate the quick fix!!

@brentvatne Was having some peculiar issues with hermes on iOS but needed to make a quick VisionOS demo on v51. Noticed this issue and thought it was worth reporting to better support JSC use cases 🤷🏼‍♂️

@nathansbird
Copy link
Author

Hermes is the ideal option ofc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants