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
- Selecting “New Sub Scene” after assigning “New Scene” in Sub Scene Script Component throws “Destroying GameObjects immediately is not permitted” in the Console window
- Shader Graph "Zoom Step Size" can be set to 0 even though the zoom still works
- Enabling/Disabling the Deprecated Nodes doesn't apply to the opened Shader Graph unless any Variable is added to the Blackboard
- Group Selection title text size is smaller in renaming than the actual font size
- Shader Graph validation errors are not pointing to the right implementation
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