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

Building on self-hosted Windows 11: dockerWorkspacePath doesn't update --workdir

Open ah1053 opened this issue 10 months ago • 7 comments

Bug description Running Unity Builder on Windows 11 self-hosted results in this error docker: Error response from daemon: the working directory 'c:/github/workspace' is invalid, it needs to be an absolute path.

Passing in dockerWorkspacePath as prompted doesn't seem to have an effect

Any help is appreciated

How to reproduce

  • Setup a self-hosted runner on Windows 11 and run unity builder with default args but
game-ci/unity-builder@v4
  with:
    targetPlatform: Android
    dockerWorkspacePath: /github/workspace
    unityVersion: auto
    versioning: Semantic
    androidExportType: androidPackage
    androidSymbolType: none
    runAsHostUser: false
    dockerIsolationMode: default
    containerRegistryRepository: unityci/editor
    containerRegistryImageVersion: [3](https://github.com/storyup/healium-xr-oculus-new/actions/runs/8528284125/job/23361561125#step:4:3)
    awsStackName: game-ci
    providerStrategy: local
    kubeVolumeSize: [5](https://github.com/storyup/healium-xr-oculus-new/actions/runs/8528284125/job/23361561125#step:4:5)Gi
    watchToEnd: true
    cacheUnityInstallationOnMac: false
    skipActivation: false
  env:
    UNITY_SERIAL: ***
    UNITY_EMAIL: ***
    UNITY_PASSWORD: ***

Expected behavior

Adding dockerWorkspacePath will override the --workdir however it doesn't

"C:\Program Files\Docker\Docker\resources\bin\docker.exe" run 
--workdir c:/github/workspace --rm 
--env UNITY_EMAIL=*** --env UNITY_PASSWORD=*** 
--env UNITY_SERIAL=*** --env SKIP_ACTIVATION=false --env UNITY_VERSION=2021.3.4f1 --env PROJECT_PATH=. --env BUILD_TARGET=Android --env BUILD_NAME=Android --env BUILD_PATH=build/Android --env BUILD_FILE=Android.apk --env MANUAL_EXIT=false --env ENABLE_GPU=false --env VERSION=3.0.1 --env ANDROID_VERSION_CODE=3000001 --env ANDROID_EXPORT_TYPE=androidPackage --env ANDROID_SYMBOL_TYPE=none --env RUN_AS_HOST_USER=false --env GITHUB_REF=refs/heads/test-action --env GITHUB_SHA=056aca9a99267e9142cd9f59ec0d4fc1a6b6e2e5 --env GITHUB_REPOSITORY=storyup/healium-xr-oculus-new --env GITHUB_ACTOR=ah1053 --env "GITHUB_WORKFLOW=Build project" --env GITHUB_EVENT_NAME=push --env GITHUB_ACTION=__game-ci_unity-builder --env GITHUB_EVENT_PATH=C:\Users\ahmed\actions-runner\_work\_temp\_github_workflow\event.json --env RUNNER_OS=Windows --env RUNNER_TOOL_CACHE=C:\Users\ahmed\actions

Additional details

ah1053 avatar Apr 02 '24 19:04 ah1053

I am also running into this, any solutions?

canuc avatar May 23 '24 00:05 canuc

can confirm this is happening for me as well, on windows 10 would love a fix for this as it's currently blocking

edit: ah, I see the issue, actually. on windows it prepends c: to the front of the dockerWorkspacePath, so it is changing the value of workdir, it's just in our case we're using github/workspace, so it appears to be the same. that being said, it's still giving this error regardless:

docker: Error response from daemon: the working directory 'c:/github/workspace' is invalid, it needs to be an absolute path.

roomyrooms avatar Aug 27 '24 21:08 roomyrooms

I'm running into this exact same problem as well and it's stopping me from being able to run on Windows hosts... image

And can also confirm that adding the dockerWorkspacePath doesn't change it at all. Any ideas?

Mannilie avatar Sep 14 '24 03:09 Mannilie

@roomyrooms , the quick and dirty workaround I found was to just downgrade the game-ci/unity-builder@v2 (because v3 still has the same issue) and it works successfully. I know this isn't a good solution but this apparently unblocks me for the time being until it's fixed: image

Mannilie avatar Sep 14 '24 03:09 Mannilie

Thanks for sharing the workaround. Happy to merge a PR if someone has suggested changes.

webbertakken avatar Sep 16 '24 16:09 webbertakken

(EDIT: never mind, I saw the discussion in the PR re. switching to windows containers.)

@Mannilie I'm running into the same workspace path problem and tried downloading to unity-builder@v2 but get a problem with the docker image not being available: docker: Error response from daemon: manifest for unityci/editor:windows-2022.3.30f1-windows-il2cpp-1 not found: manifest unknown: manifest unknown.

I'm fairly new to game.ci so may be overlooking something obvious - how are you obtaining an image with a '-1' suffix for the v2 builder?

dri-richard avatar Sep 24 '24 08:09 dri-richard

Here’s an explanation of the "not found: manifest unknown" error regarding version 2 of game-ci/unity-builder:

The error:

docker: Error response from daemon: manifest for unityci/editor:windows-2022.3.30f1-windows-il2cpp-1 not found: manifest unknown: manifest unknown.

occurs because game-ci/unity-builder@2 is outdated and relies on older Docker images, specifically version 1 of the images, which are no longer published for new Unity releases.

You could use the customimage parameter, but recent images may not be compatible with the older action.

The correct approach would be to upgrade to the latest version of game-ci/unity-builder, which is version 4. This version uses updated Docker images and addresses many compatibility issues. You can check the latest releases here. Using version 4 ensures that you are using the latest supported Docker images, preventing such errors.

You can find available Docker images here:

  • unityci/editor:windows-2022.3.30f1-windows-il2cpp-1 🔴 This image is not available.
  • unityci/editor:windows-2022.3.30f1-windows-il2cpp-2 🔴 This image is not available.
  • unityci/editor:windows-2022.3.30f1-windows-il2cpp-3 🟢 This image is available.

You can find more details about Docker images here and see Docker image releases here.

Solution

As mentioned, the solution has been discussed in the related PR. Specifically, this comment addresses the original issue. It might be worth documenting this somewhere for future reference. 🤔

GabLeRoux avatar Sep 24 '24 12:09 GabLeRoux