Git Product home page Git Product logo

Comments (15)

dtretyakov avatar dtretyakov commented on August 16, 2024

@btsslawa, sorry if it was not clear from the plugin description, but in case of custom unity installation folder you need to specify UNITY_HOME environment variable on your build agent machine, not in the build configuration parameters.

Then you need to restart TeamCity build agent and check on the agent configuration parameters page that it has defined parameter starting with unity.path.

Also in the teamcity-agent.log file you could find mentions of found unity installations.

And thanks for describing use case with Unity installation on custom drive, we'll support automatic detection of it in further versions.

from teamcity-unity-plugin.

dtretyakov avatar dtretyakov commented on August 16, 2024

Relates to JetBrains/resharper-unity#850

from teamcity-unity-plugin.

dtretyakov avatar dtretyakov commented on August 16, 2024

@btsslawa, you could update your plugin to the latest build where your use case is supported without tricks with hint paths: https://plugins.jetbrains.com/plugin/11453-unity-support

Please let me know if it solves the problem.

from teamcity-unity-plugin.

btsslawa avatar btsslawa commented on August 16, 2024

Thanks for the update! Highly appreciated. Installed the plugin and restarted TeamCity, run the build but I still get the very same error.
Here's a screenshot of my buildstep.
buildstep
And here's a screenshot of my Unity Installations folder with all the installed versions, Unity Hub was also installed there and points to this directory to install the respective Unity versions, which is
"D:\Programme\Unity" in my case:
unityinstallations

Did I miss something with the plugin update?

from teamcity-unity-plugin.

dtretyakov avatar dtretyakov commented on August 16, 2024

@btsslawa, could you please share the list of parameters prefixed by "unity.path" from the %agent% ->Agent Parameters -> Configuration parameters page?

Also please remove the f1 prefix in the "Unity version" build step parameter, since on the Unity plugin reports normalized version parameters.

from teamcity-unity-plugin.

btsslawa avatar btsslawa commented on August 16, 2024

I removed the f1 prefix, thanks for the hint!

I looked at the Agent Parameter Page and it was empty:
configparamsempty

I added a parameter like this:
configparams

Run again, same error.

Sorry to annoy you with this, never worked with CI tools before...

from teamcity-unity-plugin.

dtretyakov avatar dtretyakov commented on August 16, 2024

@btsslawa,

%agent% ->Agent Parameters -> Configuration parameters page?

It looks like that:
image

There find parameters prefixed by "unity.path" and ensure that all Unity Editor versions are mentioned there:
image

If you could not find them in the list but you see them in the "Unity Hub" in Installs -> On my machine section please share the editors.json and the secondaryInstallPath.json from the %AppData%\UnityHub\ directory.

Thanks.

from teamcity-unity-plugin.

btsslawa avatar btsslawa commented on August 16, 2024

Ah, that list. No, there are no unity.path configuration parameters in that list available.

editors.json looks like this:

{"5.4.5p3":{"version":"5.4.5p3","location":["D:\Programme\Unity\5.4.5p3\Unity\Editor\Unity.exe"],"manual":true},"2018.3.6f1":{"version":"2018.3.6f1","location":["D:\Programme\Unity\Hub\Editor\2018.3.6f1\Editor\Unity.exe"],"manual":true}}

This seems weird, since the path of the 2018.3.6f1 version does not exist at all.

And secondaryInstallPath.json looks like this

"D:\Programme\Unity"

from teamcity-unity-plugin.

dtretyakov avatar dtretyakov commented on August 16, 2024

@btsslawa, thanks for details. It looks like Unity Hub does not properly escape special characters in paths, e.g.:

{
	"5.4.5p3": {
		"version": "5.4.5p3",
		"location": ["D:\Programme\Unity\5.4.5p3\Unity\Editor\Unity.exe"],
		"manual": true
	},
	"2018.3.6f1": {
		"version": "2018.3.6f1",
		"location": ["D:\Programme\Unity\Hub\Editor\2018.3.6f1\Editor\Unity.exe"],
		"manual": true
	}
}

is not valid JSON and should look like that:

{
	"5.4.5p3": {
		"version": "5.4.5p3",
		"location": ["D:\\Programme\\Unity\\5.4.5p3\\Unity\\Editor\\Unity.exe"],
		"manual": true
	},
	"2018.3.6f1": {
		"version": "2018.3.6f1",
		"location": ["D:\\Programme\\Unity\\Hub\\Editor\\2018.3.6f1\\Editor\\Unity.exe"],
		"manual": true
	}
}

Could you please report your Unity Hub version and update editors.json file content by correct value?

Then please open the %buildAgent%/config/teamcity-agent-log4j.xml file, remove comments before and after <priority value="DEBUG"/> line in the following section and restart TeamCity build agent:

<category name="jetbrains.buildServer">
    <!--DELETE THIS LINE FOR ENABLING DEBUG LOGGING--> <!--
    <priority value="DEBUG"/>
--> <!--DELETE THIS LINE FOR ENABLING DEBUG LOGGING-->
    <appender-ref ref="ROLL"/>
  </category>

After that please share the teamcity-agent.log file for investigation. Thanks.

from teamcity-unity-plugin.

btsslawa avatar btsslawa commented on August 16, 2024

Oh, there seemed to be a problem with copy&pasting into this comment section, the files do have the escaped slashes:
jsonfile

My Unity Hub version is the latest one, updated it today: 1.6.0
Here's the attached log file:
teamcity-agent.log

from teamcity-unity-plugin.

dtretyakov avatar dtretyakov commented on August 16, 2024

@btsslawa, thanks for the logs.

Do you use the same user account to run TeamCity build agent and for log in to this machine? It maybe the case that you're running TeamCity build agent under Local System user account which does not have access to Unity Hub configs. To check it open Services -> "TeamCity Build Agent", specify user account credentials and restart build agent:

image

If it helps you could restore logging section in the teamcity-agent-log4j.xml file.

from teamcity-unity-plugin.

btsslawa avatar btsslawa commented on August 16, 2024

I only have one user on my PC. Looking at the "My Settings & Tools"-section of TeamCity the username is different from the user name of my OS/machine.

I looked at the Build Agent Property as you suggested and it was set to "Local System Account", the "Allow Service to interact with Desktop" was also set.
I changed that to the user name I use for my PC/machine, restarted TeamCity and tried to run the build again => same issue.

from teamcity-unity-plugin.

dtretyakov avatar dtretyakov commented on August 16, 2024

@btsslawa, could you please check that any "unity.path" parameters has been appeared on the
agent "Configuration parameters" page after build agent restart?

If you could not see them please share the fresh teamcity-agent.log file for investigation?

from teamcity-unity-plugin.

btsslawa avatar btsslawa commented on August 16, 2024

I got it working! I noticed that for some reason the build agent was disconnected, apparently after I changed the property in the Service. Started the service again manually and the build kicked off immediately. Now I see all the unity.path variables with the correct paths in the configuration parameter list. Awesome :)

Highly appreciate all the help @dtretyakov

from teamcity-unity-plugin.

dtretyakov avatar dtretyakov commented on August 16, 2024

@btsslawa, great. Will reflect notes about user account in readme file.

from teamcity-unity-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.