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-native-fbt not working on lastest React Native version (0.70.6) #388

Open
longb1997 opened this issue Dec 30, 2022 · 3 comments
Open

Comments

@longb1997
Copy link

πŸ› Bug Report

Every time i tries build by Xcode, this error show up:

Cycle in dependencies between targets 'MyApp' and 'React-Codegen'; building could produce unreliable results.
Cycle path: MyApp β†’ Pods-MyApp β†’ react-native-fbt β†’ React β†’ React-RCTAnimation β†’ React-Codegen β†’ MyApp
Cycle details:
β†’ Target 'MyApp': CodeSign /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Products/Debug-iphonesimulator/MyApp.app
β—‹ Target 'MyApp': ProcessProductPackaging  /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/MyApp.app.xcent
β†’ Target 'Pods-MyApp' has target dependency on Target 'react-native-fbt'
β—‹ That command depends on command in Target 'react-native-fbt': script phase β€œ[CP-User] Generate Specs”
β†’ Target 'react-native-fbt'
β†’ Target 'React' has target dependency on Target 'React-RCTAnimation'
β†’ Target 'React-RCTAnimation' has target dependency on Target 'React-Codegen'
β†’ Target 'React-Codegen' has compile command with input '/Users/hoanglong/dev/MyApp/ios/build/generated/ios/react/renderer/components/ReactNativeFbtSpec/EventEmitters.cpp'
β—‹ That command depends on command in Target 'react-native-fbt': script phase β€œ[CP-User] Generate Specs”


Raw dependency cycle trace:

target:  ->

node: <all> ->

command: <all> ->

node: /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Products/Debug-iphonesimulator/MyApp.app/_CodeSignature ->

command: target-MyApp-69f607e51142d46fd87ad1dd1a39b4087ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:CodeSign /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Products/Debug-iphonesimulator/MyApp.app ->

node: /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/MyApp.app.xcent/ ->

directoryTreeSignature: οΏ½ ->

directoryContents: /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/MyApp.app.xcent ->

node: /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/MyApp.app.xcent ->

command: target-MyApp-69f607e51142d46fd87ad1dd1a39b4087ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:ProcessProductPackaging  /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/MyApp.app.xcent ->

node: /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/DerivedSources/Entitlements.plist ->

command: target-MyApp-69f607e51142d46fd87ad1dd1a39b4087ceb6b36bcfc2fb90f69ac96de4975d6-:Debug:WriteAuxiliaryFile /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyApp.build/DerivedSources/Entitlements.plist ->

node: <target-MyApp-69f607e51142d46fd87ad1dd1a39b4087ceb6b36bcfc2fb90f69ac96de4975d6--ProductStructureTaskProducer> ->

command: Gate target-MyApp-69f607e51142d46fd87ad1dd1a39b4087ceb6b36bcfc2fb90f69ac96de4975d6--ProductStructureTaskProducer ->

node: <target-MyApp-69f607e51142d46fd87ad1dd1a39b4087ceb6b36bcfc2fb90f69ac96de4975d6--begin-compiling> ->

command: Gate target-MyApp-69f607e51142d46fd87ad1dd1a39b4087ceb6b36bcfc2fb90f69ac96de4975d6--begin-compiling ->

node: <target-Pods-MyApp-8699adb1dd336b26511df848a716bd42c1abebbef72dcc54406e1fb4d6f29b8d--modules-ready> ->

command: Gate target-Pods-MyApp-8699adb1dd336b26511df848a716bd42c1abebbef72dcc54406e1fb4d6f29b8d--modules-ready ->

node: <target-Pods-MyApp-8699adb1dd336b26511df848a716bd42c1abebbef72dcc54406e1fb4d6f29b8d--begin-compiling> ->

command: Gate target-Pods-MyApp-8699adb1dd336b26511df848a716bd42c1abebbef72dcc54406e1fb4d6f29b8d--begin-compiling ->

node: <target-react-native-fbt-8699adb1dd336b26511df848a716bd425302c160cb888c82ac84a0e386ee4bac--modules-ready> ->

command: Gate target-react-native-fbt-8699adb1dd336b26511df848a716bd425302c160cb888c82ac84a0e386ee4bac--modules-ready ->

node: /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-fbt.build/DerivedSources/codegen-ReactNativeFbtSpec.log ->

CYCLE POINT ->

command: target-react-native-fbt-8699adb1dd336b26511df848a716bd425302c160cb888c82ac84a0e386ee4bac-:Debug:PhaseScriptExecution [CP-User] Generate Specs /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-fbt.build/Script-46EB2E00021870.sh ->

node: /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-fbt.build/Script-46EB2E00021870.sh ->

command: target-react-native-fbt-8699adb1dd336b26511df848a716bd425302c160cb888c82ac84a0e386ee4bac-:Debug:WriteAuxiliaryFile /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-fbt.build/Script-46EB2E00021870.sh ->

node: <target-react-native-fbt-8699adb1dd336b26511df848a716bd425302c160cb888c82ac84a0e386ee4bac--entry> ->

command: Gate target-react-native-fbt-8699adb1dd336b26511df848a716bd425302c160cb888c82ac84a0e386ee4bac--entry ->

node: <target-React-8699adb1dd336b26511df848a716bd42091e10ab92ef02a5d90ffb84b380567b--end> ->

command: Gate target-React-8699adb1dd336b26511df848a716bd42091e10ab92ef02a5d90ffb84b380567b--end ->

node: <target-React-8699adb1dd336b26511df848a716bd42091e10ab92ef02a5d90ffb84b380567b--entry> ->

command: Gate target-React-8699adb1dd336b26511df848a716bd42091e10ab92ef02a5d90ffb84b380567b--entry ->

node: <target-React-RCTAnimation-8699adb1dd336b26511df848a716bd42fa7387fd1c471430f783250399affb7d--end> ->

command: Gate target-React-RCTAnimation-8699adb1dd336b26511df848a716bd42fa7387fd1c471430f783250399affb7d--end ->

node: /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTAnimation.build/Objects-normal/arm64/React-RCTAnimation.LinkFileList ->

command: target-React-RCTAnimation-8699adb1dd336b26511df848a716bd42fa7387fd1c471430f783250399affb7d-:Debug:WriteAuxiliaryFile /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-RCTAnimation.build/Objects-normal/arm64/React-RCTAnimation.LinkFileList ->

node: <target-React-RCTAnimation-8699adb1dd336b26511df848a716bd42fa7387fd1c471430f783250399affb7d--entry> ->

command: Gate target-React-RCTAnimation-8699adb1dd336b26511df848a716bd42fa7387fd1c471430f783250399affb7d--entry ->

node: <target-React-Codegen-8699adb1dd336b26511df848a716bd423e463c0b90ea125684ba7eb9113494aa--end> ->

command: Gate target-React-Codegen-8699adb1dd336b26511df848a716bd423e463c0b90ea125684ba7eb9113494aa--end ->

node: /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Objects-normal/arm64/EventEmitters.o ->

command: target-React-Codegen-8699adb1dd336b26511df848a716bd423e463c0b90ea125684ba7eb9113494aa-:Debug:CompileC /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-Codegen.build/Objects-normal/arm64/EventEmitters.o /Users/hoanglong/dev/MyApp/ios/build/generated/ios/react/renderer/components/ReactNativeFbtSpec/EventEmitters.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler ->

node: /Users/hoanglong/dev/MyApp/ios/build/generated/ios/react/renderer/components/ReactNativeFbtSpec/EventEmitters.cpp ->

command: target-react-native-fbt-8699adb1dd336b26511df848a716bd425302c160cb888c82ac84a0e386ee4bac-:Debug:PhaseScriptExecution [CP-User] Generate Specs /Users/hoanglong/Library/Developer/Xcode/DerivedData/MyApp-bxqbewaaezodvlgilkrammsljsbx/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/react-native-fbt.build/Script-46EB2E00021870.sh

To Reproduce

Steps to reproduce the behavior:

  1. Init new react native project
  2. yarn add react-native-fbt and pod install
  3. Run by Xcode/Cli

Link to repo (highly encouraged) or paste

envinfo

  System:
    OS: macOS 11.6.6
    CPU: (8) arm64 Apple M1
    Memory: 148.70 MB / 8.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.18.0 - ~/.nvm/versions/node/v16.18.0/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 8.19.2 - ~/.nvm/versions/node/v16.18.0/bin/npm
    Watchman: 2022.12.26.00 - /opt/homebrew/bin/watchman
@longb1997
Copy link
Author

i did patched RCT-Folly version before, reason:
#377

@retyui
Copy link
Contributor

retyui commented Feb 3, 2023

the same issue,

[!] CocoaPods could not find compatible versions for pod "RCT-Folly":
  In snapshot (Podfile.lock):
    RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)

  In Podfile:
    RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)

    React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) was resolved to 0.70.7, which depends on
      RCT-Folly (= 2021.07.22.00)

    react-native-fbt (from `../node_modules/react-native-fbt`) was resolved to 0.0.7, which depends on
      RCT-Folly (= 2021.06.28.00-v2)

@longb1997 how did you patch RCT-Folly version ?

because, when I tried to manually set folly_version = '2021.07.22.00' in the ./node_modules/react-native-fbt/react-native-fbt.podspec file

it fail with the next error

 Building library libFlipperKit.a

❌  error: Cycle in dependencies between targets 'FbtTest2' and 'React-Codegen'; building could produce unreliable results.

@longb1997
Copy link
Author

the same issue,

[!] CocoaPods could not find compatible versions for pod "RCT-Folly":
  In snapshot (Podfile.lock):
    RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)

  In Podfile:
    RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)

    React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) was resolved to 0.70.7, which depends on
      RCT-Folly (= 2021.07.22.00)

    react-native-fbt (from `../node_modules/react-native-fbt`) was resolved to 0.0.7, which depends on
      RCT-Folly (= 2021.06.28.00-v2)

@longb1997 how did you patch RCT-Folly version ?

because, when I tried to manually set folly_version = '2021.07.22.00' in the ./node_modules/react-native-fbt/react-native-fbt.podspec file

it fail with the next error

 Building library libFlipperKit.a

❌  error: Cycle in dependencies between targets 'FbtTest2' and 'React-Codegen'; building could produce unreliable results.

Did you use patch-package ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants