Zombie: Archiving Failed using Integration Menu
Asked Answered
J

1

6

When I tried to archiving the project directly using Xcode menu (Product - Archive), it works well. But when I tried to execute it from the Integration menu (bot), I got this error:

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.

What happen? I couldn't find any error messages and completely have no clue on what's going on. I have tried to reboot the macmini and also revert the changes but it still.

Jemappes answered 26/1, 2018 at 8:0 Comment(0)
R
6

UPDATE (Edit 3)

The issue has been fixed on Xcode 11, from beta 3:

  • Xcode uses response files by default to pass input files to the Swift compiler. To turn this behavior off, set USE_SWIFT_RESPONSE_FILE to NO.

  • You can use an unlimited number of Swift files in a target. (35879960)

Old answer

I've only seen this error arising when the total of files (notice all their respective absolute paths count) exceed the command line length limit (looks like it's imposed by the OS, currently 262144 bytes on my rMBP). It's a known issue.

To fix this (AFAIK), you have 2 options:

  • Fast (short term): Put your project on a shorter path on the server (like moving the project from /Users/mrjimoy_05_server/myprojects/mycoolproject/ to /p/mycoolproject)

  • Better (long term): While the first solution might work, for now, you'll probably reach the same point where you're now in the near future. So a better solution is to modularize your app (separate it into frameworks/projects). Since every module will get built separately, it'll be much harder to reach the limit and get this error again.

I hope it helps.

PD: Looks like the error thrown by the New Build System is:

unable to spawn process (File exists)

Edit 1

The error thrown by the New Build System on Xcode 10 now is:

unable to spawn process (Argument list too long)

Edit 2

The Swift team have solved this issue, but it also needs some work from the Xcode team, which hasn't been done yet on the latest released Xcode version (10.2)

Running answered 30/1, 2018 at 16:15 Comment(8)
Hi @Luis Arcorbe, thank you for your suggestion. But how to make sure the path? It works on common Xcode build, but doesn't work on the Integration Bot, which then I couldn't determine the file location.Jemappes
Ah ic, it works now, I am using your Fast solution for now and will implement the rest soon. Thank you! :)Jemappes
I am facing this issue in objc project, do you have any solutions?Zeidman
@ooops AFAIK this only happens with Swift files. Can you elaborate? What exact error? Project config?Running
@LuisAscorbe Error is unable to spawn process (Argument list too long), all script phase show this error. Config may changed I don't know much. I am using Xcode 11 Beta 7.Zeidman
@ooops are you using CocoaPods? How many dependencies you have?Running
I am new to XCode. How/where do I set USE_SWIFT_RESPONSE_FILETrophoplasm
You shouldn't need to do that. But if you really need to: got to Build Settings and add USE_SWIFT_RESPONSE_FILE with the + button at top.Running

© 2022 - 2024 — McMap. All rights reserved.