-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
'react/bridging/LongLivedObject.h' file not found And Could not build module 'ReactCommon' #35664
Comments
We're seeing this on 0.68.2 |
Happens to me with new architecture on 0.70.6 |
Happens to me on 0.69.7, not opted in to new architecture nor Hermes |
Happens to me with new architecture on 0.71.1 |
Also seeing it.
edit: FWIW, I'm just going through the Turbo Modules C++ docs/tutorial; everything worked before going through the App TurboModuleProvider stuff; once I added that, I started getting build failures. |
@cortinico I'm pretty sure the nature of this issue is the same as what this PR fixes. It sounds like the same error, just for a different header file. I tried naively adding the EDIT: I should note that I get this error if I pass in the EDIT2: When I try building the app by adding the #ifdef __cplusplus, I'm getting a bunch of "Redefinition" errors. |
Hi there, I'm sorry for this problem. Can anyone provide a repro I can try on my own? It's not the first time we see such issues. Our CI has tests for both the Old and the New Architecture, to make sure that it builds, so it should be some edge case that we are not handling properly. For context:
Now, my gut feeling is that there is something in your configuration that changes the HEADER_SEARCH_PATH of React Native and makes it lose the reference to the But to verify this, I'll need to reproduce it on a small sample. |
Hey @cipolleschi I am also facing this issue after following the guide to create a turbo module. Here is a reproducer: https://github.com/carlosalmonte04/CxxTurboModulesGuide. It built successfully after commenting out the code you pointed to. |
Hello @cipolleschi , is this issues has been fixed, we are facing the same issue. ? |
Hi @kaushal9808, unfortunately I didn't have much time to go deeper in the repro. :( Thank you all for your patience! 🙇 |
Facing the same issue, using img.ly's PE.SDK with localization : https://img.ly/docs/pesdk/react-native/guides/user-interface/localization/ including #import <RNPhotoEditorSDK/RNPhotoEditorSDK.h> in AppDelegate.mm adding CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES option and select Yes. Then, search for c++ flags and add -fcxx-modules to both Debug and Release. without localization and these additions, it build well. |
@lc3t35 can you share your // in the Podfile
use_react_native!(
// ...
)
+ pod 'RNPhotoEditorSDK', [any specific config you need], :modular_headers => true The |
Thank you @cipolleschi , I have now this error :
this error was fixed by using :
but it still doesn't build :
|
Are you using Expo? Or just some libraries from Expo but the main flow is handled by the RN CLI? |
Yes expo in bare mode, so RN mode. |
@lc3t35 Ok, so, would you mind open an issue on their repo? Expo does some other things on top of the vanilla RN setup, so it could be that they are applying some changes to the Cocoapods setup that I would not be able to repro. |
As mentioned by @cipolleschi, let's move this issue over to expo: https://github.com/expo/expo/issues I'll be closing this but feel free to reopen if the other repo points back to us as a issue in the core of React Native. |
I believe the problem is that the header moved. There's a proxy header created here, but it has been excluded from the podspec on purpose. Here's how it looks in v0.71.10: react-native/ReactCommon/ReactCommon.podspec Lines 70 to 72 in 4e92d67
If I manually touch up the files that contain the import For v0.72.0-rc6 the file is moved into it's new package here, but the podspec does not have the exclude anymore. Some context on why |
Here is the patch-package for react-native 0.71.3 : create patches/react-native+0.71.3.patch and add
|
@cortinico as you can see all modules are react-native 0.71.3 related not expo (version 48.0.19 I currently use) seems to be even removed in 0.72.x : 419025d |
Can you please create a repro on 0.71 or 0.72 which doesn't use Expo and reproduces this issue? Once you have it please open a new issue and link this one, and we can look into it |
@lc3t35 Thanks for the comment, but it doesn't matter whether the modules are react-native 0.71.3: we do some changes on the project settings when Cocoapods run to make sure that the required headers are accessible. Expo could bypass or modify those changes in a way that could potentially hide the header. As @cortinico was suggesting, if you manage to have a reproducer without Expo, we may be able to investigate the issue. Otherwise, we are a bit blind: we have several jobs in CI which build iOS apps in various configurations and all of them can find the header and they build correctly, so we have no evidences of this problem. |
Summary: Similarly to #36391 , we found that this import was periodically causing issues for our builds. We applied this patch and found that it is solving the issue, thus raising the PR here. It may potentially be related to #35664 and #41281 ## Changelog: [IOS] [FIXED] - Unbreak Cocoapods build Pull Request resolved: #41368 Test Plan: Automated test builds should be able to spot out potential issues. Reviewed By: javache Differential Revision: D51117316 Pulled By: cipolleschi fbshipit-source-id: 5c8ee35ab38539ae1f5556202bb274566adf09b3
…k#41368) Summary: Similarly to facebook#36391 , we found that this import was periodically causing issues for our builds. We applied this patch and found that it is solving the issue, thus raising the PR here. It may potentially be related to facebook#35664 and facebook#41281 ## Changelog: [IOS] [FIXED] - Unbreak Cocoapods build Pull Request resolved: facebook#41368 Test Plan: Automated test builds should be able to spot out potential issues. Reviewed By: javache Differential Revision: D51117316 Pulled By: cipolleschi fbshipit-source-id: 5c8ee35ab38539ae1f5556202bb274566adf09b3
Description
/Pods/Headers/Public/ReactCommon/ReactCommon/LongLivedObject.h:11:10 'react/bridging/LongLivedObject.h' file not found
/Pods/Headers/Public/React-Core/React/RCTAppSetupUtils.h:30:9 Could not build module 'ReactCommon'
Version
0.70.6
Output of
npx react-native info
System:
OS: macOS 13.0.1
CPU: (8) x64 Apple M1 Pro
Memory: 11.91 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.2.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.19.3 - /usr/local/bin/npm
Watchman: 2022.11.28.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 14.1/14B47b - /usr/bin/xcodebuild
Languages:
Java: Not Found
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: ^0.70.6 => 0.70.6
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Integrated RN version 0.70.6 to existing ios apps
Installed pod vial this command RCT_NEW_ARCH_ENABLED=1 fabric_enabled=1 arch -x86_64 pod install
Snack, code example, screenshot, or link to a repository
The text was updated successfully, but these errors were encountered: