Skip to content
This repository has been archived by the owner on Nov 12, 2019. It is now read-only.

Incompatible Agents #24

Open
tylo opened this issue Sep 4, 2015 · 14 comments
Open

Incompatible Agents #24

tylo opened this issue Sep 4, 2015 · 14 comments

Comments

@tylo
Copy link

tylo commented Sep 4, 2015

I am using TeamCity version 9.1.1 (build 37059)

So I've gone through a lot of hoop jumping updating a TeamCity installation I inherited from an old co-worker, and not understanding that TEAM_CITY_DATA_PATH was not where I thought it was...but after a few hours I did eventually install this plugin correctly and removed the old one...

I even had to uninstall a buildAgent that was stuck in an endless loop of failed updates. Reinstalling it fixed that.

Now I have my final hurdle, and sadly will go to sleep with unresolved conflict, because I am absolutely stumped.

When I try to run a build, I am met with the following error and reason:

Incompatible runner:
Unity

Unmet requirements:
unity.latest exists

I even shutdown the Agent, deleted its plugin folder, and restarted it (thus forcing an update to the Agent). I was paranoid it was somehow still getting the old Unity plugin. I understand it pulls the data from the TEAM_CITY_DATA_PATH and installs some plugins into its own local directory.

However, this still happens. I have no idea if it is anything I can fix. I have also tried specifying the Unity version I have installed, but that also does not work.

If it helps, I have Unity 5.1.3p1 installed. I'm not sure if it is required that I have a non-patch release installed with the way unity.latest currently works. Explicitly typing in 5.1.3p1 also did nothing.

EDIT: I just noticed that, for some reason, Unity does not appear as one of the supported Build Runners in my Agent's Build Runners tab. I am unsure how this is possible, because it is being added to the plugins folder, I can see it there.

EDIT 2: I was just looking through my teamcity-agent.log file, and came across this error.

[2015-09-04 01:02:18,552]  ERROR -    jetbrains.buildServer.AGENT - Exception getting finding unity versions :\Applications 

However, it is an error you would expect, running on a Windows installation. The rest of the log claims that unityRunner is indeed running, so I am unsure if this has anything to do with the problem. I imagine not, or else it wouldn't work for anybody on Windows.

@MitchellBurton
Copy link

Sounds like you are running in to the same problem I had. Take a look at my PR: #22. You will also need #20 to build it.

I might put a prebuilt version up somewhere if I can be bothered this coming weekend, seen as how it is an issue for people.

@radiatedpixel
Copy link

i'm having the very same issue. any chance you'll release a fixed prebuilt version?

@PIGOS
Copy link

PIGOS commented Dec 10, 2015

Same issue. PR: #22 doesn`t work for me. Anyone have a idea?

@tylo
Copy link
Author

tylo commented Dec 10, 2015

I gave up myself and ended up just ran my own commandline with custom variables filled in per project. That's essentially what this plugin does, but it has added convenience of monitoring Unity versions.

@PIGOS
Copy link

PIGOS commented Dec 10, 2015

Yes, but right now it doesn't work (for me) so...
Can you send me your commandline? this will help me, and I will not repeat the same work you have already done. Thanks

@tylo
Copy link
Author

tylo commented Dec 10, 2015

cmdline

@tylo tylo closed this as completed Dec 10, 2015
@tylo tylo reopened this Dec 10, 2015
@hex
Copy link

hex commented Jan 11, 2016

Text version, replace or remove -buildTarget webgl with the desired platform, also check the paths.

"C:\Program Files\Unity\Editor\Unity.exe" -batchmode -quit --build_path=C:\Builds\WebGL -projectPath %teamcity.build.checkoutDir% -buildTarget webgl -executeMethod BuildHelper.BuildWebGL -cleanedLogFile C:\TeamCity\buildAgent\temp\buildTmp\cleaned-%teamcity.build.id%.log -nographics

@weltenbauer
Copy link

Possible workaround for the issue:

  • Leave Unity-Version and Unity-Executable field in the build step setting blank
  • Create a symbolic link from "C:\Program Files (x86)\Unity" to "C:\Program Files\Unity (YOUR-VESION)" by using the cmdline tool "mklink /J"

@ohmaya
Copy link

ohmaya commented Jul 13, 2016

@weltenbauer

Although you got 2 thumb-ups, it's hard to understand how this can be a workaround (how this can make an incompatible runner compatible) and actually it doesn't work for me.

@AliZaibVR
Copy link

Hello Guys I am new to TeamCity and running into exactly the same issue.
As @tylo suggested to make Unity build using command line.
Need to where and how can I put command line in TeamCity to make Unity's build.
Quick feedback would be great

@hex
Copy link

hex commented Sep 18, 2017

Hi @AliZaibVR

Just add a build step with the Command Line runner type and enter your unity build command there.

Example

@AliZaibVR
Copy link

Hello @hex
Thanks for the help and quick response. Things are lot clear to me.

I am trying command line arguments as you said.
We are passing variables like build target, build path etc in command line. How do we access it in the executeMethod ? Because we need these values to pass in "BuildPipeline.BuildPlayer(levels, locationPathName,target)" function in executeMethod.

@hex
Copy link

hex commented Sep 19, 2017

@AliZaibVR You can pass params to executeMethod but I never used it myself. From Unity Documentation:

Execute the static method as soon as Unity is started, the project is open and after the optional Asset server update has been performed. This can be used to do tasks such as continous integration, performing Unit Tests, making builds or preparing data. To return an error from the command line process, either throw an exception which causes Unity to exit with return code 1, or call EditorApplication.Exit with a non-zero return code. To pass parameters, add them to the command line and retrieve them inside the function using System.Environment.GetCommandLineArgs. To use -executeMethod, you need to place the enclosing script in an Editor folder. The method to be executed must be defined as static.

I for example, use multiple methods for different scenarios. What is your case?

@AliZaibVR
Copy link

Oh. I missed it while reading it. I can access them using System.Environment.GetCommandLineArgs.
My case is simple and same as yours. I am going to create multiple build configurations on teamcity that will run different executemethods and these executemethods will handle different scenarios.
Thanks @hex for the help and quick response.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants