Build fails but no 'error' in logs

Hi,
I’m new to cloud build, and not a particular expert in unity or source control either, so maybe (probably,hopefully) i’m doing something stupid…
My attempts to cloud build are all failing, but when i look through the logs, there are no specific ‘errors’ recorded. There are plenty of warnings about deprecated commands in scripts and shaders (that I’m not using) but nothing that indicates the cause of the issue…
here is an excerpt from the end of the compact log, containing the only red/error bits:
154: [Unity] Player export failed. Reason: 2 errors
155: ! build of ‘frtestwin’ failed. compile failed
156: publishing finished successfully.
157: Finished: FAILURE

so it says 2 errors but there aren’t any errors in the compact log, and I’ve looked at the full log as much as i could endure (so i haven’t read every line but I’ve scanned it, looked for red markers, and searched for words like ‘error’).

I would put this all down to me doing something wrong with the source control config, however my initial builds did work. I had a pretty simple test scene (but with most of the basic functions, 3rd party assets and requirements in place) when i first setup the source control and then cloud build. The scenes built ok, they were just missing some textures and stuff (that i had left in some temp folders that i excluded from source control)…but this just demonstrates to me how the cloud build can adapt to some missing things anyway.
Since then I’ve created a new scene, updated and added assets and whatnot, and committed it all to source control…I’ve switched between branches in source control and the game will run in unity and i can build locally fine, so i’m pretty confident everything that’s needed is in the source control.

but still my builds fail.

I’ve tried clean builds, i’ve tried deleting and recreating the target builds, I’ve enabled and disabled the library cache. I’ve tried building to win32, win64 and webgl, i’ve tried building to specific versions of unity ( using the ‘latest’ 5.4, the 5.4 version to match my install, 5.3 version to match my previous install when i started the project etc.), I’ve tried building from the different branches in my source control. I’ve also tried specifically building the original test scene instead of my new scene, and it still fails, when nothing with it has really changed since it did build.

So I’m thoroughly confused. If anyone has any ideas or suggestions that would be great. Also, if there are any known constraints that could stop a build working, like say if a texture was over x MB or whatever, that would be handy to know as there could be stuff like that sitting in the folders of the example assets I’ve included…

If you’re still reading after all that, thanks for your time!

1 Like

Started getting the same issued. Everything looks fine, no errors and finishes failed.

I am also having a similar problem here. Locally everything build & runs fine but on cloud build I started getting this:

20237: [Unity] *** Cancelled ‘Build.Player.iOSSupport’ in 263 seconds (262629 ms)
20238: [Unity] Player export failed. Reason: 2 errors

Also tried disabling library caching, changing a few build options, etc. to no avail. I’d appreciate if someone from Unity could look into this…

We’ve been getting this too. Used to work but had no luck building at all today. Log shows no errors until:

6429: [Unity] *** Cancelled ‘Build.Player.iOSSupport’ in 1 seconds (811 ms)
6430: [Unity] Player export failed. Reason: 2 errors

Stops there on the Unity export. Doesn’t even get to XCode or Android building.

Same thing here on iOS. Could the “Use the latest version” setting be causing this? When going back to the latest working build in the history tab it seems like that running xcode 7.0, instead of 7.3.1 as in the failing build. What is the best practice for long term projects, use the default setting “latest version” or manually set it to avoid broken automated processes when the cloud build system bumps the version?

We are also experiencing this problem as of yesterday. Local builds are still working fine. Had no issues with cloud build prior to this.

Changing to xcode 7.0 worked for me. This thread seems to be related to my problem: Error "unknown type name __declspec" after Xcode 7.3 upgrade - Unity Engine - Unity Discussions Also getting that “#define NORETURN __declspec” error. So it seems like it can be solved building to 7.3.1 locally, but I wonder if there is a way to solve this in Cloud Build as well?

Getting this on Android too so that’s likely a different error.

I am also getting this error, both on Android and iOS.

[Unity] Player export failed. Reason: 2 errors

I have many yellow warnings but no red error in the compact log, so there’s really no way to figure out what are those two errors. Local builds also work fine for me though, but I’m depending on the Cloud Build for iOS, as I am a Windows user.

I’ve been away for a few days, come back and saw all the replies and hoped for a solution…still, at least we can all suffer together! :slight_smile:

Did some more testing. I wonder if the lack of errors in above descriptions is because you look in the compact log? For me, that is full of yellow, and finishing with “2 errors generated”, and failing. Then looking in the “Full log”, showing the “il2cpp-config.h:181:18: note: expanded from macro ‘NORETURN’”-error. When building locally to xcode with the same versions, I also get the NORETURN code inlined into il2cpp-config.h. I can then delete that code and compile again, and it works. But how can you do that in UCB? Is it possible to edit the source of that file in a PostProcess? (Unity - Scripting API: PostProcessBuildAttribute)

Nope, full logs. No error except for the error saying there were 2 errors. I have a ticket with Unity support and they said:

and then nothing since (that was 8 days ago.)

Whilst I’m not using the cloud build services, I am now also being hit with this same issue. I’ve taken a project that builds fine in 5.3.6 and branched it to test 5.4.1, both android and iOS on our build server and local builds are failing with this same mysterious “2 errors” message, when the only things that look like errors appear in the working 5.3.6 logs as well.

Been trying to track this down for a few days now with almost no luck. For some reason this morning iOS builds seem to now be getting passed this “2 errors” issue and are now failing later down the line due to some xcode/gym issues. But I can’t work out why iOS has started to work as no changes to the project have occurred since builds that were failing.

It seems like it is not the unity version in and of itself however, as we have a practically blank template project that is running builds on 5.4.1 without any problems at all.

If @mikensecretlocation_1 can update us if/when unity provide more information that would be great.

sigh, I’m also now having the problem as of yesterday. No found errors on a full report log. Though I have 186 errors. However I know that this 186 was specifically from PlayMaker caused a failure 10 or so builds ago and was resolved and there is no more PlayMaker errors.

I did a search for the NORETURN issue, but found no such issue in the full log. :
I also did a full clean build all. With no success.

If anyone has found any other solutions it would be fantastic to hear.

hmm. so I did some experimenting. I decided to add a new build configuration to the project. I tried the new build configuration. The new build failed, however the build failed with the same 186 errors, AND there were error logs. I don’t know if this solution is the same for other people. But it’s something to try out.

From just an observation it seems the error lines are not being added to the log.

I just tried adding a new build configuration as was suggested and got the same error as before:


20779: [Unity] *** Cancelled ‘Build.Player.iOSSupport’ in 276 seconds (276190 ms)
20780: [Unity] Player export failed. Reason: 2 errors

20799: ! Unity player export failed!
20800: ! build of ‘new-ios’ failed. compile failed

20808: Build step ‘Execute shell’ marked build as failure
20809: postbuildstatus finished successfully.
20810: Finished: FAILURE

There are no errors in the full logs and I believe I’ve tried everything I could try at this point. Needless to say local builds are just fine and I am only seeing this in the cloud builds. Attaching the full log in case it’s useful to someone from Unity (Assuming they are interested in fixing this).

2803364–203553–FullLog.txt (1.93 MB)

We’ve had the same problem with one project since mid July, another one started behaving this way about two weeks ago.

I have two long support cases with Cloud Build, and after a lot of testing with different Unity versions they are now going to try and reproduce the errors.

Will get back to you with whatever response I get.

Got an answer from Unity, next things to try is:

“We don’t support using CocoaPods in Cloud Build at this time, so could you please try committing the relevant SDK files you need directly to the project and see if the build succeeds afterwards?”

Since Android builds fail as well i doubt it will be the solution. Let me know if it works for any of you!

Thanks for the suggestion but it doesn’t work for me, I don’t use Cocoa pods or any external SDK, just pure Unity. Did they say anything about how to understand what is wrong when there are no errors being logged in the build output?

Hi, I’m experiencing the exact same issue for Android builds. The project does not consume external SDKs nor plugins and yet the output is:

[Unity] UnityEngine.Debug:LogWarning(Object)
[Unity] Player export failed. Reason: 2 errors
! build of ‘default-android’ failed. compile failed
publishing finished successfully.