Open
Description
When I attempted to create a new GitHub codespace from enola-dev/enola#518,
please note that I am filing this problem using the original first commit 0637b590347653481c7675fa3fc94e88b4a58cdc of that PR, but will shortly be amending the PR with further experimentation, the initial .devcontainer/devcontainer.json
looked like this, with all comments removed, just for brevity:
{
"name": "Enola.dev's Dev Containers.dev",
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
"onCreateCommand": "/workspaces/enola/test.bash",
"features": {
"ghcr.io/devcontainers-community/features/bazel:1": {
"bazelisk_version": "v1.19.0"
},
"ghcr.io/devcontainers/features/java:1": {
"version": "21",
"installMaven": "false",
"installGradle": "false"
}
},
"hostRequirements": {
"cpus": 16
}
}
it failed like this - and I thought this compressed JavaScript gibberish log was "not very helpful" to understand problem:
2024-02-20 21:47:30.848Z: Host information
2024-02-20 21:47:30.858Z: ----------------
2024-02-20 21:47:30.859Z: OS: Ubuntu 22.04.3 LTS (stable release)
2024-02-20 21:47:30.860Z: Image details: https://github.com/github/codespaces-host-images/blob/main/README.md
2024-02-20 21:47:30.862Z: ----------------
=================================================================================
2024-02-20 21:47:30.863Z: Configuration starting...
2024-02-20 21:47:30.865Z: Cloning...
2024-02-20 21:47:30.880Z: $ git -C "/var/lib/docker/codespacemount/workspace" clone --branch "codespaces-again" --depth 1 https://github.com/vorburger/enola "/var/lib/docker/codespacemount/workspace/enola"
2024-02-20 21:47:30.991Z: Cloning into '/var/lib/docker/codespacemount/workspace/enola'...
2024-02-20 21:47:32.558Z: git process exited with exit code 0
2024-02-20 21:47:32.562Z: $ git -C "/var/lib/docker/codespacemount/workspace/enola" config --local remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
2024-02-20 21:47:32.565Z: git process exited with exit code 0
2024-02-20 21:47:32.680Z: Using image: mcr.microsoft.com/devcontainers/universal
=================================================================================
2024-02-20 21:47:33.015Z: Creating container...
2024-02-20 21:47:33.049Z: $ devcontainer up --id-label Type=codespaces --workspace-folder /var/lib/docker/codespacemount/workspace/enola --mount type=bind,source=/.codespaces/agent/mount/cache,target=/vscode --user-data-folder /var/lib/docker/codespacemount/.persistedshare --container-data-folder .vscode-remote/data/Machine --container-system-data-folder /var/vscode-remote --log-level trace --log-format json --update-remote-user-uid-default never --mount-workspace-git-root false --omit-config-remote-env-from-metadata --skip-non-blocking-commands --skip-post-create --config "/var/lib/docker/codespacemount/workspace/enola/.devcontainer/devcontainer.json" --override-config /root/.codespaces/shared/merged_devcontainer.json --default-user-env-probe loginInteractiveShell --container-session-data-folder /workspaces/.codespaces/.persistedshare/devcontainers-cli/cache --secrets-file /root/.codespaces/shared/user-secrets-envs.json
2024-02-20 21:47:33.214Z: @devcontainers/cli 0.56.1. Node.js v18.19.0. linux 6.2.0-1019-azure x64.
2024-02-20 21:47:33.401Z: Resolving Feature dependencies for 'ghcr.io/devcontainers-community/features/bazel:1'...
2024-02-20 21:47:33.994Z: Resolving Feature dependencies for 'ghcr.io/devcontainers/features/java:1'...
2024-02-20 21:47:34.458Z: Soft-dependency 'ghcr.io/devcontainers/features/common-utils' is not required. Removing from installation order...
2024-02-20 21:47:34.851Z: /.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:11
2024-02-20 21:47:34.856Z: devcontainer process exited with exit code 1
2024-02-20 21:47:35.441Z: `).reduce(ZO,Object.create(null)),ZO=(e,A)=>{let t=parseInt(A,10);if(t!==Buffer.byteLength(A)+1)return e;A=A.slice((t+" ").length);let i=A.split("="),r=i.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!r)return e;let n=i.join("=");return e[r]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(r)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,e};CS.exports=LI});var bs=G((soA,BS)=>{BS.exports=e=>{let A=e.length-1,t=-1;for(;A>-1&&e.charAt(A)==="/";)t=A,A--;return t===-1?e:e.slice(0,t)}});var GB=G((goA,ES)=>{"use strict";ES.exports=e=>class extends e{warn(A,t,i={}){this.file&&(i.file=this.file),this.cwd&&(i.cwd=this.cwd),i.code=t instanceof Error&&t.code||A,i.tarCode=A,!this.strict&&i.recoverable!==!1?(t instanceof Error&&(i=Object.assign(t,i),t=t.message),this.emit("warn",i.tarCode,t,i)):t instanceof Error?this.emit("error",Object.assign(t,i)):this.emit("error",Object.assign(new Error(`${A}: ${t}
(...)
+,this.inc("pre",t,i);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,i);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,i),this.inc("pre",t,i);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",t,i),this.inc("pre",t,i);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.
====================================== ERROR ====================================
2024-02-20 21:47:35.447Z: Failed to create container.
=================================================================================
2024-02-20 21:47:35.448Z: Error:
2024-02-20 21:47:35.451Z: Error code: 1302 (UnifiedContainersErrorFatalCreatingContainer)
====================================== ERROR ====================================
2024-02-20 21:47:35.452Z: Container creation failed.
=================================================================================
2024-02-20 21:47:35.454Z:
===================================== WARNING ===================================
2024-02-20 21:47:35.455Z: Creating recovery container.
=================================================================================
(...)
Perhaps you would consider making this more end-user friendly, and print some more understandable root cause of the failure?