Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Unclassified error occured while trying to activate license. #485

Closed
weisunglee opened this issue Dec 20, 2022 · 7 comments
Closed

Unclassified error occured while trying to activate license. #485

weisunglee opened this issue Dec 20, 2022 · 7 comments
Labels
bug Something isn't working

Comments

@weisunglee
Copy link

weisunglee commented Dec 20, 2022

Bug description

Hi, I got an error Unclassified error occured while trying to activate license. since yesterday.

---------- git config --list --show-origin -------------
file:/etc/gitconfig	filter.lfs.smudge=git-lfs smudge -- %f
file:/etc/gitconfig	filter.lfs.process=git-lfs filter-process
file:/etc/gitconfig	filter.lfs.required=true
file:/etc/gitconfig	filter.lfs.clean=git-lfs clean -- %f
Changing to "/github/workspace/_activate-license~" directory.
/github/workspace/_activate-license~ /github/workspace
Requesting activation (personal license)
Unclassified error occured while trying to activate license.
Exit code was: 1
Error: The process '/usr/bin/docker' failed with exit code 1

I found a similar issue #345 but it seems that didn't help with mine.

How to reproduce

Run build with

      - uses: game-ci/unity-builder@v2.1.2
        with:
          targetPlatform: WebGL          

then got the error.

Expected behavior

Successfully build.

Additional details

I had success before, but since yesterday it has been failing, I can't find the reason.

@weisunglee weisunglee added the bug Something isn't working label Dec 20, 2022
@madebyluque
Copy link

Hey @weisunglee ! Have you found a workaround for this error?

@segoja7
Copy link

segoja7 commented Aug 27, 2023

Hi, I have the same error, there is a some fix?

@SeoulSKY
Copy link

SeoulSKY commented Aug 30, 2023

I don't see the env block in your workflow. Did you add UNITY_LICENSE, UNITY_EMAIL and UNITY_PASSWORD?

@Soloveykos
Copy link

Soloveykos commented Sep 27, 2023

here is my variant, it's not working also:

      # Test
      - name: Run tests
        uses: game-ci/unity-test-runner@v3
        env:
          UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
        with:
          githubToken: ${{ secrets.GITHUB_TOKEN }}
          

used personal license and received:
Requesting activation (personal license)
Unclassified error occured while trying to activate license.
Exit code was: 1
Error: The process '/usr/bin/docker' failed with exit code 1

@Oknaaa
Copy link

Oknaaa commented Oct 5, 2023

      - uses: game-ci/unity-builder@v2
        env:
          UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
          UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
          UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
        with:
          projectPath: ${{ matrix.projectPath }}
          targetPlatform: ${{ matrix.targetPlatform }}
          unityVersion:  ${{ matrix.unityVersion }}

Mine looks like this, Same error. any fix ?

@GabLeRoux
Copy link
Member

GabLeRoux commented Oct 5, 2023

Unclassified error occured while trying to activate license.

This usually happen when the wrong file was inserted into the UNITY_LICENSE environment variable (Github secret).

Related issues

There are a few related issues in the help threads on our discord:

And some related GitHub issues:

And I even found this in Unity's forums:

Explanation

Activation process is a bit complicated and it's easy to miss a step. We must follow activation process to the letter. A common mistake is to paste the alf (activation request file) into UNITY_LICENSE instead of the actual ulf license.

Refer to GameCI | Github > Activation documentation

Tips

Make sure that the content of your UNITY_LICENSE env var is the content of the downloaded license (in theulf format, not alf) from Unity's activation website.

  • The alf file is an activation request file generated by Unity executable (usually from the request activation file action) that needs to be uploaded to unity's website.
  • The ulf is the license you download from Unity's website.

ulf License example

Expand here to see what the ulf License file should look like
<?xml version="1.0" encoding="UTF-8"?>
<root>
    <License id="LicenseInfo">
        <MachineBindings>
            <Binding Key="1" Value="576562626572264761624c65526f7578"/>
            <Binding Key="2" Value="576562626572264761624c65526f7578"/>
        </MachineBindings>
        <MachineID Value="Redacted"/>
        <SerialHash Value="Redacted"/>
        <Features>
            <Feature Value="Redacted"/>
            <Feature Value="Redacted"/>
            <Feature Value="Redacted"/>
            <Feature Value="Redacted"/>
            <Feature Value="Redacted"/>
            <Feature Value="Redacted"/>
            <Feature Value="Redacted"/>
            <Feature Value="Redacted"/>
            <Feature Value="Redacted"/>
            <Feature Value="Redacted"/>
        </Features>
        <DeveloperData Value="Redacted"/>
        <SerialMasked Value="Redacted"/>
        <StartDate Value="Redacted"/>
        <UpdateDate Value="Redacted"/>
        <InitialActivationDate Value="Redacted"/>
        <LicenseVersion Value="Redacted"/>
        <ClientProvidedVersion Value="Redacted"/>
        <AlwaysOnline Value="false"/>
        <Entitlements>
            <Entitlement Ns="unity_editor" Tag="Redacted" Type="Redacted" ValidTo="Redacted"/>
            <Entitlement Ns="unity_editor" Tag="Redacted" Type="Redacted" ValidTo="Redacted"/>
        </Entitlements>
    </License>
    <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
        <SignedInfo>
            <CanonicalizationMethod Algorithm="Redacted"/>
            <SignatureMethod Algorithm="Redacted"/>
            <Reference URI="#LicenseInfo">
                <Transforms>
                    <Transform Algorithm="Redacted"/>
                </Transforms>
                <DigestMethod Algorithm="Redacted"/>
                <DigestValue>Redacted</DigestValue>
            </Reference>
        </SignedInfo>
        <SignatureValue>Redacted</SignatureValue>
    </Signature>
</root>

The MachineBindings should be 576562626572264761624c65526f7578. This is an hardcoded value in the GameCI docker images. It can be found here.

Detailed steps

Always refer to documentation for most up to date procedures. Here's precise steps I took recently on a fork of a project where someone had same error (and it worked fine):

  1. Added .github/workflows/activation.yml from GameCI | Github > Activation > personal license
  2. Ran manual workflow through Github > Actions > Acquire activation file
  3. Downloaded Unity_v2019.2.11f1.alf from Summary page of Acquire activation file workflow
  4. Deleted workflow run (to prevent others from downloading my activation request file)
  5. Logged in to my Unity3d account on unity3d.com
  6. Followed instructions for Converting into a license here
  7. Did the trick about showing hidden activation section (I wish Unity didn't hide this...). Right now, you can't miss it, there's a big warning on GameCI's activation page.
  8. Downloaded my license file (Unity_v2019.x.ulf
  9. Visited https://github.com/GabLeRoux/EmptyProject/settings/secrets/actions (the project's Settings > Security > Secrets and variables > Actions) and Clicked 8. New repository secret button
  10. Copied the content of downloaded license (Unity_v2019.x.ulf), I personally copy the content with cat ~/downloads/Unity_v2019.x.ulf | pbcopy on macOS to prevent any bad manipulation, but a good technique is to open the file in a vode editor such as Visual Studio Code and copy from here.
    Name: UNITY_LICENSE
    Secret: paste content of license (content of Unity_v2019.x.ulf), then hit Add secret
  11. I went back to Actions > "Actions 😎" > clicked on the Job I previously cancelled and clicked on Re-run Jobs which re-runs the "Build my project ✨" job.

Hope it works for you 🙏

@AndrewKahr
Copy link
Member

V4 has a new activation process so this should be resolved

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

No branches or pull requests

8 participants