Skip to content
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

return-license fails to return a license #20

Open
oshaughnessy opened this issue Mar 22, 2022 · 7 comments
Open

return-license fails to return a license #20

oshaughnessy opened this issue Mar 22, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@oshaughnessy
Copy link

Bug description

Running "return-license" does not return a license.

How to reproduce

Manually invoke this workflow definition:

jobs:
  return-license:
    runs-on: ${{ github.event.inputs.runs-on }}
    env:
      UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
    steps:
      - uses: game-ci/unity-return-license@main
        if: always()

Expected behavior

An allocation of the license associated with $UNITY_SERIAL is returned to the Unity ID service.

Additional details

Initiating legacy licensing module
DisplayProgressbar: Returning license
Cancelling DisplayDialog: Failed to return license Unity license return request has timed out. Please verify that you are connected to the Internet and/or try again later.
This should not be called in batch mode.
 
(Filename: ./Editor/Platform/Linux/EditorUtility.cpp Line: 274)

DisplayProgressbar: Unity license
[UnityConnectServicesConfig] config is NOT valid, switching to default
[0322/193048:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[0322/193048:ERROR:sandbox_linux.cc(308)] InitializeSandbox() called with multiple threads in process gpu-process
Cancelling DisplayDialog: Failed to activate/update license. Missing or bad username and password. Please try again using valid credentials or contact support@unity3d.com
This should not be called in batch mode.
 
(Filename: ./Editor/Platform/Linux/EditorUtility.cpp Line: 274)
@davidmfinol
Copy link
Member

For additional context, this is trying to use a linux runner to return a license that was activated on a mac runner.

I believe the fix for this may be to introduce UNITY_USERNAME and UNITY_PASSWORD as optional parameters to this action.
Then, if all 3 of UNITY_USERNAME, UNITY_PASSWORD, and UNITY_SERIAL are provided, we would use those 3 to call the -returnlicense.

@oshaughnessy
Copy link
Author

Heh. I did try that, too, but I left them out of the example above, thinking it would confuse things. I got the same error either way.

@webbertakken
Copy link
Member

Did you fork the action and pass these vars into the actual command?

@oshaughnessy
Copy link
Author

Oh, no, sorry for the confusion. I just tried passing them as env vars. But looking at the code now (for the first time), I see those aren't used at all. I can give that a shot, though.

@oshaughnessy
Copy link
Author

oshaughnessy commented Mar 24, 2022

Okay, learning stuff! I forked this repo and added code to utilize the username and password if given. I get a timeout error:

LICENSE SYSTEM [2022324 21:3:21] Received https://license.unity3d.com/update/poll?cmd=9&tx_id=...

LICENSE SYSTEM [2022324 21:3:21] Headers:
    HTTP/1.1 200 OK
    sc-request-id: ...
    sc-token-expires-in: 7223
    Cache-Control: no-cache, no-store, must-revalidate
    Pragma: no-cache
    Expires: 0
    Vary: Accept-Encoding
    Content-Encoding: deflate
    Content-Type: text/plain
    Content-Length: 116

Cancelling DisplayDialog: Failed to activate/update license. Timeout occured while trying to update license. Please try again later or contact support@unity3d.com
This should not be called in batch mode.

@davidmfinol
Copy link
Member

Is there some networking issue that would cause the timeout, or is it simply that we are invoking the return license incorrectly?
Does the return license section on this page help?: https://docs.unity3d.com/Manual/ManagingYourUnityLicense.html

@oshaughnessy
Copy link
Author

I was just working through the options there. It looks to me like older versions of Unity suggested just passing -returnlicense and newer versions of the docs suggest including -username and -password. None of them, that I could find, mention wanting -serial, and when I tried passing both -serial and -username/-password, I got an error that -serial should only be passed when activating. So... I think the check for $UNITY_SERIAL is a bit of a misguidance.

Regardless, I don't know why the networking error comes up. When I try the same command-line args from my Mac, I don't get the same response. It makes me wonder if there's a connectivity issue between Azure and id.unity.com.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants