Reproduction steps:
1. Download the attached project: "TestBatchmode.zip"
2. Set up Unity in a headless environment (Docker container, headless server, etc.)
3. Upload the downloaded project to the environment
4. Run the following command in the environment: "/path/to/Unity -quit -projectPath /path/to/project -nographics -batchmode -executeMethod Test.Batchmode"
Expected result: The test executes without any issue and the process quits successfully
Actual result: The process gets stuck in a loop with the following being printed in the console:
Starting new worker id: 0 with log in /path/to/project/Logs/AssetImportWorker0.log
Starting new worker id: 1 with log in /path/to/project/Logs/AssetImportWorker1.log
[OnDemand] Worker 0: WorkerState(Connecting), ImporterState(Initializing) worker timed out connecting with editor - while handling artifactKey Guid(00000000000000000000000000000000) Importer(-2,00000000000000000000000000000000) - path - see Logs/AssetImportWorker0.log
Starting new worker id: 2 with log in /path/to/project/Logs/AssetImportWorker2.log
[OnDemand] Worker 1: WorkerState(Connecting), ImporterState(Initializing) worker timed out connecting with editor - while handling artifactKey Guid(00000000000000000000000000000000) Importer(-2,00000000000000000000000000000000) - path - see Logs/AssetImportWorker1.log
Reproducible with: 2021.3.10f1, 2022.16f1
Not reproducible with: 2020.3 (according to some users)
Could not test with: 2022.2, 2023.1 (due to GameCI not having Docker Images of alpha and beta Unity streams)
Notes:
- Not reproducible on a regular Ubuntu 18.04 machine
- Reproduced while using a Docker container within WSL (detailed instructions included below)
- Used GameCI provided Docker Images found here: https://hub.docker.com/u/unityci