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

iOS build failure in react-native@0.72.6 - works in react-native@0.72.3 #20115

Open
1 of 4 tasks
kamaldeepj opened this issue Nov 8, 2023 · 14 comments
Open
1 of 4 tasks
Assignees
Labels
scope: react-native Issues relating to React Native type: bug

Comments

@kamaldeepj
Copy link

Current Behavior

iOS builds were working fine in react-native@0.72.3 but started to fail after running nx migrate latest

Error message :

› Compiling react-native Pods/React-cxxreact » JSBigString.cpp
› Compiling react-native Pods/React-cxxreact » Instance.cpp

❌  (../../node_modules/react-native/ReactCommon/cxxreact/Instance.cpp:24:10)

  22 | #include <folly/MoveWrapper.h>
  23 | #include <folly/json.h>
> 24 | #include <react/debug/react_native_assert.h>
     |          ^ 'react/debug/react_native_assert.h' file not found
  25 | 
  26 | #include <glog/logging.h>
  27 | 

› Signing   react-native Pods/RCT-Folly » folly.framework
› Preparing @react-native-firebase/firestore Pods/gRPC-C++ » gRPC-C++-Info.plist
› Preparing react-native Pods/React-utils » React-utils-Info.plist
› Compiling react-native Pods/React-utils » ManagedObjectWrapper.mm
› Preparing react-native Pods/React-jsi » React-jsi-Info.plist
› Compiling react-native Pods/React-utils » RunLoopObserver.cpp

❌  (../../node_modules/react-native/ReactCommon/react/utils/RunLoopObserver.cpp:10:10)

   8 | #include "RunLoopObserver.h"
   9 | 
> 10 | #include <react/debug/react_native_assert.h>
     |          ^ 'react/debug/react_native_assert.h' file not found
  11 | 
  12 | namespace facebook {
  13 | namespace react {

› Signing   react-native Pods/React-jsi » jsi.framework
› Preparing react-native Pods/React-runtimescheduler » React-runtimescheduler-Info.plist
› Compiling react-native Pods/React-runtimescheduler » React_runtimescheduler_vers.c
› Compiling react-native Pods/React-runtimescheduler » Task.cpp
› Compiling react-native Pods/React-runtimescheduler » RuntimeSchedulerCallInvoker.cpp

› 2 error(s), and 19 warning(s)

CommandError: Failed to build iOS project. "xcodebuild" exited with error code 65.

 >  NX   1



 —————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target run-ios for project fleek-customer and 2 task(s) they depend on (1m)
 
    ✖    1/3 failed
    ✔    2/3 succeeded [0 read from cache]
 

Expected Behavior

Builds successfully

GitHub Repo

No response

Steps to Reproduce

yarn nx run my-app:run-ios

Nx Report

yarn run v1.22.19
$ /Users/kamaldeepjayaprakash/Documents/fleek/code/fleek-monorepo/node_modules/.bin/nx report

 >  NX   Report complete - copy this into the issue template

   Node   : 20.5.1
   OS     : darwin-arm64
   yarn   : 1.22.19
   
   nx                 : 16.8.1
   @nx/js             : 16.8.1
   @nx/jest           : 16.8.1
   @nx/linter         : 16.8.1
   @nx/workspace      : 16.8.1
   @nx/cypress        : 16.8.1
   @nx/detox          : 16.8.1
   @nx/devkit         : 16.8.1
   @nx/eslint-plugin  : 16.8.1
   @nx/expo           : 16.8.1
   @nx/next           : 16.8.1
   @nx/react          : 16.8.1
   @nrwl/tao          : 16.8.1
   @nx/web            : 16.8.1
   @nx/webpack        : 16.8.1
   nx-cloud           : 16.4.0
   typescript         : 5.1.6

Done in 0.50s.

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@kamaldeepj kamaldeepj changed the title iOS build failure in react-native@0.72.6 - works in eact-native@0.72.3 iOS build failure in react-native@0.72.6 - works in react-native@0.72.3 Nov 8, 2023
@FrozenPandaz FrozenPandaz added the scope: react-native Issues relating to React Native label Nov 10, 2023
@mikeversita
Copy link

mikeversita commented Nov 23, 2023

Had the same issue, reverted to 0.72.3 and worked fine. This only affected building .app , building .iap files work fine.
Can also confirm 0.72.4 works as expected. 0.72.5 doesn't

@proactivebit
Copy link

I also encounter this problem. The same version on react native without nx works fine.

@arenier
Copy link

arenier commented Dec 26, 2023

We are also facing the same issue.

Does anyone has tried with RN 0.73.+ ? comment

@sheepma
Copy link

sheepma commented Jan 17, 2024

If you're experiencing issues with React Native version 0.72.6, a viable solution might be to apply a patch from this GitHub pull request: React Native Pull Request #39177. This patch addresses the specific problem you're encountering.

To implement this fix, you can use the patch-package tool to apply the changes from the pull request to your project. I've personally tested this approach with React Native 0.72.6, and it successfully resolved the issue for me.

Note: do the reverse: add File.absolute_path() to all header_mappings_dir.

@Nantris
Copy link

Nantris commented Jan 28, 2024

Does anyone has tried with RN 0.73.+ ?

Yes. I just get errors of this sort even earlier in the build process caused by Yoga.

@Nantris
Copy link

Nantris commented Jan 28, 2024

@sheepma how did you get patch-package to apply the changes? It just errors for me (and same with git am filename.patch. I'm doing it by hand now, but I'd love to know for the future.

@malikzype
Copy link

@slapbox I am using RN 0.72.6 and the patch-package shared by you is already there in the same version but still the error remains the same. Can you help me?

@Nantris
Copy link

Nantris commented Feb 2, 2024

I'm not the one who shared the fix originally, but what I ended up doing was manually implementing it and then using patch-package to make the patch. It did solve my problem though. Unfortunately I'm only following advice and have no further guidance I can provide.

What error do you get after implementing the patch? Are you sure you implemented it correctly? The first times I missed updating a couple references and it worked after I fixed those.

@rodrigodiasf1984
Copy link

Same problem with react-native 0.74.0 any help?

This is the error i've got:

The following build commands failed: CompileC /Users/rodrigodiasdefigueiredo/Library/Developer/Xcode/DerivedData/rn074andLottie-fsauvjzcwuwrbwftagkztsxizjqe/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-utils-framework.build/Objects-normal/arm64/RunLoopObserver.o /Users/rodrigodiasdefigueiredo/Desktop/rn074andLottie/node_modules/react-native/ReactCommon/react/utils/RunLoopObserver.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-utils-framework' from project 'Pods')

@Jackmekiss
Copy link

Same here

The following build commands failed: CompileC /Users/martinseigneuret/Library/Developer/Xcode/DerivedData/SneakmartApp-fmxeibanrznxrpbbbayerstjfxcr/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-utils.build/Objects-normal/arm64/RunLoopObserver.o /Users/martinseigneuret/Documents/Sneakmart/sneakmart-front-monorepo/node_modules/react-native/ReactCommon/react/utils/RunLoopObserver.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-utils' from project 'Pods') (1 failure)

Some news?

@spolesciuc
Copy link

spolesciuc commented Jun 17, 2024

I'm getting the same problem

The following build commands failed:
        CompileC /Users/ZasZZ/Library/Developer/Xcode/DerivedData/AppSww-bvnljybxosrcstdjytvqczotnehk/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/React-cxxreact.build/Objects-normal/arm64/Instance.o /Users/ZasZZ/Documents/Projects/AppSww/core/node_modules/react-native/ReactCommon/cxxreact/Instance.cpp normal arm64 c++ com.apple.compilers.llvm.clang.1_0.compiler (in target 'React-cxxreact' from project 'Pods')
(1 failure)

"react-native": "0.74.1"

@Nantris
Copy link

Nantris commented Jun 17, 2024

@rodrigodiasf1984 does your issue persist? If you look above that message, is the root cause related to this issue? facebook/react-native#44340

Or is it the react_native_assert.h issue here?

It's not clear from your message which file exactly is causing the failure.

@rodrigodiasf1984
Copy link

@rodrigodiasf1984 does your issue persist? If you look above that message, is the root cause related to this issue? Facebook/react-native#44340

Or is it the react_native_assert.h issue here?

It's not clear from your message which file exactly is causing the failure.

i've found a solution to fix it, sorry but i don't remeber what i did

@PrimulaX
Copy link

PrimulaX commented Oct 4, 2024

Same here, happens only with Nx not RN CLI #28293

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: react-native Issues relating to React Native type: bug
Projects
None yet
Development

No branches or pull requests