Inconsistent licence activation
ironcutter24 opened this issue · 7 comments
Bug description
I get an Unclassified error occured while trying to activate license
error, even though I can get a successful cloud build with the same licence and credentials.
How to reproduce
Set UNITY_LICENSE
, UNITY_EMAIL
, UNITY_PASSWORD
secrets.
UNITY_VERSION
= "2022.3.5f1"
BUILD_TARGET_PLATFORM
= "StandaloneWindows64"
Run main.yml workflow on a Unity 2022.3.5f1 project.
main.yml
name: Actions 😎
on: [push, pull_request]
jobs:
test:
name: Test my project 🧪
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: false
# Cache
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
# Test
- name: Run tests
uses: game-ci/unity-test-runner@v4.0.0
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
unityVersion: ${{ secrets.UNITY_VERSION }}
build:
name: Build my project ✨
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: false
# Cache
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
# Build
- name: Build project
uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ secrets.BUILD_TARGET_PLATFORM }}
unityVersion: ${{ secrets.UNITY_VERSION }}
allowDirtyBuild: true
# Output
- uses: actions/upload-artifact@v3
with:
name: Build
path: build
Expected behavior
Licence should be activated and tests should continue.
Additional details
End of test log:
...
Status: Downloaded newer image for unityci/editor:ubuntu-2022.3.5f1-linux-il2cpp-3
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
+1
This is a duplcate of #251. Until we have a fix, there are two possible workarounds:
Workarounds for Unity License Issue
a. Manually Extract the Serial from the License File
Manually extract the serial
from the Unity license file:
-
Locate the License File (depending on your operating system)
- Windows:
C:\ProgramData\Unity\Unity_lic.ulf
- Mac:
/Library/Application Support/Unity/Unity_lic.ulf
- Linux:
~/.local/share/unity3d/Unity/Unity_lic.ulf
- Windows:
-
Extract the Serial
- Follow the logic outlined in the unity-builder script.
- This involves reading the file, locating the
<DeveloperData Value="
tag, extracting the Base64 encoded string, and then decoding it. - Discard the first four characters of the decoded string, as they are not part of the serial.
b. Follow Activation Instructions from v3
Alternatively, follow the activation instructions from version 3.
Can you try game-ci/unity-test-runner@unity-builder-parity
and see if the activation issues got better
Can you try
game-ci/unity-test-runner@unity-builder-parity
and see if the activation issues got better
got through Registration step sucsessfully, now doing the Testing in Playmode step.... looks promising to me!
@ironcutter24 the changes were merged last night so the branch was deleted. Try using v4 now
Works as expected, thank you for addressing the issue this quick!