React-native: Build operation failed without specifying any errors for React Native XCode project

Created on 20 Dec 2016  路  16Comments  路  Source: facebook/react-native

have a React Native project that works fine most of the time(Android and iOS). But sometimes out of nowhere I receive this error when I am trying to build the Xcode project (Xcode or react-native run-ios):

Build operation failed without specifying any errors.
Individual build tasks may have failed for unknown reasons.
One possible cause is if there are too many (possibly zombie)
processes; in this case, rebooting may fix the problem.
Some individual build task failures (up to 12) may be listed below.

How do I solve this? Push to a branch on git, fresh clone, npm install, and all is working fine for a period. And after that the problem will repeat. Making fresh clones of project each time is a pain and takes long time. Is there another way or something that I don't know?

Maybe a some files that are in .gitignore is causing the problems, and after a fresh clone that solves the problem. This is the .gitignore file for my iOS project:

build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace

stackoverflow link

Locked

Most helpful comment

I still got this issue after upgraded to RN 0.42. Even with a fresh project. I had to copy/paste my node_modules every time I want to write some native Android Code... Pretty annoying :(

All 16 comments

I have this issue too since updating to react-native 0.39 from 0.34 yesterday. Which version do you use @kingadrianzghibarta ?

@MatthieuLemoine I use version 0.38.1, on 0.38.0 this issue wasn't present.

@kingadrianzghibarta Have you tried to downgrade RN to 0.38.0 ?

@MatthieuLemoine No, I am waiting 0.40 version.

any update? I have the same problem

@knot123 no update at the moment. Now I am using 0.40 version and this problem appears only some times, and I think is somehow related to Android Studio, because very often this problem occurs after making some operations in AS.

@AdrianZghibarta i also think that it's related to Android Studio as it began to happen to me when i started to test my app on Android. I was only testing on iOS before that for several months without problems.

@MatthieuLemoine You're right. It seems to be related to Android Studio. Every time I launch it, I've have this issue with XCode just after :(

@Crash-- I definitely think that it's related to Android Studio as I had no issue for a week before i opened Android Studio again and build from it instead of building from CLI and then XCode build broke again 馃槥 .

Nuking node_modules and avoiding to build with Android Studio seems to fix this issue.

I still got this issue after upgraded to RN 0.42. Even with a fresh project. I had to copy/paste my node_modules every time I want to write some native Android Code... Pretty annoying :(

Any idea why this sometimes happens? I'm having the same problem and I usually develop iOS e Android +- at the same time

@jpamarohorta Not sure why it happens, but I can fix it by deleting node_modules and re-running yarn (or npm install).

I can only guess that Android Studio is somehow changing stuff in node_modules but as I ignore the folder in git, I have not been able to see what. Perhaps we should try adding it to git, then see what has changed when the error occurs? Will report back what I find!

Wtg @robwalkerco Thank you

remove the React Native Bundle script from Build phase solves me.

Hi there! This issue is being closed because it has been inactive for a while. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. Either way, we're automatically closing issues after a period of inactivity. Please do not take it personally!

If you think this issue should definitely remain open, please let us know. The following information is helpful when it comes to determining if the issue should be re-opened:

  • Does the issue still reproduce on the latest release candidate? Post a comment with the version you tested.
  • If so, is there any information missing from the bug report? Post a comment with all the information required by the issue template.
  • Is there a pull request that addresses this issue? Post a comment with the PR number so we can follow up.

If you would like to work on a patch to fix the issue, contributions are very welcome! Read through the contribution guide, and feel free to hop into #react-native if you need help planning your contribution.

Was this page helpful?
0 / 5 - 0 ratings