game-ci / docker

Series of CI-specialised docker images for Unity.
https://hub.docker.com/u/unityci
MIT License
392 stars 121 forks source link

Licensing issue with non root user #242

Open Mythique opened 3 months ago

Mythique commented 3 months ago

If I run the editor in batch mode, and set the user parameter, I end up with this error :

[Licensing::Module] Trying to connect to existing licensing client channel...
[Licensing::IpcConnector] Connection attempt to the License Client on channel: "LicenseClient-" failed because channel doesn't exist; code: "0x80000002"
[Licensing::Module] Successfully launched the LicensingClient (PId: 9)
[Licensing::IpcConnector] Connection attempt to the License Client on channel: "LicenseClient-" failed because channel doesn't exist; code: "0x80000002"
[Licensing::Module] Timed-out after 60.00s, waiting for channel: "LicenseClient-"
IPC channel to LicensingClient doesn't exist; aborting

This is the command that was started: docker run --user 10000:1004 --rm --volume "pathToUnityProject":/app --workdir /app unityci/editor:ubuntu-2020.3.48f1-android-3.0.1 /bin/bash -c "./AnotherScript.sh" Here is the content of AnotherScript: /opt/unity/Editor/Unity -batchmode -nographics -quit -projectPath /app -logFile logAndroid.txt -noUpm -username 'username' -password 'password' -serial SERIAL -executeMethod AssetBundleCreator.BuildAsset

If I try to run the same command without specifying a user, Unity is started properly and the BuildAsset method is executed.

Unfortunately, having the possibility to run as another user would solve one of my issue. I'll explain it briefly, just to show my use case:

There's of course other ways to fix my issue, but I'm surprised that I can not run the program as another user. I don't know if it is a bug with Unity, your docker image, or maybe a missunderstanding from my part.