Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

GitHub Codespaces Permission Error after Merging PR #8 #11

Open
okhiroyuki opened this issue Aug 3, 2024 · 1 comment
Open

GitHub Codespaces Permission Error after Merging PR #8 #11

okhiroyuki opened this issue Aug 3, 2024 · 1 comment

Comments

@okhiroyuki
Copy link

okhiroyuki commented Aug 3, 2024

Hi @akhildevelops

After merging PR #8, I started encountering permission errors in GitHub Codespaces. The issue seems to be related to changes introduced in this pull request.

    "ghcr.io/akhildevelops/devcontainer-features/android-cli:0": {
      "PACKAGES": "platform-tools,platforms;android-33,build-tools;33.0.2,ndk-bundle,ndk;24.0.8215888,cmake;3.22.1"
    }
#16 3.162  extracting: cmdline-tools/lib/README  
2024-08-03 13:58:53.782Z: #16 3.225 chown: 2024-08-03 13:58:53.935Z: invalid user: 'vscode:vscode'
2024-08-03 13:58:53.935Z: #16 3.229 ERROR: Feature "Android SDK Platform Tools" (ghcr.io/akhildevelops/devcontainer-features/android-cli) failed to install!
2024-08-03 13:58:54.343Z: #16 ERROR: process "/bin/sh -c cp -ar /tmp/build-features-src/android-cli_1 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/android-cli_1  && cd /tmp/dev-container-features/android-cli_1  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/android-cli_1" did not complete successfully: exit code: 1
2024-08-03 13:58:54.544Z: ------
2024-08-03 13:58:54.544Z:  > [dev_containers_target_stage 6/6] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=android-cli_1,target=/tmp/build-features-src/android-cli_1     cp -ar /tmp/build-features-src/android-cli_1 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/android-cli_1  && cd /tmp/dev-container-features/android-cli_1  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/android-cli_1:
2.636  extracting: cmdline-tools/lib/external/com/beust/jcommander/1.78/jcommander-1.78.jar  
2.637  extracting: cmdline-tools/lib/external/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.jar  
2.638  extracting: cmdline-tools/lib/lint/cli/cli.jar  
2.642  extracting: cmdline-tools/lib/lint/tools.lint-api.jar  
2.648  extracting: cmdline-tools/lib/lint/tools.lint-model.jar  
2.650  extracting: cmdline-tools/lib/build-system/builder-model/builder-model.jar  
2024-08-03 13:58:54.544Z: 2.651  extracting: cmdline-tools/lib/external/lint-psi/intellij-core/intellij-core-mvn.jar  
2024-08-03 13:58:54.547Z: 
2024-08-03 13:58:54.553Z: invalid user: 'vscode:vscode'
3.229 ERROR: Feature "Android SDK Platform Tools" (ghcr.io/akhildevelops/devcontainer-features/android-cli) failed to install!
------
2024-08-03 13:58:54.553Z: Dockerfile.extended:362024-08-03 13:58:54.553Z: 
--------------------
2024-08-03 13:58:54.553Z:   35 |     ENV ANDROID_HOME="/opt/android"
  36 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,source=android-cli_1,target=/tmp/build-features-src/android-cli_1 \
  37 | >>>     cp -ar /tmp/build-features-src/android-cli_1 /tmp/dev-container-features \2024-08-03 13:58:54.554Z: 
  38 | >>>  && chmod -R 0755 /tmp/dev-container-features/android-cli_1 \
  39 | >>>  && cd /tmp/dev-container-features/android-cli_1 \
  40 | >>>  && chmod +x ./devcontainer-features-install.sh \
  41 | >>>  && ./devcontainer-features-install.sh \2024-08-03 13:58:54.556Z: 
  42 | >>>  && rm -rf /tmp/dev-container-features/android-cli_1
  43 |     
--------------------
2024-08-03 13:58:54.557Z: ERROR: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/android-cli_1 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/android-cli_1  && cd /tmp/dev-container-features/android-cli_1  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/android-cli_1" did not complete successfully: exit code: 1
2024-08-03 13:58:54.558Z: {"outcome":"error","message":"Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.56.1-1722693527840 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/javascript-node:1-18 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-red-mobile-backend-fa28a712154d1740b9ffc97d506283d5153bd11a91b3d996a8680ee06163dbf7-features -f /tmp/devcontainercli-root/container-features/0.56.1-1722693527840/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder","description":"An error occurred setting up the container."}
2024-08-03 13:58:54.559Z: Stop: Run: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.56.1-1722693527840 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/javascript-node:1-18 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-red-mobile-backend-fa28a712154d1740b9ffc97d506283d5153bd11a91b3d996a8680ee06163dbf7-features -f /tmp/devcontainercli-root/container-features/0.56.1-1722693527840/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder
2024-08-03 13:58:54.568Z: Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.56.1-1722693527840 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/javascript-node:1-18 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-red-mobile-backend-fa28a712154d1740b9ffc97d506283d5153bd11a91b3d996a8680ee06163dbf7-features -f /tmp/devcontainercli-root/container-features/0.56.1-1722693527840/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder
2024-08-03 13:58:54.569Z:     at O$ (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:464:1253)
2024-08-03 13:58:54.571Z:     at iK (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:464:997)
2024-08-03 13:58:54.571Z:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-08-03 13:58:54.571Z:     at async gAA (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:481:3660)
2024-08-03 13:58:54.573Z: devcontainer process exited with exit code 1
2024-08-03 13:58:54.574Z:     at async BC (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:481:4775)
2024-08-03 13:58:54.576Z:     at async xeA (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:614:11265)
2024-08-03 13:58:54.577Z:     at async UeA (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:614:11006)

====================================== ERROR ====================================
2024-08-03 13:58:54.590Z: Failed to create container.
=================================================================================
2024-08-03 13:58:54.591Z: Error: Command failed: docker buildx build --load --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.56.1-1722693527840 --build-arg _DEV_CONTAINERS_BASE_IMAGE=mcr.microsoft.com/devcontainers/javascript-node:1-18 --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp --target dev_containers_target_stage -t vsc-red-mobile-backend-fa28a712154d1740b9ffc97d506283d5153bd11a91b3d996a8680ee06163dbf7-features -f /tmp/devcontainercli-root/container-features/0.56.1-1722693527840/Dockerfile.extended /var/lib/docker/codespacemount/.persistedshare/empty-folder
2024-08-03 13:58:54.597Z: Error code: 1302 (UnifiedContainersErrorFatalCreatingContainer)

====================================== ERROR ====================================
2024-08-03 13:58:54.612Z: Container creation failed.
=================================================================================
2024-08-03 13:58:54.636Z: 

@vorburger
Copy link
Contributor

chown: 2024-08-03 13:58:53.935Z: invalid user: 'vscode:vscode'

That's strange... maybe it runs "too early", before that UID/gid get created?

At this point, the easiest way to fix that is just to revert my change which added that; I'll raise a PR for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants