-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
License activation failure cause exit code 0 #64
Comments
Closed. For details - @webbertakken |
Thank you for reporting this issue. This is a bug in Unity editor itself, which doesn't omit a non-zero exit code when hardware ids mismatch or in some cases where invalid licenses are given. Workaround Most people move past this by fixing their activation while setting up their project, since the actual build step uses proper exit codes (which you can extend yourself inside the build script). Additional information It's a bug that predates this very repository and has been reported in unity-actions, unity-builder and in repository of the preceeding images gableroux/unity3d and the gableroux/unity3d-gitlab-ci-example. Since we can't rely on exit code (pre-build-time anyway) we would have to either inject something in the binary or somehow extract the right information out of the output. So far nobody has come up with a reliable way to do this. To anyone reading this, feel free to reopen if you have suggestions on how to solve this in an elegant way. |
In some failing cases, the output will be different. tl; drHow to check activation result: unity-editor -quit -logFile activation.log -manualLicenseFile <UNITY_LICENSE_FILE>
[ -z "`grep -e 'Next license update check is after' activation.log`" ] && echo 'error: Failed to load license file'
[ -n "`grep -e 'Failed to load license file from' activation.log`" ] && echo 'error: Failed to load license file'
[ -n "`grep -e 'LICENSE SYSTEM.* != ' activation.log`" ] && echo 'error: Machine ID is different' Success
Failed: Machine ID is different
Failed: The input file is not found
Failed: The input file is empty
Failed: The input file is alf
Failed: The structure of the input file is different
|
Edit: I missed the Should we execute unity command with
Or is it possible (and desired) to run suggested command above and then proceed with a build in the actions? |
If we pipe it into an application, it should be something that can also forward non-zero exit codes while still logging to console. Or perhaps we can use |
Reopening as it seems we have some ways to move forward. I have attempted it before, back when starting builder action, but I didn't manage to get it to work back then. PRs are most welcome on this one :) |
When a license activation fails, additional context can be output using the solution described above.
Do you have any suggestions? |
I really like that idea, however I would keep them separate for now. The idea is to fully automate activation. There's an issue for it game-ci/unity-builder#193. So I'd keep the scope to activation only for now (thus excluding requesting activation file). |
Bug description
If unity in the container got the wrong license activation file (or credentials, I guess, didn't check) it fails to build / test with exit code 0. Which is threatened as a successful run.
How to reproduce
Expected behavior
The text was updated successfully, but these errors were encountered: