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

react/debug/flags.h' file not found (ios build error) #2580

Closed
uloco opened this issue Sep 1, 2023 · 4 comments
Closed

react/debug/flags.h' file not found (ios build error) #2580

uloco opened this issue Sep 1, 2023 · 4 comments
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided

Comments

@uloco
Copy link

uloco commented Sep 1, 2023

Description

My project is setup with the new arch, without flipper and with use_frameworks: static.
I already reinstalled all dependencies, cleared caches multiple times etc.
This error started happening after switching to the new architecture.
All my project dependencies are on the latest version.
I'm on latest react-native 0.72.4

I'm getting the following error when trying to build iOS (with rosetta enabled):

In file included from /Users/uloco/Source/smokeless/smokeless-react-native/node_modules/react-native-gesture-handler/ios/Handlers/RNNativeViewHandler.mm:17:
In file included from /Users/uloco/Library/Developer/Xcode/DerivedData/Smokeless-hessnrvxehuzzzbbcepctyxqzaau/Build/Products/Debug-iphonesimulator/React-RCTFabric/RCTFabric.framework/Headers/React/RCTScrollViewComponentView.h:12:
In file included from /Users/uloco/Library/Developer/Xcode/DerivedData/Smokeless-hessnrvxehuzzzbbcepctyxqzaau/Build/Products/Debug-iphonesimulator/React-RCTFabric/RCTFabric.framework/Headers/React/RCTMountingTransactionObserving.h:10:
In file included from /Users/uloco/Library/Developer/Xcode/DerivedData/Smokeless-hessnrvxehuzzzbbcepctyxqzaau/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/react/renderer/mounting/MountingTransaction.h:10:
In file included from /Users/uloco/Library/Developer/Xcode/DerivedData/Smokeless-hessnrvxehuzzzbbcepctyxqzaau/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/react/renderer/mounting/ShadowViewMutation.h:12:
In file included from /Users/uloco/Library/Developer/Xcode/DerivedData/Smokeless-hessnrvxehuzzzbbcepctyxqzaau/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/react/renderer/mounting/ShadowView.h:13:
In file included from /Users/uloco/Library/Developer/Xcode/DerivedData/Smokeless-hessnrvxehuzzzbbcepctyxqzaau/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/react/renderer/core/LayoutMetrics.h:12:
In file included from /Users/uloco/Library/Developer/Xcode/DerivedData/Smokeless-hessnrvxehuzzzbbcepctyxqzaau/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/react/renderer/debug/DebugStringConvertible.h:17:
/Users/uloco/Library/Developer/Xcode/DerivedData/Smokeless-hessnrvxehuzzzbbcepctyxqzaau/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/react/renderer/debug/flags.h:10:10: fatal error: 'react/debug/flags.h' file not found
#include <react/debug/flags.h>
         ^~~~~~~~~~~~~~~~~~~~~
/Users/uloco/Library/Developer/Xcode/DerivedData/Smokeless-hessnrvxehuzzzbbcepctyxqzaau/Build/Products/Debug-iphonesimulator/React-Fabric/React_Fabric.framework/Headers/react/renderer/debug/flags.h:10:10: note: did not find header 'debug/flags.h' in framework 'react' (loaded from '/Users/uloco/Library/Developer/Xcode/DerivedData/Smokeless-hessnrvxehuzzzbbcepctyxqzaau/Build/Products/Debug-iphonesimulator/React-Core')
1 error generated.

I created a repro project here and can reproduce the same error with a fresh react native project and just react-native-gesture-handler installed additionally.

Steps to reproduce

  1. Open the repro project at https://github.com/uloco/repro-react-native-gesture-handler
  2. (optionally remove caches etc to make a clean depencency install with npm run clean-deps)
  3. npm install
  4. npm run ios
  5. See error

Probably important: I am running on Apple Silicon

Snack or a link to a repository

https://github.com/uloco/repro-react-native-gesture-handler

Gesture Handler version

2.12.1

React Native version

0.72.4

Platforms

iOS

JavaScript runtime

Hermes

Workflow

React Native (without Expo)

Architecture

Fabric (New Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Repro provided A reproduction with a snack or repo is provided Platform: iOS This issue is specific to iOS labels Sep 1, 2023
@adolfogc
Copy link

adolfogc commented Oct 9, 2023

Hi, I'm observing the same issue.

@m-bert
Copy link
Contributor

m-bert commented Oct 30, 2023

Hi @uloco, @adolfogc! Have you tested that on 2.13.4? We've added some changes to podspec and it is possible that these changes will help.

@uloco
Copy link
Author

uloco commented Oct 30, 2023

@m-bert I tried this and it seems to work. thank you!

@m-bert m-bert closed this as completed Oct 30, 2023
@adolfogc
Copy link

Hi, thank you, yes using 2.13.4 helped!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform: iOS This issue is specific to iOS Repro provided A reproduction with a snack or repo is provided
Projects
None yet
Development

No branches or pull requests

3 participants