Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

Bug Failed to activate ULF license after upgrading to 2022.2

Discussion in 'Testing & Automation' started by Telestrator, Mar 20, 2023.

  1. Telestrator

    Telestrator

    Joined:
    Aug 21, 2018
    Posts:
    10
    Since upgrading from 2019.4 to 2022.2, batchmode fails 100% of the time with these errors:

    Code (JavaScript):
    1. 12:55:01   Starting: C:\Program Files\Unity\Hub\Editor\2022.2.11f1\Editor\Unity.exe -batchmode -projectPath UnityProject -executeMethod FGHG.Build.DeployServer -serial SC-XXXXX -logFile C:\BuildAgent\temp\buildTmp\unityBuildLog-8468698607649694292-22669.txt -quit
    2. 12:55:01   in directory: C:\BuildAgent\work\17ae024074141d99
    3. 12:55:01   [Licensing::Module] Trying to connect to existing licensing client channel...
    4. 12:55:01   [Licensing::IpcConnector] Successfully connected to the License Client on channel: "LicenseClient-Greg"
    5. 12:55:01   Process exited with code 1
    6. 12:55:02   [Licensing::Client] Handshaking with LicensingClient:
    7. 12:55:02     Version:                 1.12.0+3acf7bc
    8. 12:55:02     Session Id:              de008a0823f04d9289f30f3aafc12d0e
    9. 12:55:02     Correlation Id:          8a9fbe86a52f4b500c4e51b639749342
    10. 12:55:02     External correlation Id: 7839643772814491941
    11. 12:55:02     Machine Id:              x5V169D0QtsZvguOOrKIxBcQrBY=
    12. 12:55:02   [Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-Greg" (connect: 0.00s, validation: 0.01s, handshake: 0.90s)
    13. 12:55:02   [Licensing::IpcConnector] Successfully connected to the License Notification on channel: "LicenseClient-Greg-notifications"
    14. 12:55:02   [Licensing::Module] Error: Access token is unavailable; failed to update
    15. 12:55:02   [Licensing::Module] Error: Failed to activate entitlement license
    16. 12:55:02   [Licensing::Module] Error: Access token is unavailable; failed to update
    17. 12:55:02   [Licensing::Module] Error: Failed to activate ULF license
    18.  
    In 2019.4, it returns the following and continues the build:
    Code (CSharp):
    1. 12:09:53   [LicensingClient] ERROR Failed to connect to local IPC
    2. 12:09:53   [Licensing::Module] Failed to connect to channel: LicenseClient-Greg
    3. 12:09:53   [Licensing::Module] Successfully launched the LicensingClient
    4. 12:09:55   [Licensing::Module] Successfully connected to LicensingClient on channel: LicenseClient-Greg
    5. 12:09:55   [Licensing::Module] Successfully launched and connected to LicensingClient
    6. 12:09:55   Entitlement-based licensing initiated
    7. 12:09:55   [LicensingClient] Licenses Updated successfully in LicensingClient
    8. 12:09:55  
    9. 12:09:55   LICENSE SYSTEM [2023318 12:9:55] Next license update check is after 2023-03-19T17:53:11
    10. 12:09:55  
    11. 12:09:55  
    12. 12:09:55   LICENSE SYSTEM [2023318 12:9:55] Current license is already valid and activated. Skipping license activation process (Provided username/password will be ignored).
    13. 12:09:55   Built from '2019.4/staging' branch; Version is '2019.4.40f1 (ffc62b691db5) revision 16762411'; Using compiler version '191627012'
    14.  
     
  2. moyou01

    moyou01

    Joined:
    Jun 17, 2022
    Posts:
    1
    I have the same question on 2020.3.46f1 after upgrade from 2020.3.14f1
     
  3. SciPlayDave

    SciPlayDave

    Joined:
    Aug 9, 2017
    Posts:
    4
    I am getting the same thing on 2022.2.15f1:

    2023-05-04 14:59:53 [Licensing::Module] Trying to connect to existing licensing client channel...
    2023-05-04 14:59:53 [Licensing::IpcConnector] Connection attempt to the License Client on channel: "LicenseClient-jenkins" failed because channel doesn't exist; code: "0x80000002"
    2023-05-04 14:59:53 [Licensing::Module] Successfully launched the LicensingClient (PId: 82728)
    2023-05-04 14:59:54 [Licensing::IpcConnector] Successfully connected to the License Client on channel: "LicenseClient-jenkins"
    2023-05-04 14:59:55 [Licensing::Client] Handshaking with LicensingClient:
    2023-05-04 14:59:55 Version: 1.12.1+9338cad
    2023-05-04 14:59:55 Session Id: 21a5d9cbb4684609b31973cdb4f14f4c
    2023-05-04 14:59:55 Correlation Id: 12cc5457ff1b0927159fa9bc1fec3217
    2023-05-04 14:59:55 External correlation Id: 598173874607173435
    2023-05-04 14:59:55 Machine Id: Bi2EgSZJz0VfZ/GXYLI5BO6RwgA=
    2023-05-04 14:59:55 [Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-jenkins" (connect: 1.39s, validation: 0.10s, handshake: 0.23s)
    2023-05-04 14:59:55 [Licensing::IpcConnector] Successfully connected to the License Notification on channel: "LicenseClient-jenkins-notifications"
    2023-05-04 14:59:55 [Licensing::Module] Connected to LicensingClient (PId: 82728, launch time: 0.00, total connection time: 1.72s)
    2023-05-04 14:59:55 [Licensing::Module] Error: Access token is unavailable; failed to update
    2023-05-04 14:59:55 [Licensing::Module] Error: Failed to activate entitlement license
    2023-05-04 14:59:55 [Licensing::Module] Error: Access token is unavailable; failed to update
    2023-05-04 14:59:55 [Licensing::Module] Error: Failed to activate ULF license
     
  4. SciPlayDave

    SciPlayDave

    Joined:
    Aug 9, 2017
    Posts:
    4
    And then it succeeds minutes later on the same node:

    [Licensing::Module] Trying to connect to existing licensing client channel...
    [Licensing::IpcConnector] Connection attempt to the License Client on channel: "LicenseClient-jenkins" failed because channel doesn't exist; code: "0x80000002"
    Launching external process: /Applications/Unity_2022.2.15f1/Unity.app/Contents/Frameworks/UnityLicensingClient.app/Contents/MacOS/Unity.Licensing.Client
    [Licensing::Module] Successfully launched the LicensingClient (PId: 84136)
    [Licensing::IpcConnector] Successfully connected to the License Client on channel: "LicenseClient-jenkins"
    [Licensing::Client] Handshaking with LicensingClient:
    Version: 1.12.1+9338cad
    Session Id: e7b302dba7ee4b4abc0cd8422199d317
    Correlation Id: 3af8734fc0de47f7d145049bf9ef86a1
    External correlation Id: 4085806752231473235
    Machine Id: Bi2EgSZJz0VfZ/GXYLI5BO6RwgA=
    [Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-jenkins" (connect: 1.28s, validation: 0.15s, handshake: 0.22s)
    [Licensing::IpcConnector] Successfully connected to the License Notification on channel: "LicenseClient-jenkins-notifications"
    [Licensing::Module] Connected to LicensingClient (PId: 84136, launch time: 0.00, total connection time: 1.64s)
    [Licensing::Client] Successfully updated the access token
    [Licensing::Module] Successfully updated the access token mgFny1VCZb...
    [Licensing::Client] Successfully processed license management request
    [Licensing::Module] Successfully activated the entitlement license
    [Licensing::Client] Successfully queried for the EntitlementGroupsDetails
    [Licensing::Client] Successfully activated ULF license
    [Licensing::Module] Serial number assigned to (masked): "XX-XXXX-XXXX-XXXX-XXXX-XXXX"
    [Licensing::Client] Successfully resolved entitlements
    [Licensing::Module] Serial number assigned to: "XX-XXXX-XXXX-XXXX-XXXX-XXXX"
    Pro License: YES
     
  5. AMelucci

    AMelucci

    Joined:
    Jun 22, 2022
    Posts:
    1
    We're getting the same issue. Some builds fail and then they work. It's generating a lot of friction on our company between teams.
     
  6. SciPlayDave

    SciPlayDave

    Joined:
    Aug 9, 2017
    Posts:
    4
    We are getting the same thing on 2020.3.48f1 and 2022.3.0f1, both recent installations of course. My current clue/lead is to leave out the -serial XX-XXXX-XXXX-XXXX-XXXX-XXXX parameter; then the build works, at least on my build farm of Mac minis which have static licenses checked out via Unity Hub. Will continue to update as I learn more.
     
    chenhao2008 likes this.
  7. callumroseFC

    callumroseFC

    Joined:
    May 10, 2019
    Posts:
    7
    Did anyone work out how to fix this?
     
  8. brollsroyce

    brollsroyce

    Joined:
    Jun 7, 2021
    Posts:
    4
  9. mcarriere

    mcarriere

    Joined:
    Sep 14, 2012
    Posts:
    110
    We're also dealing with this for a CI process that is hosted on BitRise for iOS and Android builds.
     
  10. mcarriere

    mcarriere

    Joined:
    Sep 14, 2012
    Posts:
    110
    Following up in case this helps anyone, we seem to have either become quite lucky or we've resolved the issue for the time being.

    It's worth noting how our build pipeline works. We run unity several times during our CI process:
    • Activating the license
    • Running Edit Mode Tests
    • Running Play Mode Tests (when the project requires it)
    • Running a Data Validation w/ Odin Validator
    • Running a Build (or builds, when we're building Android AABs/APKs for different storefronts)
    • Deactivating the license
    We did two things:
    • Following the documentation, we ensured that the folder that would be storing the license file was writable before triggering activation.
    • We only included the -serial, -username, and -password arguments when activating, and only included the -username and -password arguments when deactivating.
      • We were previously including the -serial, -username, and -password arguments in our builds as well, which is often when they would fail.
    Removing these arguments from the app builds and ensuring the write-ability of the folder seems to have reduced the failures occurring in our process.