Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The STDIO streams did not close within 10 seconds of the exit event from process #189

Open
bdovaz opened this issue Oct 29, 2021 · 7 comments

Comments

@bdovaz
Copy link
Contributor

bdovaz commented Oct 29, 2021

@FejZa We have this problem when we target Android in an Oculus Quest 2 project with the official Oculus asset.

If I copy the same command line out of Azure Pipelines, the process ends up correctly.

If I run it from Azure pipelines with the UnityBuild task, it stays forever until the 60 minutes timeout.

I use a custom -executeMethod with -quit flag.

Cleanup mono
Exiting batchmode successfully now!
The STDIO streams did not close within 10 seconds of the exit event from process 'D:\tools\Unity\2020.3.17f1\Editor\Unity.exe'. This may indicate a child process inherited the STDIO streams and has not yet exited.
Unwatch D:\agent\_work\20\s\Logs\UnityBuildLog_2021-10-29-11-24-34.log
=============================== UNITY LOG END ================================
The Unity build completed successfully
##[error]The operation was canceled.
@BogdanDidukh2003
Copy link

Hello, I have the same issue, but in one try out of 10 it works as suppoused

@bdovaz
Copy link
Contributor Author

bdovaz commented Aug 30, 2022

@FejZa How are you doing with this? Did you come to any conclusions? Did you make any progress? We are still affected by it.

Thank you.

@Storm-Develop
Copy link

Same issue here:
The STDIO streams did not close within 10 seconds of the exit event from process 'C:\Program Files\Unity\Hub\Editor\2020.3.33f1\Editor\Unity.exe'. This may indicate a child process inherited the STDIO streams and has not yet exited.

@NorbertNemec
Copy link

I'm newly encountering this issue after migrating from Unity 2021.3.21f1 to 2022.3.7f1. In my case, it happens on all calls to UnityBuildTask and UnityCMDTask (with -quit which correctly causes the process to exit).

I'm rather desperate - does anyone here have a workaround?

@marek-stoj
Copy link

Same issue here. Unity 2020.3.34f1.

@NorbertNemec
Copy link

Since my last post, I managed to find a reasonable workaround, by adding a dummy task before the actual UnityCMDTask:

  • task: UnityCMDTask@1
    displayName: UnityCMDTask Workaround Dummy
    inputs:
    unityProjectPath: $(Build.SourcesDirectory)\MyProjectPath
    cmdArgs: -quit
    timeoutInMinutes: 5
    continueOnError: true

That task starts loading the project (which takes a few minutes anyway), then do nothing and time out after a few minutes. The subsequent UnityCMDTask would then start up rather quickly (since the caches are already filled by the dummy task), but since the project had been loaded before, the original issue of the hanging child process would no longer appear and everything would work just fine from there on.

The drawback of this approach is that the aborted continueOnError task would leave the entire job in a yellow warning state, even though it is technically fully successful.

@marek-stoj
Copy link

In my situation it is an adb.exe process that is kept running that prevents the job to continue. When I kill the process, the build succeeds. It is weird because the same codebase (with slight variations) on a different branch doesn't use adb at all and the build completes without issues 😕

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

No branches or pull requests

5 participants