Search Issue Tracker
Won't Fix
Won't Fix in 2023.2.X
Votes
0
Found in
2022.2.8f1
2023.1.0b5
2023.2.0a2
Issue ID
UUM-28536
Regression
No
[Batch Mode] “Error building Player: A domain reload is pending” when launching a batch build via CMD
Steps to reproduce:
1. Uncompress the attached user's project but do not open it "BuildFailureRepro.zip"
2. Run the following command "[PathToUnity]\Unity.exe" -batchmode -nographics -quit -buildTarget Android -projectPath [PathToProject] -logFile log.txt -executeMethod Builder.BuildAndroid
3. Open log.txt and see the build error
Expected results: batch mode build is successful
Actual Results: batch mode build fails on "Error building Player: A domain reload is pending."
Reproducible on: 2022.2.8f1, 2023.1.0b5, 2023.2.0a2
Could not effectively test on 2020.3.45f1 and 2021.3.19f1 due to batch mode failing however no error is accompanied
Could not test on 2023.2.0a3 and 2023.2.0a4 due to crashing during batch build and Android Platform not being found
Notes:
-The issue is reproducible on both Windows and macOS. The build error only occurs if the project wasn't opened before. Deleting the library resets the repro project
-Build Log is attached as "Log.txt"
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Video preview in the Inspector freezes shortly after the first play and does not recover until paused and replayed
- MSB3277 conflicts between different versions of "System.Numerics.Vectors" when using DotNet 11.0
- "Cannot create Settings Providers for: CreateAllChildSettingsProviders" error is thrown in the Console after fixing PolySpatial visionOS package validation error after installing XR Interaction Toolkit VisionOS Sample
- "Unable to find style 'VideoClipImporterLabel' in skin 'GameSkin' " warning thrown when converting the Video Clip Inspector to a floating window in Play mode
- Unclear "Failed to start primary listening socket" error when launching the Multiplayer Play Mode second player and many Unity instances are running
Resolution Note:
This behavior is by design: changing the build target and making a player build is not possible in the same batch mode execution as the build target change requires scripts to be reloaded.
To fix the problem, split the execution in two batchmode commands:
[PathToUnity]\Unity.exe" -batchmode -nographics -quit -buildTarget Android -projectPath [PathToProject] -logFile log1.txt
[PathToUnity]\Unity.exe" -batchmode -nographics -quit -projectPath [PathToProject] -logFile log.txt -executeMethod Builder.BuildAndroid
Resolution Note (2023.2.X):
This behavior is by design: changing the build target and making a player build is not possible in the same batch mode execution as the build target change requires scripts to be reloaded.
To fix the problem, split the execution in two batchmode commands:
[PathToUnity]\Unity.exe" -batchmode -nographics -quit -buildTarget Android -projectPath [PathToProject] -logFile log1.txt
[PathToUnity]\Unity.exe" -batchmode -nographics -quit -projectPath [PathToProject] -logFile log.txt -executeMethod Builder.BuildAndroid