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 BUILD FAILED on run-ios #26118

Closed
LeeMoonki opened this issue Aug 20, 2019 · 53 comments
Closed

React Native BUILD FAILED on run-ios #26118

LeeMoonki opened this issue Aug 20, 2019 · 53 comments
Labels
Bug Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@LeeMoonki
Copy link

LeeMoonki commented Aug 20, 2019

React Native version

System:
OS: macOS 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
Memory: 249.73 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v10.13.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5692245
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.60.5 => 0.60.5
npmGlobalPackages:
react-native-cli: 2.0.1

Steps To Reproduce

  1. init a project with react-native init FirstNative
  2. run cd FirstNative and run react-native run-ios
  3. I got error same with Result
  4. To retry, init another project with react-native init TestNativeProject
  5. run cd TestNativeProject and react-native run-ios
  6. I got same error written at Result

Expected Behavior

Success of building the project

Result

The result is following error.

** BUILD FAILED **

The following build commands failed:
CompileC /Users/LeeMoonki/Desktop/FirstNative/ios/build/FirstNative/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Folly.build/Objects-normal/x86_64/Unicode.o /Users/LeeMoonki/Desktop/TestNativeProject/ios/Pods/Folly/folly/Unicode.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

To see the exact error, I run the workspace of this project in the Xcode(v10.3) then the following error is occurred.

'folly/CppAttributes.h' file not found ColdClass.h
@LeeMoonki LeeMoonki added the Bug label Aug 20, 2019
@react-native-bot react-native-bot added the Platform: iOS iOS applications. label Aug 20, 2019
@react-native-bot
Copy link
Collaborator

Thanks for submitting your issue. Can you take another look at your description and make sure the issue template has been filled in its entirety?

👉 Click here if you want to take another look at the Bug Report issue template.

@react-native-bot react-native-bot added Ran Commands One of our bots successfully processed a command. Resolution: Needs More Information labels Aug 20, 2019
@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the React Native version: section?

If you believe this information is irrelevant to the reported issue, you may write `[skip envinfo]` alongside an explanation in your Environment: section.

@LeeMoonki
Copy link
Author

LeeMoonki commented Aug 27, 2019

I struggled to build react native project in iOS with this issue. And I did build after following processes.

  1. Clear the cache of pod with
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
  1. And delete the project's Pods directory. The location of it is project directory > ios > Pods.
  2. Then in the project directory > ios location, install pod with pod install
  3. And react-native run-ios in project directory.

After I faced the issue, I try to build the project in another Mac and work fine. And I found the every error is from folly and it is in Pods. Then I compared Pods directory between mine and another Mac environment. In my case, there are missing files. So I reference the comment written by kelset in 'folly/folly-config.h' file not found, said "This happens when your pod cache is corrupted.". So I check the way of clearing cache of pod, and it works.

@react-native-bot
Copy link
Collaborator

I am closing this issue because it does not contain the necessary environment info, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

@zerobytes
Copy link

Experiencing the same behavior.
Closing the issue without even testing it is irresponsible, this issue is obviously problematic, once there is no development related and no external library/package involved. I think it's probably a problem with react-native cli though.

it is the raw basic usage from react-native cli and basic react-native run without a single line of code.

Steps

react-native init AwesomeProject
react-native run-ios

Results

In file included from /Users/zerobyteawesomeproject/ios/awesomeproject/AppDelegate.m:8:
/Users/zerobyte/awesomeproject/ios/awesomeproject/AppDelegate.h:8:9: fatal error: 'React/RCTBridgeDelegate.h' file not found
#import <React/RCTBridgeDelegate.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~


** BUILD FAILED **


The following build commands failed:
        CompileC /Users/zerobyte/awesomeproject/ios/build/awesomeproject/Build/Intermediates.noindex/awesomeproject.build/Debug-iphonesimulator/awesomeproject.build/Objects-normal/x86_64/main.o /Users/zerobyte/awesomeproject/ios/awesomeproject/main.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

react-native info

System:
    OS: macOS 10.14.6
    CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
    Memory: 56.55 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 11.4.0 - /usr/local/bin/node
    Yarn: 1.12.3 - /usr/local/bin/yarn
    npm: 6.4.1 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
    Android SDK:
      API Levels: 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28
      Build Tools: 27.0.3, 28.0.3
  IDEs:
    Android Studio: 3.3 AI-182.5107.16.33.5314842
    Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
  npmPackages:
    react: 16.8.6 => 16.8.6 
    react-native: 0.60.5 => 0.60.5 
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native-create-library: 3.1.2
    react-native-rename: 2.4.1
    react-native-windows: 0.57.0-rc.0
    react-native: 0.57.8

@nanadjei
Copy link

This solution might help you out.
#24450 (comment)

@LAITONEN
Copy link
Contributor

Ok, I got it. Had issues setting-up a new project after not using React-Native for a lot of time.

My system:

macOS High Sierra 10.13.6
XCode 9.4
Had to reinstall the project in order to use the installation guide from version 0.59.0, because the installation guide from 0.61 uses approach with npx react-native ..., which disallows the usage of react-native below 0.60 (quite totalitarian). 0.59.0 was still using the global version of react-native installed through npm.

In other words:
Reinstall the project by removing the old one and use the steps mentioned in the "Getting Started" guide of React-Native 0.59.0 (or any other version compatible with your version of OS and XCode) to install your project again. No need to delete any build or node_modules or installing pods again and so forth, just pick the version of React-Native compatible with your macOS and Xcode (by downgrading and reinstalling the project until you get it) and no need to upgrade to the latest versions, they are developed for the latest systems, if you don't want to buy the latest devices to support the latest software (OS) or you can't afford them, just stay with the old ones - it's totally fine :)

@vivkikkk
Copy link

I struggled to build react native project in iOS with this issue. And I did build after following processes.

  1. Clear the cache of pod with
rm -rf ~/Library/Caches/CocoaPods
rm -rf Pods
rm -rf ~/Library/Developer/Xcode/DerivedData/*
pod deintegrate
pod setup
  1. And delete the project's Pods directory. The location of it is project directory > ios > Pods.
  2. Then in the project directory > ios location, install pod with pod install
  3. And react-native run-ios in project directory.

After I faced the issue, I try to build the project in another Mac and work fine. And I found the every error is from folly and it is in Pods. Then I compared Pods directory between mine and another Mac environment. In my case, there are missing files. So I reference the comment written by kelset in 'folly/folly-config.h' file not found, said "This happens when your pod cache is corrupted.". So I check the way of clearing cache of pod, and it works.

thx is work

@toscanoGithub
Copy link

On Feb 8th 2021 still have this shitty error and everywhere is closed

@pipoblak
Copy link

pipoblak commented Feb 9, 2021

Having this error too

@nitish-bhushan
Copy link

Still facing this issue!!

@RejoV
Copy link

RejoV commented Feb 12, 2021

System:
OS: macOS 11.2.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 1.70 GB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.15.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 6.14.8 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.4, DriverKit 20.2, macOS 11.1, tvOS 14.3, watchOS 7.2
Android SDK: Not Found
IDEs:
Android Studio: 4.1 AI-201.8743.12.41.7042882
Xcode: 12.4/12D4e - /usr/bin/xcodebuild
Languages:
Java: 15.0.1 - /usr/bin/javac
Python: 3.7.6 - /Users/rejovarghese/opt/anaconda3/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Error shown

The following build commands failed:
CompileC /Users//Library/Developer/Xcode/DerivedData/testProj-gttdtokougyaeyaukpnbpyhshzvf/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users//Dafidy/Testing/testProj/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

getting error by doing
react-native init testProj
cd testProj
npx react-native run-ios

@saulo1212
Copy link

pod setupI'm having the same problem

** BUILD FAILED **

The following build commands failed:
CompileC /Users/power/Library/Developer/Xcode/DerivedData/power-aqokegmdybooefaevrcildirndwo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/ConnectionContextStore.o /Users/power/aplicativos/central-24hrs/ios/Pods/Flipper/xplat/Flipper/ConnectionContextStore.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
CompileC /Users/power/Library/Developer/Xcode/DerivedData/power-aqokegmdybooefaevrcildirndwo/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/Flipper.build/Objects-normal/x86_64/FlipperRSocketResponder.o /Users/power/aplicativos/central-24hrs/ios/Pods/Flipper/xplat/Flipper/FlipperRSocketResponder.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(2 failures)

@ubazinga
Copy link

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

@RejoV
Copy link

RejoV commented Feb 16, 2021

@ubazinga replaced and tried, it also throws error but when I commented whole use_flipper part it worked fine, but don't know if it is the correct way.

@saulo1212
Copy link

after change I'm having this error

** ARCHIVE FAILED **

The following build commands failed:
Ld /Users/power/Library/Developer/Xcode/DerivedData/power-aqokegmdybooefaevrcildirndwo/Build/Intermediates.noindex/ArchiveIntermediates/power/InstallationBuildProductsLocation/Applications/Central\ 24\ horas.app/Central\ 24\ horas normal arm64
(1 failure)

@ingridhoffman
Copy link

ingridhoffman commented Feb 16, 2021

I'm having the same issues. I've tried multiple projects and doing the pod removal and install suggested above with absolutely no luck. My xCode is up-to-date so I don't think downgrading react native as suggested above makes much sense. I'm really interested to hear if anyone figures out WHY this is happening.

@michaelVictoriaDev
Copy link

This gives me an answer

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  use_frameworks!
  # use_flipper!
  post_install do |installer|
    flipper_post_install(installer)
  end
end

@Klerith
Copy link

Klerith commented Feb 17, 2021

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

It's incredible that you need to reach this point to make it work, thank you.

@saulo1212
Copy link

hello, I managed to solve my problem, sometimes it can work with you too, my pod was in version 1.10, I just returned to version 1.9, working normal so far.

@jackroc97
Copy link

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

It's incredible that you need to reach this point to make it work, thank you.

This worked for me as well. I had installed the sample project using the instructions on the React-Native website about 4 days ago, and when I went to build today using npx react-native run-ios it failed.

@ujnimz
Copy link

ujnimz commented Feb 21, 2021

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

This worked for me too.. 👏🏻

@svjchrysler
Copy link

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

thanks bro

@SwiftEsther
Copy link

On Feb 8th 2021 still have this shitty error and everywhere is closed

March 1st 2021 for me😢

@CMMNoman
Copy link

CMMNoman commented Mar 2, 2021

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

Worked for me. Thanks a lot.

@SwiftEsther
Copy link

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

Worked for me as well, thanks.

@fdjones
Copy link

fdjones commented Mar 3, 2021

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

Not all heroes wear capes. Thank you.

@johanepu
Copy link

johanepu commented Mar 5, 2021

after change I'm having this error

** ARCHIVE FAILED **

The following build commands failed:
Ld /Users/power/Library/Developer/Xcode/DerivedData/power-aqokegmdybooefaevrcildirndwo/Build/Intermediates.noindex/ArchiveIntermediates/power/InstallationBuildProductsLocation/Applications/Central\ 24\ horas.app/Central\ 24\ horas normal arm64
(1 failure)

I'm also getting this, how did you manage to make it work?

@kosalamoon
Copy link

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

thanks, dude.. u really saved my day

@aralzaim7
Copy link

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

this saved my day!!

@thiagofpaiva
Copy link

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

Dude... you rock!!

@blackforestcode
Copy link

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

It helped, thanks a lot!

@osamagamal7
Copy link

I've been looking for a solution for 2 hours and there's no freaking thing that works.
btw. it works on Android with no issues, so there's nothing wrong with your configurations. this bug is related to the latest react native version, so they have to provide a fix for this.

if you wanna get around this just use another version instead of the latest react native version:
npx react-native init awesomeApp --version 0.60.0
and it'll work fine.

@frezzer0000
Copy link

use_flipper!({ 'Flipper-Folly' => '2.3.0' })

tks you save my day =))

@mealCode
Copy link

use_flipper!({ 'Flipper-Folly' => '2.3.0' })

-->
this version no longer works as of writing. It should be use_flipper!({ 'Flipper-Folly' => '2.5' }) already

@LukhiKartik
Copy link

Screenshot 2021-04-27 at 7 16 08 PM

Getting above error while building ios from xcode 12

@patrykpoborca
Copy link

Same as me, seems to have re-appeared

@alanmatiasdev
Copy link

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

Thanks. Its works here!

@allanzi
Copy link

allanzi commented Apr 28, 2021

Same as me, seems to have re-appeared +1

@kamal-mobile-dev
Copy link

Same as me, seems to have re-appeared +2

@sekizlipenguen
Copy link

Same as me, seems to have re-appeared +1

@southkeys
Copy link

Same +1

@MainProspect
Copy link

MainProspect commented May 2, 2021

use_flipper!({ 'Flipper-Folly' => '2.3.0' }) and use_flipper!({ 'Flipper-Folly' => '2.5' }) didn't work for me.
The only way I could get to build is to comment out use_flipper!() completely.

@aahung
Copy link

aahung commented May 9, 2021

This one should help you: #31480

@fuchien
Copy link

fuchien commented May 31, 2021

@saulo1212 try to replace use_flipper! with use_flipper!({ 'Flipper-Folly' => '2.3.0' }) in your Podfile, then remove Podfile.lock and run pod install

Thanks. Its works here!

@jayporta
Copy link

I followed the directions here without changing any files:

https://dev.to/ravics09/setup-react-native-and-run-app-on-mac-m1-32kk

The key seems to be running everything in a duplicated terminal running on Rosetta.

@manishchandra-resiliencesoft

after change I'm having this error

** ARCHIVE FAILED **

The following build commands failed:
Ld /Users/power/Library/Developer/Xcode/DerivedData/power-aqokegmdybooefaevrcildirndwo/Build/Intermediates.noindex/ArchiveIntermediates/power/InstallationBuildProductsLocation/Applications/Central\ 24\ horas.app/Central\ 24\ horas normal arm64
(1 failure)

after change I'm having this error
** ARCHIVE FAILED **
The following build commands failed:
Ld /Users/power/Library/Developer/Xcode/DerivedData/power-aqokegmdybooefaevrcildirndwo/Build/Intermediates.noindex/ArchiveIntermediates/power/InstallationBuildProductsLocation/Applications/Central\ 24\ horas.app/Central\ 24\ horas normal arm64
(1 failure)

I'm also getting this, how did you manage to make it work?

Me too, did you find any solution?

@kimichenn
Copy link

kimichenn commented Aug 3, 2021

For me, the Podfile came with use_flipper!() instead of use_flipper!, so I just had to remove the () and remove the Podfile.lock and reinstall pod again.

@facebook facebook locked as resolved and limited conversation to collaborators Oct 4, 2021
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Oct 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Platform: iOS iOS applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests