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
- Font character thickness does not adjust properly in UI Toolkit text when changing Bold Weight in Font Asset
- Multiple "[...] is inaccessible due to its protection level" errors are thrown when opening project with Unity Version Control installed
- Sorting icons are tiny and misaligned in Import Activity window
- The Undo system does not record HideFlags.HideInHierarchy changes
- [Linux] Bug Reporter window is in Light mode when the Editor theme is Dark mode
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