Search Issue Tracker
Won't Fix
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
- The tag adder functionality does not work if a space is entered instead of a name
- Errors thrown in the Console when configuring In-App Purchases package
- Longer Scaler Profile names go out of the"Scaler Profilers" section
- AI Navigation window UI elements overlap when the AI Navigation window is docked and resized
- Editor freezes after some time when using NavMeshQuery::Raycast
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