unity-builder icon indicating copy to clipboard operation
unity-builder copied to clipboard

(Need Help) Activation Failure when running Gitea Action Runner in Colima VM and docker created on MacOS M1 Host

Open trinhlehainamvice opened this issue 9 months ago • 1 comments

Description: The license activation process fails repeatedly when running action via Gitea Action Runner in Colima VM and docker on MacOS host (M1).

Environment Details

  • Host Machine: macOS (M1)
  • Colima VM: Emulating x86_64 Linux (Ubuntu)

Colima VM Setup:

  • ARCH: aarch64
  • vmType: vz
  • rosetta: true (amd64 emulation)
  • CPUS: 6
  • MEMORY: 8GB

CI Setup:

  • Gitea Action Runner v0.2.11: Self-hosted on Colima VM.
  • Action triggered by private self-hosted Forgejo.
  • Action file:
# https://game.ci/docs/github/getting-started
name: Build Actions 😎

on:
  pull_request:
    branches: [ master ]
  workflow_dispatch:

jobs:
  buildAndTestForLinuxBasedPlatforms:
    name: Build for ${{ matrix.targetPlatform }}
    # runs-on: ubuntu-22.04-large
    runs-on: ubuntu-22.04-large
    strategy:
      fail-fast: false
      matrix:
        unityVersion:
          - 6000.0.36f1
        targetPlatform:
          - Android # Build an Android player.
          # - iOS # Build an iOS player.
          # - WebGL # WebGL.
        
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          lfs: true

      - uses: actions/cache@v4
        with:
          path: Library
          key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
          restore-keys: |
            Library-            

      # - uses: https://github.com/game-ci/unity-test-runner@v4
      #   id: testRunner
      #   env:
      #     UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
      #     UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
      #     UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
      #   with:
      #     unityVersion: ${{ matrix.unityVersion }}
      #     githubToken: ${{ secrets.GITHUB_TOKEN }}

      # - uses: actions/upload-artifact@v3
      #   if: always()
      #   with:
      #     name: Test results (all modes)
      #     path: ${{ steps.testRunner.outputs.artifactsPath }}
      # - if: matrix.targetPlatform == 'Android'
      #   uses: jlumbroso/[email protected]

      - uses: https://github.com/game-ci/unity-builder@v4
        env:
          UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
          UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
          UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
          DOCKER_DEFAULT_PLATFORM: linux/amd64
        with:
          # runAsHostUser: true
          unityVersion: ${{ matrix.unityVersion }}
          targetPlatform: ${{ matrix.targetPlatform }}
          # customParameters: '-myParameter myValue -myBoolean -ThirdParameter andItsValue'

      - uses: actions/upload-artifact@v4
        with:
          name: Build
          path: build

Job output log:

Requesting activation
[UnityConnectServicesConfig] Local config successfully read: "/usr/share/unity3d/config/services-config.json"
[UnityConnectServicesConfig] "clientConnectTimeoutSec" was overridden with "5"
[UnityConnectServicesConfig] "clientHandshakeTimeoutSec" was overridden with "10"
[UnityConnectServicesConfig] Service configuration:
    "servicesConfigBaseUrl": "",
    "disableServicesWindow": false,
    "disableUserLogin": false,
    "entitlementCacheTimeoutInSeconds": 60,
    "clientConnectTimeoutSec": 5,
    "clientHandshakeTimeoutSec": 10,
    "clientResolveEntitlementsTimeoutSec": 30,
    "clientUpdateLicenseTimeoutSec": 30,
    "licensingServiceBaseUrl": "",
    "enableProxyAutoconfig": "false"
Unity Editor version:    6000.0.36f1 (9fe3b5f71dbb)
Branch:                  6000.0/staging
Build type:              Release
Batch mode:              YES
System name:             Linux
Distro version:          #51-Ubuntu SMP PREEMPT_DYNAMIC Sat Nov  9 18:03:35 UTC 2024
Kernel version:          6.8.0-50-generic
Architecture:            x86_64
Available memory:        7923 MB
CreateDirectory '/root/.cache/unity3d' failed:  (current dir: /github/workspace)
User *** logged in successfully
[UnityConnect::TryLogin] Request Succeeded.
[Licensing::Module] Trying to connect to existing licensing client channel...
[Licensing::IpcConnector] Connection attempt to the License Client on channel: "LicenseClient-root" failed because channel doesn't exist; code: "0x80000002"
[Licensing::Module] Successfully launched the LicensingClient (PId: 130)
[Licensing::IpcConnector] Successfully connected to the License Client on channel: "LicenseClient-root" at "2025-02-09T18:10:48.430851Z"
[Licensing::Module] Error: LicensingClient has failed validation; ignoring
[Licensing::Client] Handshaking with LicensingClient:
  Version:                 1.16.2+bdef8f5
  Session Id:              c5ba[47](https://tap_voidom/actions/runs/20#jobstep-3-47)65138646a7bc0b89224885d3d7
  Correlation Id:          9cb81a9a16da9f3f597581b63bb9ec4b
  External correlation Id: 6867061003986097324
  Machine Id:              MyzgrizyhkjV5I7Q8BHZ6uET400=
[Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-root" (connect: 1.32s, validation: 0.08s, handshake: 0.00s)
[Licensing::IpcConnector] Successfully connected to the License Notification on channel: "LicenseClient-root-notifications" at "2025-02-09T18:10:[48](https://actions/runs/20#jobstep-3-48).51291Z"
[Licensing::Module] Connected to LicensingClient (PId: 130, launch time: 0.01, total connection time: 1.40s)
[Licensing::Client] Successfully updated the access token
[Licensing::Module] Successfully updated the access token obU9DSXbKy...
[Licensing::Client] Successfully processed license management request
[Licensing::Module] Successfully activated the entitlement license
[Licensing::Client] Successfully queried for the EntitlementGroupsDetails
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at CommandLine.BaseAttribute.set_HelpText(String value)
   at lambda_method55(Closure, Object)
[Licensing::Client] Error: Failed to send ULFActivationResponse request
[Licensing::Module] License activation has failed. Aborting.
::warning ::Activation failed, attempting retry #1
Activation failed, retrying in 15 seconds...
[UnityConnectServicesConfig] Local config successfully read: "/usr/share/unity3d/config/services-config.json"
[UnityConnectServicesConfig] "clientConnectTimeoutSec" was overridden with "5"
[UnityConnectServicesConfig] "clientHandshakeTimeoutSec" was overridden with "10"
[UnityConnectServicesConfig] Service configuration:
    "servicesConfigBaseUrl": "",
    "disableServicesWindow": false,
    "disableUserLogin": false,
    "entitlementCacheTimeoutInSeconds": 60,
    "clientConnectTimeoutSec": 5,
    "clientHandshakeTimeoutSec": 10,
    "clientResolveEntitlementsTimeoutSec": 30,
    "clientUpdateLicenseTimeoutSec": 30,
    "licensingServiceBaseUrl": "",
    "enableProxyAutoconfig": "false"
Unity Editor version:    6000.0.36f1 (9fe3b5f71dbb)
Branch:                  6000.0/staging
Build type:              Release
Batch mode:              YES
System name:             Linux
Distro version:          #51-Ubuntu SMP PREEMPT_DYNAMIC Sat Nov  9 18:03:35 UTC 2024
Kernel version:          6.8.0-[50](https://actions/runs/20#jobstep-3-50)-generic
Architecture:            x86_64
Available memory:        7923 MB
CreateDirectory '/root/.cache/unity3d' failed:  (current dir: /github/workspace)
User *** logged in successfully
[UnityConnect::TryLogin] Request Succeeded.
[Licensing::Module] Trying to connect to existing licensing client channel...
[Licensing::IpcConnector] Error: Connection attempt to the License Client on channel: "LicenseClient-root" failed because Connection Refused; code: "0x8000000a"
[Licensing::Module] Successfully launched the LicensingClient (PId: 187)
[Licensing::IpcConnector] Successfully connected to the License Client on channel: "LicenseClient-root" at "2025-02-09T18:11:07.432679Z"
[Licensing::Module] Error: LicensingClient has failed validation; ignoring
assertion failed [block != nullptr]: BasicBlock requested for unrecognized address
(BuilderBase.h:550 block_for_offset)
 [Licensing::Client] Error: Failed to send HandshakeResponse request
[Licensing::Module] Error: Failed to handshake to channel: "LicenseClient-root"
IPC channel to LicensingClient doesn't exist; aborting
::warning ::Activation failed, attempting retry #2
Activation failed, retrying in 30 seconds...
[UnityConnectServicesConfig] Local config successfully read: "/usr/share/unity3d/config/services-config.json"
[UnityConnectServicesConfig] "clientConnectTimeoutSec" was overridden with "5"
[UnityConnectServicesConfig] "clientHandshakeTimeoutSec" was overridden with "10"
[UnityConnectServicesConfig] Service configuration:
    "servicesConfigBaseUrl": "",
    "disableServicesWindow": false,
    "disableUserLogin": false,
    "entitlementCacheTimeoutInSeconds": 60,
    "clientConnectTimeoutSec": 5,
    "clientHandshakeTimeoutSec": 10,
    "clientResolveEntitlementsTimeoutSec": 30,
    "clientUpdateLicenseTimeoutSec": 30,
    "licensingServiceBaseUrl": "",
    "enableProxyAutoconfig": "false"
Unity Editor version:    6000.0.36f1 (9fe3b5f71dbb)
Branch:                  6000.0/staging
Build type:              Release
Batch mode:              YES
System name:             Linux
Distro version:          #[51](https://actions/runs/20#jobstep-3-51)-Ubuntu SMP PREEMPT_DYNAMIC Sat Nov  9 18:03:35 UTC 2024
Kernel version:          6.8.0-50-generic
Architecture:            x86_64
Available memory:        7923 MB
CreateDirectory '/root/.cache/unity3d' failed:  (current dir: /github/workspace)
User *** logged in successfully
[UnityConnect::TryLogin] Request Succeeded.
[Licensing::Module] Trying to connect to existing licensing client channel...
[Licensing::IpcConnector] Error: Connection attempt to the License Client on channel: "LicenseClient-root" failed because Connection Refused; code: "0x8000000a"
[Licensing::Module] Successfully launched the LicensingClient (PId: 241)
[Licensing::IpcConnector] Successfully connected to the License Client on channel: "LicenseClient-root" at "2025-02-09T18:11:40.930488Z"
[Licensing::Module] Error: LicensingClient has failed validation; ignoring
[Licensing::Client] Handshaking with LicensingClient:
  Version:                 1.16.2+bdef8f5
  Session Id:              51790c07f87f4c18a5b0764bd71a1f2d
  Correlation Id:          9889f4898c21b7d330f1d9f12f7c16a9
  External correlation Id: 47763[52](https://actions/runs/20#jobstep-3-52)941597029998
  Machine Id:              MyzgrizyhkjV5I7Q8BHZ6uET400=
[Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-root" (connect: 1.35s, validation: 0.09s, handshake: 0.00s)
[Licensing::IpcConnector] Successfully connected to the License Notification on channel: "LicenseClient-root-notifications" at "2025-02-09T18:11:41.018739Z"
[Licensing::Module] Connected to LicensingClient (PId: 241, launch time: 0.01, total connection time: 1.44s)
[Licensing::Client] Successfully updated the access token
[Licensing::Module] Successfully updated the access token vi3Yhfq_DY...
[Licensing::Client] Successfully processed license management request
[Licensing::Module] Successfully activated the entitlement license
[Licensing::Client] Successfully queried for the EntitlementGroupsDetails
Stack overflow.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(Newtonsoft.Json.JsonWriter, System.Object, Newtonsoft.Json.Serialization.JsonContainerContract, Newtonsoft.Json.Serialization.JsonProperty, Newtonsoft.Json.Serialization.JsonProperty, Newtonsoft.Json.Serialization.JsonContract ByRef, System.Object ByRef)
[Licensing::Client] Error: Failed to send ULFActivationResponse request
[Licensing::Module] License activation has failed. Aborting.
::warning ::Activation failed, attempting retry #3
Activation failed, retrying in 60 seconds...
[UnityConnectServicesConfig] Local config successfully read: "/usr/share/unity3d/config/services-config.json"
[UnityConnectServicesConfig] "clientConnectTimeoutSec" was overridden with "5"
[UnityConnectServicesConfig] "clientHandshakeTimeoutSec" was overridden with "10"
[UnityConnectServicesConfig] Service configuration:
    "servicesConfigBaseUrl": "",
    "disableServicesWindow": false,
    "disableUserLogin": false,
    "entitlementCacheTimeoutInSeconds": 60,
    "clientConnectTimeoutSec": 5,
    "clientHandshakeTimeoutSec": 10,
    "clientResolveEntitlementsTimeoutSec": 30,
    "clientUpdateLicenseTimeoutSec": 30,
    "licensingServiceBaseUrl": "",
    "enableProxyAutoconfig": "false"
Unity Editor version:    6000.0.36f1 (9fe3b5f71dbb)
Branch:                  6000.0/staging
Build type:              Release
Batch mode:              YES
System name:             Linux
Distro version:          #51-Ubuntu SMP PREEMPT_DYNAMIC Sat Nov  9 18:03:35 UTC 2024
Kernel version:          6.8.0-50-generic
Architecture:            x86_64
Available memory:        7923 MB
CreateDirectory '/root/.cache/unity3d' failed:  (current dir: /github/workspace)
User *** logged in successfully
[UnityConnect::TryLogin] Request Succeeded.
[Licensing::Module] Trying to connect to existing licensing client channel...
[Licensing::IpcConnector] Error: Connection attempt to the License Client on channel: "LicenseClient-root" failed because Connection Refused; code: "0x8000000a"
[Licensing::Module] Successfully launched the LicensingClient (PId: 298)
[Licensing::IpcConnector] Successfully connected to the License Client on channel: "LicenseClient-root" at "2025-02-09T18:12:47.454879Z"
[Licensing::Module] Error: LicensingClient has failed validation; ignoring
[Licensing::Client] Handshaking with LicensingClient:
  Version:                 1.16.2+bdef8f5
  Session Id:              9f7f0ad4881e4a2fa77d74[53](https://actions/runs/20#jobstep-3-53)e44ef5d9
  Correlation Id:          a6cfc6a17943be682a336b0dbc81e367
  External correlation Id: 5313109029840479822
  Machine Id:              MyzgrizyhkjV5I7Q8BHZ6uET400=
[Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-root" (connect: 1.31s, validation: 0.08s, handshake: 0.00s)
[Licensing::IpcConnector] Successfully connected to the License Notification on channel: "LicenseClient-root-notifications" at "2025-02-09T18:12:47.536128Z"
[Licensing::Module] Connected to LicensingClient (PId: 298, launch time: 0.01, total connection time: 1.39s)
[Licensing::Client] Successfully updated the access token
[Licensing::Module] Successfully updated the access token kEqLIPuhcY...
[Licensing::Client] Successfully processed license management request
[Licensing::Module] Successfully activated the entitlement license
[Licensing::Client] Successfully queried for the EntitlementGroupsDetails
Stack overflow.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.CalculatePropertyValues(Newtonsoft.Json.JsonWriter, System.Object, Newtonsoft.Json.Serialization.JsonContainerContract, Newtonsoft.Json.Serialization.JsonProperty, Newtonsoft.Json.Serialization.JsonProperty, Newtonsoft.Json.Serialization.JsonContract ByRef, System.Object ByRef)
[Licensing::Client] Error: Failed to send ULFActivationResponse request
[Licensing::Module] License activation has failed. Aborting.
::warning ::Activation failed, attempting retry #4
Activation failed, retrying in 120 seconds...
[UnityConnectServicesConfig] Local config successfully read: "/usr/share/unity3d/config/services-config.json"
[UnityConnectServicesConfig] "clientConnectTimeoutSec" was overridden with "5"
[UnityConnectServicesConfig] "clientHandshakeTimeoutSec" was overridden with "10"
[UnityConnectServicesConfig] Service configuration:
    "servicesConfigBaseUrl": "",
    "disableServicesWindow": false,
    "disableUserLogin": false,
    "entitlementCacheTimeoutInSeconds": 60,
    "clientConnectTimeoutSec": 5,
    "clientHandshakeTimeoutSec": 10,
    "clientResolveEntitlementsTimeoutSec": 30,
    "clientUpdateLicenseTimeoutSec": 30,
    "licensingServiceBaseUrl": "",
    "enableProxyAutoconfig": "false"
Unity Editor version:    6000.0.36f1 (9fe3b5f71dbb)
Branch:                  6000.0/staging
Build type:              Release
Batch mode:              YES
System name:             Linux
Distro version:          #51-Ubuntu SMP PREEMPT_DYNAMIC Sat Nov  9 18:03:35 UTC 2024
Kernel version:          6.8.0-50-generic
Architecture:            x86_64
Available memory:        7923 MB
CreateDirectory '/root/.cache/unity3d' failed:  (current dir: /github/workspace)
User *** logged in successfully
[UnityConnect::TryLogin] Request Succeeded.
[Licensing::Module] Trying to connect to existing licensing client channel...
[Licensing::IpcConnector] Error: Connection attempt to the License Client on channel: "LicenseClient-root" failed because Connection Refused; code: "0x8000000a"
[Licensing::Module] Successfully launched the LicensingClient (PId: 3[54](https://actions/runs/20#jobstep-3-54))
assertion failed [block != nullptr]: BasicBlock requested for unrecognized address
(BuilderBase.h:[55](https://actions/runs/20#jobstep-3-55)0 block_for_offset)
 [Licensing::IpcConnector] Error: Connection attempt to the License Client on channel: "LicenseClient-root" failed because Connection Refused; code: "0x8000000a"
[Licensing::Module] Timed-out after 5.01s, waiting for channel: "LicenseClient-root"
IPC channel to LicensingClient doesn't exist; aborting
::warning ::Activation failed, attempting retry #5
Activation failed, retrying in 240 seconds...
Activation failed after 5 retries
Unclassified error occured while trying to activate license.
Exit code was: 199
::error ::There was an error while trying to activate the Unity license.
::error::Build failed with exit code 199

trinhlehainamvice avatar Feb 09 '25 19:02 trinhlehainamvice

After research about assertion failed [block != nullptr]: BasicBlock requested for unrecognized address. Maybe this problem occurred when running x64 .NET executables on ARM64 architecture.

  • PowerShell/PowerShell#17655
  • docker/for-mac#7272

trinhlehainamvice avatar Feb 10 '25 09:02 trinhlehainamvice