Cannot build from CLI anymore Licensing Errors

A while ago I wrote a bash script to build for each of my platforms of choice. But I’m running into problems as of late. I can’t get past licensing.

Here’s the original script I wrote:

total_start_time=$(date +%s)
echo "Starting Clean"
cd ..
rm -rf Builds
mkdir Builds
cd Builds
rm -rf Windows
mkdir Windows
rm -rf Mac
mkdir Mac
rm -rf Linux
mkdir Linux
echo "Build cleaned"
echo ""

echo "Starting Build Process"
echo ""

echo "Starting Windows Build"
start_time=$(date +%s)
projectpath="E:/Users/xxx/"
buildpath="E:/Users/xxx/Builds/Windows/ZED Patrol.exe"
logpath="E:/Users/xxx/Logs/windows-log.txt"
"C:/Program Files/Unity/Hub/Editor/2020.3.43f1/Editor/Unity.exe" -quit -batchmode -projectpath "$projectpath" -executeMethod BuildIncrement.IncrementVersion
"C:/Program Files/Unity/Hub/Editor/2020.3.43f1/Editor/Unity.exe" -quit -batchmode -projectpath "$projectpath" -buildWindows64Player "$buildpath" -logFile "$logpath"
echo "Windows Build Complete"
end_time=$(date +%s)
elapsed=$(( end_time - start_time ))
echo "Windows build took $elapsed seconds."
echo ""

echo "Starting Mac Build"
start_time=$(date +%s)
buildpath="E:/Users/xxx/Builds/Mac/ZED Patrol.app"
logpath="E:/Users/xxx/Logs/mac-log.txt"
"C:/Program Files/Unity/Hub/Editor/2020.3.43f1/Editor/Unity.exe" -quit -batchmode -projectpath "$projectpath" -buildOSXUniversalPlayer "$buildpath" -logFile "$logpath"
echo "Mac Build Complete"
end_time=$(date +%s)
elapsed=$(( end_time - start_time ))
echo "Mac build took $elapsed seconds."
echo ""

echo "Starting Linux Build"
start_time=$(date +%s)
buildpath="E:/Users/xxx/Builds/Linux/ZED Patrol"
logpath="E:/Users/xxx/Logs/linux-log.txt"
"C:/Program Files/Unity/Hub/Editor/2020.3.43f1/Editor/Unity.exe" -quit -batchmode -projectpath "$projectpath" -buildLinux64Player "$buildpath" -logFile "$logpath"
echo "Linux Build Complete"
end_time=$(date +%s)
elapsed=$(( end_time - start_time ))
echo "Linux build took $elapsed seconds."
echo ""

echo "Builds complete"
total_end_time=$(date +%s)
elapsed=$(( total_end_time - total_start_time ))
echo "Total build process took $elapsed seconds."
echo ""

read -p "Hit enter to exit: " enter

I hid the actual path to the game name, but anyway this was all working perfectly fine about a year ago. Recently I had tried running this again and ran into licensing issues, so I tried some stuff I found online like doing -returnLicense, -username/-password, as well as signing out of hub, closing, reopening hub, signing back in then running the script again, which surprisingly after some tinkering, not exactly sure what caused it, it worked again.

Well I am now once again trying to get it to work and I am not having any luck. No amount of logging out and back in again, license returning, etc is working. I can’t even get a simple execute method to work.

Here’s the pared down script I’m trying:

echo "Starting Windows Build"
start_time=$(date +%s)
projectpath="E:/Users/xxx/zed-patrol - Copy"
buildpath="E:/Users/xxx/zed-patrol - Copy/Builds/Windows/ZED Patrol.exe"
logpath="E:/Users/xxx/zed-patrol - Copy/Logs/windows-log.txt"
"C:/Program Files/Unity/Hub/Editor/6000.0.23f1/Editor/Unity.exe" -quit -batchmode -projectpath "$projectpath" -executeMethod BuildIncrement.IncrementVersion
echo "Windows Build Complete"
end_time=$(date +%s)
elapsed=$(( end_time - start_time ))
echo "Windows build took $elapsed seconds."
echo ""
read -p "Press enter to close" enter

This is in process of being updated to Unity 6 thus the copy part, but I have had no luck with the exact same script running against the 2020.3 version. Here is the build log:

User xxx@live.com logged in successfully
[UnityConnect::TryLogin] Request Succeeded.
[Licensing::Module] Trying to connect to existing licensing client channel…
[Licensing::IpcConnector] Successfully connected to the License Client on channel: “LicenseClient-FileThirteen” at “2024-10-27T21:48:20.5432354Z”
[Licensing::Client] Error: Code 10 while verifying Licensing Client signature (process Id: 14856, path: “C:/Program Files/Unity Hub/UnityLicensingClient_V1/Unity.Licensing.Client.exe”)
[Licensing::Module] Error: LicensingClient has failed validation; ignoring
[Licensing::Client] Error: HandshakeResponse reported an error:
ResponseCode: 505
ResponseStatus: Unsupported protocol version ‘1.16.0-alpha.1’.
[Licensing::Module] Error: Failed to handshake to channel: “LicenseClient-FileThirteen”
[Licensing::IpcConnector] License Client channel disconnected successfully.
[Licensing::IpcConnector] Connection attempt to the License Client on channel: “LicenseClient-FileThirteen-6000.0.23” failed because channel doesn’t exist; code: “0x80000002”
[Licensing::Module] Successfully launched the LicensingClient (PId: 35208)
Starting IPC server.
Waiting for clients to connect on \.\pipe\Unity-LicenseClient-FileThirteen-6000.0.23, press Ctrl-C to exit.
[Licensing::IpcConnector] Successfully connected to the License Client on channel: “LicenseClient-FileThirteen-6000.0.23” at “2024-10-27T21:48:20.9426114Z”
[Licensing::Client] Error: Code 10 while verifying Licensing Client signature (process Id: 35208, path: “C:/Program Files/Unity/Hub/Editor/6000.0.23f1/Editor/Data/Resources/Licensing/Client/Unity.Licensing.Client.exe”)
[Licensing::Module] Error: LicensingClient has failed validation; ignoring
[Licensing::Client] Handshaking with LicensingClient:
Version: 1.16.0-alpha.1+3676804
Session Id: 7b8aba7dd4ea42edb6896f157647f659
Correlation Id: ce38904dafa017cfbb43587e1ef3d2f3
External correlation Id: 1732093675645773322
Machine Id: dTRViXOL6C+fChQie5jppRRersE=
[Licensing::Module] Successfully connected to LicensingClient on channel: “LicenseClient-FileThirteen-6000.0.23” (connect: 0.37s, validation: 0.13s, handshake: 0.00s)
[Licensing::IpcConnector] Successfully connected to the License Notification on channel: “LicenseClient-FileThirteen-6000.0.23-notifications” at “2024-10-27T21:48:21.0760739Z”
[Licensing::Module] Connected to LicensingClient (PId: 35208, launch time: 0.00, total connection time: 0.51s)
[Licensing::Client] Successfully updated the access token
[Licensing::Module] Successfully updated the access token tqAPsNDMj5…
[Licensing::Client] Successfully processed license management request
[Licensing::Module] Successfully returned the entitlement license
[Licensing::Client] Successfully queried for the EntitlementGroupsDetails
[Licensing::Module] Error: Serial number unavailable for ULF return; skipping operation
Exiting without the bug reporter. Application will terminate with return code 0Shut down.

I have also tried this with -username and -password, sometimes I get different results like access token unavailable, but when I use -username and -password I do not get access token unavailable, just this Serial number unavailable for ULF return.

I get pretty much identical issues with the 2020.3 version, except the logs are less verbose.

Does anyone know what the heck I am doing wrong? I am afraid that updating Unity Hub is what caused these issues. It’s really annoying switching platforms for building, I’d like very much for this build script to work like it used to.

I’m on windows and running this code as a bash sh script. Again all was working about a year ago with no hitches whatsoever.

Well I take it all back. I’m still trying to figure out exactly what caused it to start working again, but I did all that mentioned futzing around with -returnLicense, etc and it seems like it’s working again…

Edit: Nevermind again. I switched over to trying out the full build script with Unity 6 switched in and it doesn’t work.