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

Error ParagraphShadowNode.h file not found #3385

Closed
featlast opened this issue Feb 6, 2025 · 30 comments · Fixed by #3388
Closed

Error ParagraphShadowNode.h file not found #3385

featlast opened this issue Feb 6, 2025 · 30 comments · Fixed by #3388
Assignees
Labels
Missing repro Platform: iOS This issue is specific to iOS

Comments

@featlast
Copy link

featlast commented Feb 6, 2025

Description

Description

Showing All Errors Only
CompileC /Users/jose/Library/Developer/Xcode/DerivedData/FCliente-dqwkdzhglctoykctinygewyrwvpm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNGestureHandler.build/Objects-normal/arm64/RNGestureHandlerModule.o /Users/jose/Desktop/projects/Chile/newFileApp/FCliente/node_modules/react-native-gesture-handler/apple/RNGestureHandlerModule.mm normal arm64 objective-c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'RNGestureHandler' from project 'Pods')
cd /Users/jose/Desktop/projects/Chile/newFileApp/FCliente/ios/Pods

Using response file: /Users/jose/Library/Developer/Xcode/DerivedData/FCliente-dqwkdzhglctoykctinygewyrwvpm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNGestureHandler.build/Objects-normal/arm64/af3fcb34312c57c0f52879cdce924b91-common-args.resp

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c++ -ivfsstatcache /Users/jose/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphonesimulator18.2-22C146-07b28473f605e47e75261259d3ef3b5a.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/jose/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-c++11-extensions -Wno-implicit-fallthrough -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Winvalid-offsetof -Wno-sign-conversion -Winfinite-recursion -Wmove -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wrange-loop-analysis -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/jose/Library/Developer/Xcode/DerivedData/FCliente-dqwkdzhglctoykctinygewyrwvpm/Index.noindex/DataStore -Wno-comma -Wno-shorten-64-to-32 @/Users/jose/Library/Developer/Xcode/DerivedData/FCliente-dqwkdzhglctoykctinygewyrwvpm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNGestureHandler.build/Objects-normal/arm64/af3fcb34312c57c0f52879cdce924b91-common-args.resp -DRCT_NEW_ARCH_ENABLED\=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE\=1 -DFOLLY_USE_LIBCPP\=1 -DFOLLY_CFG_NO_COROUTINES\=1 -DFOLLY_HAVE_CLOCK_GETTIME\=1 -Wno-comma -Wno-shorten-64-to-32 -include /Users/jose/Desktop/projects/Chile/newFileApp/FCliente/ios/Pods/Target\ Support\ Files/RNGestureHandler/RNGestureHandler-prefix.pch -MMD -MT dependencies -MF /Users/jose/Library/Developer/Xcode/DerivedData/FCliente-dqwkdzhglctoykctinygewyrwvpm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNGestureHandler.build/Objects-normal/arm64/RNGestureHandlerModule.d --serialize-diagnostics /Users/jose/Library/Developer/Xcode/DerivedData/FCliente-dqwkdzhglctoykctinygewyrwvpm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNGestureHandler.build/Objects-normal/arm64/RNGestureHandlerModule.dia -c /Users/jose/Desktop/projects/Chile/newFileApp/FCliente/node_modules/react-native-gesture-handler/apple/RNGestureHandlerModule.mm -o /Users/jose/Library/Developer/Xcode/DerivedData/FCliente-dqwkdzhglctoykctinygewyrwvpm/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/RNGestureHandler.build/Objects-normal/arm64/RNGestureHandlerModule.o -index-unit-output-path /Pods.build/Debug-iphonesimulator/RNGestureHandler.build/Objects-normal/arm64/RNGestureHandlerModule.o

/Users/jose/Desktop/projects/Chile/newFileApp/FCliente/node_modules/react-native-gesture-handler/apple/RNGestureHandlerModule.mm:17:9: fatal error: 'react/renderer/components/text/ParagraphShadowNode.h' file not found
17 | #import <react/renderer/components/text/ParagraphShadowNode.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/jose/Desktop/projects/Chile/newFileApp/FCliente/node_modules/react-native-gesture-handler/apple/RNGestureHandlerModule.mm:17:9: note: did not find header 'renderer/components/text/ParagraphShadowNode.h' in framework 'react' (loaded from '/Users/jose/Library/Developer/Xcode/DerivedData/FCliente-dqwkdzhglctoykctinygewyrwvpm/Build/Products/Debug-iphonesimulator/React-Core')
1 error generated.

/Users/jose/Desktop/projects/Chile/newFileApp/FCliente/node_modules/react-native-gesture-handler/apple/RNGestureHandlerModule.mm:17:9: 'react/renderer/components/text/ParagraphShadowNode.h' file not found

Steps to reproduce

none

Snack or a link to a repository

none

Gesture Handler version

2.23.0

React Native version

0.77

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

Steps to reproduce

none

Snack or a link to a repository

none

Gesture Handler version

2.23.0

React Native version

0.77

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

Copy link

github-actions bot commented Feb 6, 2025

Hey! 👋

It looks like you've omitted a few important sections from the issue template.

Please complete Description section.

@github-actions github-actions bot added the Platform: iOS This issue is specific to iOS label Feb 6, 2025
Copy link

github-actions bot commented Feb 6, 2025

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@ROG3R-DEV
Copy link

Same problem here. The problem happens on react-native equal or greater than 0.76.6.

Image

@AftabUfaq
Copy link

same issue

@m-bert
Copy link
Contributor

m-bert commented Feb 6, 2025

Hi @featlast! I've just built fresh React Native app on 0.77, added Gesture Handler 2.23.0 and replaced Text from react-native with Text from react-native-gesture-handler. Everything works fine.

I see that you error logs point into DerivedData, have you tried cleaning those? Have you cleaned caches and performed clean build?

@m-bert m-bert self-assigned this Feb 6, 2025
@m-bert
Copy link
Contributor

m-bert commented Feb 6, 2025

@ROG3R-DEV I've done the same thing with 0.76.6, works fine on my end.

@0xDing
Copy link

0xDing commented Feb 6, 2025

Hi @featlast! I've just built fresh React Native app on 0.77, added Gesture Handler 2.23.0 and replaced Text from react-native with Text from react-native-gesture-handler. Everything works fine.

I see that you error logs point into DerivedData, have you tried cleaning those? Have you cleaned caches and performed clean build?

This issue seems to be related to use_frameworks! :linkage => :static in the Podfile.

@m-bert
Copy link
Contributor

m-bert commented Feb 6, 2025

This issue seems to be related to use_frameworks! :linkage => :static in the Podfile.

I'm not sure why static linking would break this. I've changed it in Podfile in fresh app and it still runs fine.

@featlast
Copy link
Author

featlast commented Feb 6, 2025

Hola@featlastAcabo de crear una nueva aplicación React Native en la versión 0.77, agregué Gesture Handler 2.23.0 y reemplacé Textfrom react-nativepor Textfrom react-native-gesture-handler. Todo funciona bien.

Veo que los registros de errores apuntan a DerivedData, ¿ha intentado limpiarlos? ¿Ha limpiado los cachés y ha realizado una compilación limpia?

Hello @m-bert , greetings, that's right, I cleaned the build and the XCODE DerivedData and the error persisted.

@m-bert
Copy link
Contributor

m-bert commented Feb 6, 2025

In that case, please provide a reproduction that we can look at 😅

@0xDing
Copy link

0xDing commented Feb 6, 2025

This issue seems to be related to use_frameworks! :linkage => :static in the Podfile.

I'm not sure why static linking would break this. I've changed it in Podfile in fresh app and it still runs fine.

Apologies, I don't have the time to create a standalone minimal reproduction at the moment. However, I can confirm that the following modification to the Podfile—adding additional header_search_paths—helped me resolve the issue:

require "json"

is_gh_example_app = ENV["GH_EXAMPLE_APP_NAME"] != nil

compilation_metadata_dir = "CompilationDatabase"
compilation_metadata_generation_flag = is_gh_example_app ?  '-gen-cdb-fragment-path ' + compilation_metadata_dir : ''

header_search_paths = []

if ENV['USE_FRAMEWORKS']
header_search_paths.concat([
'"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricComponents/React_FabricComponents.framework/Headers"',
'"${PODS_CONFIGURATION_BUILD_DIR}/React-FabricComponents/React_FabricComponents.framework/Headers/react/renderer/textlayoutmanager/platform/ios"',
])
end

Pod::Spec. new do |s|
# NPM package specification
package = JSON.parse(File.read(File.join(File.dirname(__FILE__), "package.json")))

s.name         = "RNGestureHandler"
s.version      = package["version"]
s.summary      = package["description"]
s.homepage     = "https://github.com/software-mansion/react-native-gesture-handler"
s.license      = "MIT"
s.author       = { package["author"]["name"] => package["author"]["email"] }
s.source       = { :git => "https://github.com/software-mansion/react-native-gesture-handler", :tag => "#{s. version}" }
s.source_files = "apple/**/*.{h,m,mm}"
s.requires_arc = true
s.platforms       = { ios: '11.0', tvos: '11.0', osx: '10.15', visionos: '1.0' }
s.xcconfig = {
"OTHER_CFLAGS" => "$(inherited)  " + compilation_metadata_generation_flag,
'HEADER_SEARCH_PATHS' => header_search_paths. join(' ')
}

if defined?(install_modules_dependencies()) != nil
install_modules_dependencies(s);
else
s.dependency "React-Core"
end
end

I suspect the issue is similar to a past one I encountered with Expo, which is discussed here: expo/expo#32142

@featlast
Copy link
Author

featlast commented Feb 6, 2025

Image

brother, this is the error, if I install version 2.23.0, then I decided to install version 2.22.0, and it solves my case

@m-bert

This comment has been minimized.

@gideon-uiby
Copy link

@featlast this weirdly fixes the error, but do we know what the root cause is?

Image

@m-bert
Copy link
Contributor

m-bert commented Feb 6, 2025

Sorry, I made a mistake in my previous comment as those numbers are similar, I meant #3388

@featlast, @0xDing, @gideon-uiby, could you please check that PR?

@0xDing
Copy link

0xDing commented Feb 6, 2025

Sorry, I made a mistake in my previous comment as those numbers are similar, I meant #3388

@featlast, @0xDing, @gideon-uiby, could you please check that PR?

It works for me.

React Native: 0.77

@ROG3R-DEV
Copy link

This fixed it for me

rm -rf ios/build ios/Pods ios/Podfile.lock

cd ios && RCT_NEW_ARCH_ENABLED=0 pod install

react-native 0.77.0
react-native-gesture-handler 2.23.0

@drumsSandoval
Copy link

bundle Install

It's Worked For me uwu!

@irmakcosarsahna
Copy link

irmakcosarsahna commented Feb 6, 2025

I’m experiencing the same issue. I temporarily fixed it by downgrading to version 2.22.0, but the issue still persists in 2.23.0. I’m using React Native 0.77

@marioecs

This comment has been minimized.

@anudit
Copy link

anudit commented Feb 7, 2025

Running into this too with

  • reactNativeTargetVersion: 0.76.7
  • fabric_enabled: true
  • linkage: static
  • newArch: true

Downgrading to 2.22.0 fixed it for now.

@SurendraSp
Copy link

Running into this too with

  • reactNativeTargetVersion: 0.76.7
  • fabric_enabled: true
  • linkage: static
  • newArch: true

Downgrading to 2.22.0 fixed it for now.

Not working for me 😖

@koreanddinghwan
Copy link

i had same issue but solved.

before

reactNativeTargetVersion: 0.76.7
fabric_enabled: true
linkage: static
newArch: true
gesturehandler v2.3

after

reactNativeTargetVersion: 0.76.7
fabric_enabled: true
linkage: static
newArch: true
gesturehandler v2.22.0

The two files differs at:
https://github.com/software-mansion/react-native-gesture-handler/blob/2.22.0/apple/RNGestureHandlerModule.mm
https://github.com/software-mansion/react-native-gesture-handler/blob/2.23.0/apple/RNGestureHandlerModule.mm

show that in version 2.23.0, the following lines were added:

#import <react/renderer/components/text/ParagraphShadowNode.h>
#import <react/renderer/components/text/TextShadowNode.h>

and using version 2.22.0, which does not have this header, allowed the build to succeed.

@SurendraSp
Copy link

SurendraSp commented Feb 7, 2025

Thanks @koreanddinghwan for that file links.
After that i checked inside node modules which i have installed and i found it's 2.23.0 instead of 2.22.0 then i found it happen because of ^ in version.
Just FYI: If you downgrading version "react-native-gesture-handler": "^2.22.0" make sure you remove ^ from version. 😵‍💫

@popocreator
Copy link

Same Issue

@brianaderer
Copy link

brianaderer commented Feb 7, 2025

Same issue. Blocked on building. started on RN 76.2 v 2.23. Upgrated to RN 77.0. Still doesn't work with v 2.23. Downgrade to 2.22 fixed it

@tremblerz
Copy link

tremblerz commented Feb 9, 2025

I wanted to use 2.23 because of the bug fixes so I manually applied the patch introduced in the above mentioned PR and it worked like a charm. If you, like me, can't wait for the PR to be merged, add the following lines to the file node_modules/react-native-gesture-handler/RNGestureHandler.podspec -

if ENV['USE_FRAMEWORKS'] != nil && ENV['RCT_NEW_ARCH_ENABLED'] == '1'
    add_dependency(s, "React-FabricComponents", :additional_framework_paths => [
      "react/renderer/textlayoutmanager/platform/ios",
      "react/renderer/components/textinput/platform/ios",
    ])
    add_dependency(s, "React-rendererconsistency")
  end

@m-bert
Copy link
Contributor

m-bert commented Feb 10, 2025

Hi! I've done small change into PR, could you please check if it still works? #3388. If so, I'd like to merge it as soon as possible (cc @0xDing).

m-bert added a commit that referenced this issue Feb 10, 2025
## Description

This PR updates `RNGestureHandler.podspec` to fix builds on iOS, which broke after #3338.

Fixes #3385 

## Test plan

Verified by users (see [issue](#3385))

Tested on fresh React Native 0.77 app with the following line in `Podfile`:

```rb
use_frameworks! :linkage => :static
```
@shuvajitmaitra

This comment has been minimized.

@m-bert
Copy link
Contributor

m-bert commented Feb 11, 2025

FYI, I've just released 2.23.1 that includes fix for this problem 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro Platform: iOS This issue is specific to iOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.