'Error occurs in jenkins build of unity

Machine:Mac UnityVer:4.6.2

error of the following will appear when you have made a jenkins build of unity.

----- Total AssetImport time: 6.818127s, AssetImport time: 6.808909s, Asset hashing: 0.005416s [60.9 KB, 10.972655 mb/s]

Platform assembly: /Applications/Unity4.6.2/Unity.app/Contents/Frameworks/Mono/lib/mono/2.0/System.Data.dll (this message is harmless) System memory in use before: 71.7 MB. Unloading 137 Unused Serialized files (Serialized files now loaded: 0 / Dirty serialized files: 0) System memory in use after: 66.8 MB.

Unloading 0 unused Assets to reduce memory usage. Loaded Objects now: 6940. Total: 18.863014 ms (FindLiveObjects: 0.248059 ms CreateObjectMapping: 0.096515 ms MarkObjects: 1.745080 ms DeleteObjects: 0.012070 ms)

Scripts have compiler errors.

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Utilities/Argv.cpp Line: 127)

Aborting batchmode due to failure: Scripts have compiler errors.

Thread 'UnityLookForNewInputDevices' is still running!

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Threads/Thread.cpp Line: 68)

Thread was not cleaned up!

(Filename: /Users/builduser/buildslave/unity/build/Runtime/Threads/Posix/PlatformThread.cpp Line: 45)

FATAL: Unity3d command line execution failed with status 1 Build step 'Invoke Unity3d Editor' marked build as failure FTP: Current build result is [FAILURE], not going to run. Finished: FAILURE



Solution 1:[1]

Try search "error" in Jenkins console output. It's very easy to overlook what actually causing build fail. The error show in the bottom of console output is the result. The useful information is where all warnings and errors are shown like you normally see in IDE like visual studio. I spend a whole afternoon found out I should always use Control + F instead of my eyes to search through things like Jenkins console output.

Solution 2:[2]

The output shows you the problem: you have script errors. Until you fix your script errors, you won't be able to build.

You haven't included the script errors, so no-one can give you any more info. When you fix them, you'll probably find that it's nothing to do with Jenkins, and the question title is unrelated.

Usual causes of this:

  1. You have some editor scripts in you project
  2. You forgot to put #if guards around editor scripts and/or external scripts
  3. You forgot to copy/paste one of your 3rd party libraries or plugins onto the machine where you're doign the build - and it's not in source control already (where it should be).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 ?neko
Solution 2 Adam