Since upgrading from 2019.4 to 2022.2, batchmode fails 100% of the time with these errors:
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
12:55:01 in directory: C:\BuildAgent\work\17ae024074141d99
12:55:01 [Licensing::Module] Trying to connect to existing licensing client channel...
12:55:01 [Licensing::IpcConnector] Successfully connected to the License Client on channel: "LicenseClient-Greg"
12:55:01 Process exited with code 1
12:55:02 [Licensing::Client] Handshaking with LicensingClient:
12:55:02 Version: 1.12.0+3acf7bc
12:55:02 Session Id: de008a0823f04d9289f30f3aafc12d0e
12:55:02 Correlation Id: 8a9fbe86a52f4b500c4e51b639749342
12:55:02 External correlation Id: 7839643772814491941
12:55:02 Machine Id: x5V169D0QtsZvguOOrKIxBcQrBY=
12:55:02 [Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-Greg" (connect: 0.00s, validation: 0.01s, handshake: 0.90s)
12:55:02 [Licensing::IpcConnector] Successfully connected to the License Notification on channel: "LicenseClient-Greg-notifications"
12:55:02 [Licensing::Module] Error: Access token is unavailable; failed to update
12:55:02 [Licensing::Module] Error: Failed to activate entitlement license
12:55:02 [Licensing::Module] Error: Access token is unavailable; failed to update
12:55:02 [Licensing::Module] Error: Failed to activate ULF license
In 2019.4, it returns the following and continues the build:
12:09:53 [LicensingClient] ERROR Failed to connect to local IPC
12:09:53 [Licensing::Module] Failed to connect to channel: LicenseClient-Greg
12:09:53 [Licensing::Module] Successfully launched the LicensingClient
12:09:55 [Licensing::Module] Successfully connected to LicensingClient on channel: LicenseClient-Greg
12:09:55 [Licensing::Module] Successfully launched and connected to LicensingClient
12:09:55 Entitlement-based licensing initiated
12:09:55 [LicensingClient] Licenses Updated successfully in LicensingClient
12:09:55
12:09:55 LICENSE SYSTEM [2023318 12:9:55] Next license update check is after 2023-03-19T17:53:11
12:09:55
12:09:55
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).
12:09:55 Built from '2019.4/staging' branch; Version is '2019.4.40f1 (ffc62b691db5) revision 16762411'; Using compiler version '191627012'
I have the same question on 2020.3.46f1 after upgrade from 2020.3.14f1
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
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
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.
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.
1 Like
Did anyone work out how to fix this?
We’re also dealing with this for a CI process that is hosted on BitRise for iOS and Android builds.
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.
Following back up, this problem has begun to show up again.
Going by our steps, the first few seem to work, but then it’ll start failing on the 2nd run of the editor.