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
[expo-modules][expo-dev-client][SDK51] build error with useFrameworks: 'static'
#28209
Comments
useFrameworks
and new architecture enabled
Also a somewhat related issue #27414 in a different expo package. Both work fine with the old architecture. |
Thank you for filing this issue! |
having the same issue on Podfile:
|
Same issue on "expo": "~50.0.17", |
Same issue with "expo": "^50.0.15" and RN 0.74 after updating RN from "react-native": "^0.73.4" to 0.74.0. Downgrading solved the issue by removing these dependencies that were installed with RN 0.74: RCTDeprecation |
In what way did you remove those dependencies @MartinGambit |
@DarrKing Simply by downgrading react-native 0.74.0 back to 0.73.4 and then running pod install which should remove them. |
Cool thanks @MartinGambit. Tried this already, didn't work for myself unfortunately. |
Well maybe there is a mismatch with your expo version. i am currently using "expo": "^50.0.15". |
Same issue with RN |
Unfortunately seeing this issue also after upgrading to react-native 0.74. In my case static frameworks is requirement for firebase. |
facebook/react-native#42747 seems to be the cause.
The"React-jsinspector" pod will only be included if the framework_name is 'jsinspector_modern' ? |
And looks like it is being attended to on #27976 |
Yea same here |
Please be aware that expo does not officially support react-native 0.74 yet. Support for 0.74 will most certainly only come out for SDK 51 and not for SDK 50. |
@leonhh is there a place to see ETA for the next SDK version? (especially that v51?) |
Summary: Defines module for `React-jsinspector` that for swift modules to integrate with. to fix expo/expo#28209, any podspec depends on HermesExecutorFactory should use ` add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')` to add dependency. otherwise it will encounter the header not found issue because use_frameworks will change "jsinspector-modern" to "jsinspector_modern". to depend on React-jsinspector from expo-modules-core, we need it to define as a module. otherwise, it will have the error ``` The Swift pod `ExpoModulesCore` depends upon `React-jsinspector`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies. ``` ## Changelog: [IOS] [CHANGED] - Add `DEFINES_MODULE` for React-jsinspector.podspec Pull Request resolved: #44252 Test Plan: ci passed Reviewed By: cortinico Differential Revision: D56575102 Pulled By: cipolleschi fbshipit-source-id: 9b7b4568a3e499f0a741a79a846263118ff2d112
Summary: Defines module for `React-jsinspector` that for swift modules to integrate with. to fix expo/expo#28209, any podspec depends on HermesExecutorFactory should use ` add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')` to add dependency. otherwise it will encounter the header not found issue because use_frameworks will change "jsinspector-modern" to "jsinspector_modern". to depend on React-jsinspector from expo-modules-core, we need it to define as a module. otherwise, it will have the error ``` The Swift pod `ExpoModulesCore` depends upon `React-jsinspector`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies. ``` ## Changelog: [IOS] [CHANGED] - Add `DEFINES_MODULE` for React-jsinspector.podspec Pull Request resolved: #44252 Test Plan: ci passed Reviewed By: cortinico Differential Revision: D56575102 Pulled By: cipolleschi fbshipit-source-id: 9b7b4568a3e499f0a741a79a846263118ff2d112
# Why fix header not found issue when using frameworks on new architecture fixes #28209 # How the header search path is from `EXJavaScriptRuntime.mm -> HermesExecutorFactory.h -> <jsinspector-modern/InspectorInterfaces.h>`. the correct import should be underlined "jsinspector_modern" in the import. the code is inside react-native core that we cannot touch. this pr tries to use the `add_dependency()` from react-native core that we specify extra ":framework_name". also cleanup some unused search paths that are added through `install_modules_dependencies()`. we also have to wait 0.74.1 for facebook/react-native#44252
Summary: Defines module for `React-jsinspector` that for swift modules to integrate with. to fix expo/expo#28209, any podspec depends on HermesExecutorFactory should use ` add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern')` to add dependency. otherwise it will encounter the header not found issue because use_frameworks will change "jsinspector-modern" to "jsinspector_modern". to depend on React-jsinspector from expo-modules-core, we need it to define as a module. otherwise, it will have the error ``` The Swift pod `ExpoModulesCore` depends upon `React-jsinspector`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies. ``` ## Changelog: [IOS] [CHANGED] - Add `DEFINES_MODULE` for React-jsinspector.podspec Pull Request resolved: facebook#44252 Test Plan: ci passed Reviewed By: cortinico Differential Revision: D56575102 Pulled By: cipolleschi fbshipit-source-id: 9b7b4568a3e499f0a741a79a846263118ff2d112
I still get the same error with Expo 51.0.0 Reprodavidjbng/expo-use-frameworks-static Environment
|
Expo 51 react native 0.74.1 Still same issue |
Same here, can we reopen this issue? |
This solution not working for me. |
Expo 51 react native 0.74.1 ❌ (node_modules/react-native/ReactCommon/cxxreact/JSExecutor.h:15:10) 13 | #include <cxxreact/NativeModule.h>
› Compiling expo-dev-menu Pods/expo-dev-menu » DevClientAppDelegate.mm Still same issue |
I just realised that my issue is from |
Also facing this issue in SDK 51 |
Yes, this is an issue with expo-dev-client and is not related to expo-modules. Removing expo-dev-client fixes the issue. See #27414 for this issue |
Same problem here, after upgrading expo@50 to expo@51 and recreated the ios folder. 13 | #include <cxxreact/NativeModule.h>
|
we're facing the same issue after upgrading from sdk 50, with or without |
I'm having the same issue while trying to upgrade from SDK 50 to 51 |
I'll add my +1 too - indeed breaking, also without newArch enabled |
useFrameworks
and new architecture enabled useFrameworks
facebook/react-native#44252 was merged into 0.74.1 which was meant to fix this but I'm able to reproduce this on SDK 51 on projects with static frameworks, we'll investigate. you can work around this by removing expo-dev-client from your dependencies for now, or disabling static frameworks (if possible for your app). |
useFrameworks
useFrameworks: 'static'
+1 a bit different ❌ error: SHA-1 for file /var/folders/dy/lzfv254j3x3xxxwykt7v63d80000gn/T/eas-build-local-nodejs/205af4f1-34af-4030-bd12-xxxxxx/build/node_modules/expo/AppEntry.js (/var/folders/dy/lzfv254j3x33cmwykt7v63d80000gn/T/eas-build-local-nodejs/205af4f1-34af-4030-bd12-xxxxxx/build/node_modules/expo/AppEntry.js) is not computed. exit 65 running prod fails., going back to 50.0.17 this issue goes away. |
i had smiler issue yesterday, #28676, and what i did is i installed fresh expo app, and i looked at the package.json file and i had to remove some of i think it is not unnecessary, that i do not really know what they are.
the above code is from my old package.json so i removed them, and rebuild the app
and the build went smoothly. so this is my old package.json,
the new package.json
also i changed the eas.json file
to use the version of eas cli to 9.0.0 it was something like 7.0. |
Made it work with these patches based on this PR: #28702 |
Minimal reproducible example
https://github.com/leonhh/expo-reproducer/tree/4120ccfc4de5b1df55e284f76b4fc289339bf9a0
What platform(s) does this occur on?
iOS
Did you reproduce this issue in a development build?
Yes
Summary
Setting
useFrameworks
to true in combination with the new architecture will cause build errors on iOS:app.json:
The following error:
Environment
expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.2.1
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.11.0 - ~/.nvm/versions/node/v20.11.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v20.11.0/bin/yarn
npm: 10.2.4 - ~/.nvm/versions/node/v20.11.0/bin/npm
Watchman: 2024.04.08.00 - /opt/homebrew/bin/watchman
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.1 AI-231.9392.1.2311.11330709
Xcode: 15.3/15E204a - /usr/bin/xcodebuild
npmPackages:
expo: ^51.0.0-canary-20240411-55a0085 => 51.0.0-canary-20240411-55a0085
react: 18.2.0 => 18.2.0
react-native: 0.74.0-rc.8 => 0.74.0-rc.8
npmGlobalPackages:
eas-cli: 7.3.0
Expo Workflow: bare
Expo Doctor Diagnostics
✔ Check Expo config for common issues
✔ Check package.json for common issues
✔ Check dependencies for packages that should not be installed directly
✔ Check for issues with metro config
✔ Check for common project setup issues
✔ Check npm/ yarn versions
✖ Check Expo config (app.json/ app.config.js) schema
Unexpected error while running 'Check Expo config (app.json/ app.config.js) schema' check:
TypeError: Cannot read properties of undefined (reading 'schema')
✔ Check that native modules use compatible support package versions for installed Expo SDK
✔ Check that native modules do not use incompatible support packages
✔ Check for legacy global CLI installed locally
✔ Check that packages match versions required by installed Expo SDK
✔ Check native tooling versions
One or more checks failed, indicating possible issues with the project.
The text was updated successfully, but these errors were encountered: