wix / react-native-navigation

A complete native navigation solution for React Native
https://wix.github.io/react-native-navigation/
MIT License
13.04k stars 2.67k forks source link

Coroutine.h file not found #7928

Open OskarEichler opened 3 weeks ago

OskarEichler commented 3 weeks ago

What happened?

After upgrading React Native from 0.73.6 to 0.76.0 we are getting the following error: 'folly/experimental/coro/Coroutine.h' file not found

We are on the latest version of react-native-navigation.

We also already tried to add "-DFOLLY_CFG_NO_COROUTINES=1" to the project.pbjproj file.

Please advice.

What was the expected behaviour?

No response

Was it tested on latest react-native-navigation?

Help us reproduce this issue!

Screenshot 2024-10-24 at 07 32 04

In what environment did this happen?

React Native Navigation version: 7.40.3 React Native version: 0.76.0 Has Fabric (React Native's new rendering system) enabled: No Node version: v20.16.0 Device model: iPhone 16 Pro iOS version: 18.0.1

nezort11 commented 2 weeks ago

same for React-jsi

image
nezort11 commented 2 weeks ago

Adding -DFOLLY_CFG_NO_COROUTINES=1 to the project.pbjproj file also didn't solve issue for me .

This solution works for me: https://github.com/facebook/folly/issues/2297#issuecomment-2441706674

OskarEichler commented 2 weeks ago

Adding this to Podfile is patching the issue for the time being:

  post_install do |installer|
    system("chmod -R u+w Pods/RCT-Folly")
    Dir.glob("Pods/RCT-Folly/folly/Portability.h").each do |file|
      text = File.read(file)
      new_contents = text.gsub('#define FOLLY_HAS_COROUTINES 1', '#define FOLLY_HAS_COROUTINES 0')
      File.open(file, "w") { |file| file.puts new_contents }
    end
  end

However still running into this issue (https://github.com/wix/react-native-navigation/issues/7920) when trying to build on 0.76.1

MohamedAbdElNaby commented 1 week ago

hi @OskarEichler , I wanted to see if the iOS issue has been resolved. Could you confirm?

OskarEichler commented 1 week ago

hi @OskarEichler , I wanted to see if the iOS issue has been resolved. Could you confirm?

The patch I posted in the Podfile is resolving this particular issue, however #7920 is still blocking us from being able to upgrade to 0.76.X

MohamedAbdElNaby commented 1 week ago

@OskarEichler can you share with me your podfile please ?

OskarEichler commented 1 week ago

No sorry - please try to implement the patch I posted above, the run pod install - should work.