Open devedse opened 4 years ago
@FejZa , Hi, I saw you are one of the active contributers to this repo. I was wondering if this issue can be fixed in the Azure DevOps task?
@FejZa , I was wondering if this issue can be fixed in the future :)
Same problem here...
This behavior occurs in all 2017.x versions.
In 2018.x I don't know, in 2019.x I think it doesn't happen and in 2020.x for sure it doesn't.
@FejZa The way to solve it would be to make sure that the folder exists. Reviewing the code I see that the common point for all the tasks is this runner. You would have to make sure the folder exists before running anything:
https://github.com/Dinomite-Studios/unity-devops-utilities/blob/master/lib/unity-tool-runner.ts
It should be really easy, If you don't have time I can do a PR.
EDIT
Temporarily, to work around this I created a task that makes sure the folder exists and simulated the same code as @FejZa to build the log folder.
I leave it here in case it helps anyone. It uses PowerShell Core so it can be cross platform.
- task: PowerShell@2
displayName: Make sure that the Logs folder exists
inputs:
targetType: 'inline'
script: |
$LogsPath = [IO.Path]::Combine("$(Build.Repository.LocalPath)", "Logs")
if (!(Test-Path $LogsPath)) {
New-Item $LogsPath -ItemType Directory
}
pwsh: true
Thanks everyone. @bdovaz I can fix this over the weekend. Let me know if you plan to do it earlier. If I don't hear back from you, I'll assume I need to fix it. Thanks!
Hi @FejZa
Today was setting up my new pipelines for a Unity 2021 upgrade, and I had the same problem as listed above. Even when forcing the creation of the logs it wouldn't work.
Found the culprit though, I always worked with Build Script Execution method (which refers to a custom BuildGame.cs file), and I passed on a parameter called -Version (so I could set versions inside Unity itself).
If I omit this parameter, it works again! I think it is, because the -Version gets passed on by the Dino task, and recently (since 2021), Unity-Editor.exe accepts a parameters -Version.
So the build task wants to start a tail on the log file, but actually the unity editor just exits with the version number stating !!
Hope this helps improving, love what you guys do!
Reinhart
Hi all, I'm currently trying to setup a build pipeline for an older Hololens project we've got. It's making use of Unity 2017.4.40f1.
The issue I'm running into is that a Unity build starts but never finishes. I've already been checking the existing github issues but I believe I'm running into a different problem as for example: https://github.com/Dinomite-Studios/unity-azure-pipelines-tasks/issues/137.
The reason is, is that once the Unity build starts, I can see the unity.exe process starting in taskmanager (I'm actually using a tool that shows a bit more details named processhacker). But after a few seconds the unity.exe process stops and leaves no trace behind.
From quite a bit of debugging I finally found out what the culprit is. In the directory that's cloned a Logs folder is missing. Apparently the following command fails if there's no Logs directory under the \s\ directory:
If you completely omit the -logfile .... the build also works.
My advise would be to implement logic into the unity-azure-pipelines-tasks to automatically create the \Logs\ directory before starting the build.
Even better would be is that the logging would be automatically piped to Azure DevOps, but I'm not sure if this is possible.
If you guys need, I did create a quite elaborate youtube video showing the problem: https://youtu.be/7OZVh2DDP94
Some usefull timestamps: