When I attempt to activate a Unity installation via command line, I get an error (sometimes, not always) which makes it sound like the SSL cert in use at https://core.cloud.unity3d.com/api/login is self-signed.
I’m doing this to wrap test automation around my product’s setup documentation - I want to be able to test that it works from a clean machine, but without all the toil of doing that by hand every two weeks as we do a release.
I’m using Unity 5.5.2f1 via chocolatey.org’s excellent package manager, on Windows 10 Enterprise (since there’s an evaluation ISO available). I’ve built the VM via packer, and am then using vagrant to start it then run through my setup guide commands.
The (powershell) command line (secrets are supplied via the environment variables):
BatchMode: Unity has not been activated with a valid License. Could be a new activation or renewal...
(Filename: C:/buildslave/unity/build/Editor/Platform/Windows/WinEditorMain.cpp Line: 837)
DisplayProgressbar: Unity license
SSL certificate problem: unable to get local issuer certificate while processing request "https://core.cloud.unity3d.com/api/login", HTTP error code 0
.Cancelling DisplayDialog: Updating license failed Failed to update license within 60 seconds. Exiting.
This should not be called in batch mode.
(Filename: C:/buildslave/unity/build/Editor/Platform/Windows/EditorUtility.cpp Line: 1252)
Note that when I do this at an interactive command line, this works fine (unless my license key has had too many activations, though I’ve learned now how to release them from the website, and from the command line) most of the time.
Is it possible that some of the machines behind the load balancer have a self-signed cert…? I haven’t been able to come up with any other reasonable explanations, and am now a bit stumped.
@ thanks for replying. It’s running from an administrator account, but not in an elevated prompt. UAC is disabled.
I’d be surprised if it needs elevation since
I’ve seen what I’m attempting work, sometimes, and fail sometimes, with no changes to my scripts or environment - that suggests some dependency out of my control
Unity seems to keep data it needs correctly within the user profile’s AppData tree…? Or are there registry edits going on as well?
(However, I’d love to be surprised and find it’s an error at my side!)
I’ve noticed, also, that if I apply Windows Updates after the first activation failure, then after their reboot, activation does not fail with the self-signed certificate error. It either succeeds, or fails with a 400 Bad Request telling me I’m at my activation limit for this serial (which is correct; at this point I am).
By the way - the 3 day limit on using the website to release the activations is killer for iterating on this
If you’d like me to zip up my scripts (there’s nothing proprietary in them, and the VM is based on an MS evaluation ISO), then I can do that? I don’t want to share them publicly, however.
My password has {, }, and < characters inside it. However, if it were a shell expansion issue, that doesn’t explain why the same credentials work the second time they are attempted…?
Here’s a log from a Windows run of the scripts I added to the bug report:
default: Running: script: activate unity
==> default: Running Unity so that it can create/download the CACerts.pem that it needs for activation.
==> default: Killing Unity after allowing it some time to do magical internal things (tm)
==> default: VERBOSE: Performing the operation "Stop-Process" on target "Unity (2192)".
==> default: Run Unity synchronously to return any activated license; shouldn't be one, but ensures clean slate.
==> default: UNITY_SERIAL: <redacted>
==> default: UNITY_USERNAME: <redacted>
==> default: Attempting to activate Unity license.
==> default: Result of activation attempt:
==> default: BatchMode: Unity has not been activated with a valid License. Could be a new activation or renewal...
==> default:
==> default: (Filename: C:/buildslave/unity/build/Editor/Platform/Windows/WinEditorMain.cpp Line: 837)
==> default: DisplayProgressbar: Unity license
==> default: SSL certificate problem: unable to get local issuer certificate while processing request "https://core.cloud.unity3d.com/api/login", HTTP error code 0
==> default: .Cancelling DisplayDialog: Updating license failed Failed to update license within 60 seconds. Exiting.
==> default: This should not be called in batch mode.
==> default:
==> default: (Filename: C:/buildslave/unity/build/Editor/Platform/Windows/EditorUtility.cpp Line: 1252)
==> default: First activation attempt failed, trying again in case connectivity was the issue.
==> default: Result of activation attempt 2:
==> default: BatchMode: Unity has not been activated with a valid License. Could be a new activation or renewal...
==> default:
==> default: (Filename: C:/buildslave/unity/build/Editor/Platform/Windows/WinEditorMain.cpp Line: 837)
==> default: DisplayProgressbar: Unity license
==> default: SSL certificate problem: unable to get local issuer certificate while processing request "https://core.cloud.unity3d.com/api/login", HTTP error code 0
==> default: .Cancelling DisplayDialog: Updating license failed Failed to update license within 60 seconds. Exiting.
==> default: This should not be called in batch mode.
==> default:
==> default: (Filename: C:/buildslave/unity/build/Editor/Platform/Windows/EditorUtility.cpp Line: 1252)
In the log you attached in the bug 911541, it has message:
No sufficient permissions while processing request "https://core.cloud.unity3d.com/api/login", HTTP error code 401
That’s why I want to check with you if there are password escape issue.
In the log you attached in this mail thread, it has message:
==> default: DisplayProgressbar: Unity license
==> default: SSL certificate problem: unable to get local issuer certificate while processing request "https://core.cloud.unity3d.com/api/login", HTTP error code 0
This should caused by the pem issue. I don’t know why the second time works but I believe the second time the certificate pem file should be created.
In our implementation, the pem file will be generated everytime when Unity started, so that you don’t need to create job:
Write-Output "Running Unity so that it can create/download the CACerts.pem that it needs for activation."
$unityProcess = Start-Process "c:\program files\unity\editor\Unity.exe" -passthru -verbose
If we check the log, we can see:
2017-05-16 13:58:08.885 Unity[54921:290378] NSDocumentController Info.plist warning: The values of CFBundleTypeRole entries must be 'Editor', 'Viewer', 'None', or 'Shell'.
...270213 bytes written to /Users/peter/Library/Unity/Certificates/CACerts.pem
We can do some check with the generated pem file. It could be that windows machine do not have required certificate.