react-native-svg
react-native-svg copied to clipboard
PropsParserContext 'react/utils/ContextContainer.h' file not found
Bug
I've enabled Fabric in my latest RN project, so when I build it got this error 'react/utils/ContextContainer.h' file not found
in PropsParserContext.h
file.
Environment info
Run react-native info
in your terminal and copy the results here. Also, include the precise version number of this library that you are using in the project
React native info output:
System:
OS: macOS 14.0
CPU: (8) arm64 Apple M1
Memory: 192.75 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.15.0
path: /usr/local/bin/node
Yarn:
version: 3.6.0
path: /usr/local/bin/yarn
npm:
version: 9.5.0
path: /usr/local/bin/npm
Watchman:
version: 2022.05.30.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.12.1
path: /opt/homebrew/lib/ruby/gems/3.0.0/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.0
- iOS 17.0
- macOS 14.0
- tvOS 17.0
- visionOS 1.0
- Xcode 15.0
- watchOS 10.0
Android SDK:
API Levels:
- "23"
- "27"
- "28"
- "29"
- "30"
- "31"
- "32"
- "33"
Build Tools:
- 28.0.3
- 29.0.2
- 29.0.3
- 30.0.1
- 30.0.2
- 30.0.3
- 31.0.0
- 33.0.0
System Images:
- android-33 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2022.2 AI-222.4459.24.2221.10121639
Xcode:
version: 15.0/15A5161b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 11.0.15
path: /usr/bin/javac
Ruby:
version: 3.1.2
path: /opt/homebrew/opt/ruby/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.1
wanted: 0.72.1
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true
Library version: 13.9.0
Steps To Reproduce
Issues without reproduction steps or code are likely to stall.
-
git clone https://github.com/jason-digiex/rnsvg-bug-repro
-
cd rnsvg-bug-repro
-
npm install
-
RCT_NEW_ARCH_ENABLED=1 npx pod-install ios
-
npm start
- Open
ios/reprosvg.xcworkspace
with Xcode - Build app to for any iOS Simulartor (
iPhone 14 Pro (Reosetta)
for my case)
Describe what you expected to happen:
- The app should build successfully.
Help me pleaseI am french, i’mI am french and I have difficulty understanding the "script" then in English even more .. My goal is in the medical to get data that can save me I hope so because in addition to an orphan disease (EDS) I have an extremely rare blood "bombai" which find information is very difficult. Giving more than the hospital and other proffesionnelle in my city do everything so that I have access to nothing because everything is because of them Giving more than the hospital and other proffesionnelle in my city do everything so that I have access to nothing because everything is because of themEven no one first my mom, me, my little sister two sisters. My first son who goes on 3 years in August is little be in danger (heriditary) and especially I lost my second to 8 months and a half of pregnancy in October while they had the information a month before and would have more unhooked me. Now I have a delayed hemolysis Even no one first my mom, me, my little sister two sisters. My first son who goes on 3 years in August is little be in danger (heriditary) and especially I lost my second to 8 months and a half of pregnancy in October while they had the information a month before and would have more unhooked me. Now I have a delayed hemolysisdelay, it's been 8 months including 4 and a half that I have run (the RAI) and since my state this degrades very very quickly (by analysis: I know that my blood coagulates) so I am really in a hurry... delay, it's been 8 months including 4 and a half that I have run (the RAI) and since my state this degrades very very quickly (by analysis: I know that my blood coagulates) so I am really in a hurry...I finally start to find help internationally but I am blocked by the •settings* Apple IOS 17 which cuts me my cellular network (I do not have wifi). and my device in IOS 15.3 can you please help me Voici ce ça me dit Bug version IOS: 15.3 Version : 8.1.60 iOS: 17.0 Appareil: iPhone 14 Pro Max Nom : iPhone Token : e4b92a51c546ea0b88c0bd176a5b15dfb72f9b93 eb852c8ad75c5cd85f647ef1 Idfa : 00000000-0000-0000-0000-000000000000 Udid : 4CB0E32C-6CBF-43C9-AA98-2D1516033FBEThanks very much {https://github.com/YouuuMeee) Le 4 juil. 2023 à 11:09, Jason | Mobile Developer @.> a écrit : Bug I've enabled Fabric in my latest RN project, so when I build it got this error 'react/utils/ContextContainer.h' file not found in PropsParserContext.h file. Environment info Run react-native info in your terminal and copy the results here. Also, include the precise version number of this library that you are using in the project React native info output: System: OS: macOS 14.0 CPU: (8) arm64 Apple M1 Memory: 192.75 MB / 16.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 18.15.0 path: /usr/local/bin/node Yarn: version: 3.6.0 path: /usr/local/bin/yarn npm: version: 9.5.0 path: /usr/local/bin/npm Watchman: version: 2022.05.30.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.12.1 path: /opt/homebrew/lib/ruby/gems/3.0.0/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 23.0 - iOS 17.0 - macOS 14.0 - tvOS 17.0 - visionOS 1.0 - Xcode 15.0 - watchOS 10.0 Android SDK: API Levels: - "23" - "27" - "28" - "29" - "30" - "31" - "32" - "33" Build Tools: - 28.0.3 - 29.0.2 - 29.0.3 - 30.0.1 - 30.0.2 - 30.0.3 - 31.0.0 - 33.0.0 System Images: - android-33 | Google APIs ARM 64 v8a Android NDK: Not Found IDEs: Android Studio: 2022.2 AI-222.4459.24.2221.10121639 Xcode: version: 15.0/15A5161b path: /usr/bin/xcodebuild Languages: Java: version: 11.0.15 path: /usr/bin/javac Ruby: version: 3.1.2 path: /opt/homebrew/opt/ruby/bin/ruby npmPackages: @./cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.72.1 wanted: 0.72.1 react-native-macos: Not Found npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: true iOS: hermesEnabled: true newArchEnabled: true Library version: 13.9.0 Steps To Reproduce Issues without reproduction steps or code are likely to stall.
git clone https://github.com/jason-digiex/rnsvg-bug-repro cd rnsvg-bug-repro npm install RCT_NEW_ARCH_ENABLED=1 npx pod-install ios npm start Open ios/reprosvg.xcworkspace with Xcode Build app to for any iOS Simulartor (iPhone 14 Pro (Reosetta) for my case)
Describe what you expected to happen:
The app should build successfully.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
I have same problem
+1
Workaround until resolved by react native:
Add 'react-native/ReactCommon' to the header search path in your Podfile (in my case, the "RNScreens" pod was giving the problem):
installer.pods_project.targets.each do |target|
if target.name == "RNScreens"
append_header_search_path(target, "${PODS_ROOT}/../../node_modules/react-native/ReactCommon")
end
end
Also define the append_header_search_path in your Podfile:
def append_header_search_path(target, path)
target.build_configurations.each do |config|
# Note that there's a space character after `$(inherited)`.
config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) "
config.build_settings["HEADER_SEARCH_PATHS"] << path
end
end
Workaround until resolved by react native:
Add 'react-native/ReactCommon' to the header search path in your Podfile (in my case, the "RNScreens" pod was giving the problem):
installer.pods_project.targets.each do |target| if target.name == "RNScreens" append_header_search_path(target, "${PODS_ROOT}/../../node_modules/react-native/ReactCommon") end end
Also define the append_header_search_path in your Podfile:
def append_header_search_path(target, path) target.build_configurations.each do |config| # Note that there's a space character after `$(inherited)`. config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) " config.build_settings["HEADER_SEARCH_PATHS"] << path end end
I was able to fix the issue by extending the pods to which the header search path needed to be added
installer.pods_project.targets.each do |target|
if ["RNScreens", "React-Fabric", "RNGestureHandler"].any? { |t| t == target.name }
append_header_search_path(target, "${PODS_ROOT}/../../node_modules/react-native/ReactCommon")
end
end
Workaround until resolved by react native:
Add 'react-native/ReactCommon' to the header search path in your Podfile (in my case, the "RNScreens" pod was giving the problem):
installer.pods_project.targets.each do |target| if target.name == "RNScreens" append_header_search_path(target, "${PODS_ROOT}/../../node_modules/react-native/ReactCommon") end end
Also define the append_header_search_path in your Podfile:
def append_header_search_path(target, path) target.build_configurations.each do |config| # Note that there's a space character after `$(inherited)`. config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) " config.build_settings["HEADER_SEARCH_PATHS"] << path end end
Where I add this code? In my Podfile show this error: [!] Invalid Podfile
file: undefined local variable or method `installer' for #<Pod::Podfile:0x0000000103534428 @defined_in_file=#Pathname:/Users/guiathayde/apps/xati/mobile/ios/Podfile, @internal_hash={"installation_method"=>{"name"=>"cocoapods", "options"=>{:deterministic_uuids=>false}}}, @root_target_definitions=[#<Pod::Podfile::TargetDefinition label=Pods>], @current_target_definition=#<Pod::Podfile::TargetDefinition label=Pods>>.
Workaround until resolved by react native: Add 'react-native/ReactCommon' to the header search path in your Podfile (in my case, the "RNScreens" pod was giving the problem):
installer.pods_project.targets.each do |target| if target.name == "RNScreens" append_header_search_path(target, "${PODS_ROOT}/../../node_modules/react-native/ReactCommon") end end
Also define the append_header_search_path in your Podfile:
def append_header_search_path(target, path) target.build_configurations.each do |config| # Note that there's a space character after `$(inherited)`. config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) " config.build_settings["HEADER_SEARCH_PATHS"] << path end end
I was able to fix the issue by extending the pods to which the header search path needed to be added
installer.pods_project.targets.each do |target| if ["RNScreens", "React-Fabric", "RNGestureHandler"].any? { |t| t == target.name } append_header_search_path(target, "${PODS_ROOT}/../../node_modules/react-native/ReactCommon") end end
This is indeed a life saving solution! Also fixed my issue, after having added some more targets in my project.
Workaround until resolved by react native: Add 'react-native/ReactCommon' to the header search path in your Podfile (in my case, the "RNScreens" pod was giving the problem):
installer.pods_project.targets.each do |target| if target.name == "RNScreens" append_header_search_path(target, "${PODS_ROOT}/../../node_modules/react-native/ReactCommon") end end
Also define the append_header_search_path in your Podfile:
def append_header_search_path(target, path) target.build_configurations.each do |config| # Note that there's a space character after `$(inherited)`. config.build_settings["HEADER_SEARCH_PATHS"] ||= "$(inherited) " config.build_settings["HEADER_SEARCH_PATHS"] << path end end
Where I add this code? In my Podfile show this error: [!] Invalid
Podfile
file: undefined local variable or method `installer' for #<Pod::Podfile:0x0000000103534428 @defined_in_file=#Pathname:/Users/guiathayde/apps/xati/mobile/ios/Podfile, @internal_hash={"installation_method"=>{"name"=>"cocoapods", "options"=>{:deterministic_uuids=>false}}}, @root_target_definitions=[#<Pod::Podfile::TargetDefinition label=Pods>], @current_target_definition=#<Pod::Podfile::TargetDefinition label=Pods>>.
@guiathayde In your Podfile,
post_install do |installer|
installer.pods_project.targets.each do |target|
if ["RNScreens", "React-Fabric", "RNGestureHandler"].any? { |t| t == target.name }
append_header_search_path(target, "${PODS_ROOT}/../../node_modules/react-native/ReactCommon")
end
end
end
Note that the if-condition
if ["RNScreens", "React-Fabric", "RNGestureHandler"].any? { |t| t == target.name }
should be modified according to the actual targets in your project's Pod. e.g. in my project, it goes like
if ["React-cxxreact", "React-NativeModulesApple", "RNGestureHandler", "RNScreens"].any? { |t| t == target.name }
post_install do |installer| # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 installer.pods_project.targets.each do |target| if target.name == "React-Core-AccessibilityResources" target.remove_from_project end end react_native_post_install( installer, config[:reactNativePath], :mac_catalyst_enabled => false ) __apply_Xcode_12_5_M1_post_install_workaround(installer) end
this is my Podfile's that code, i dont get it how to update it. im getting 'react/debug/react_native_assert.h' file not found