Failed to start codespace for ASP.NET Identity training module

Roland Eriksson 20 Reputation points
2024-09-22T14:39:32.8233333+00:00

Training: https://learn.microsoft.com/en-us/training/modules/secure-aspnet-core-identity/3-add-identity

When trying to start the codespace it started up and after about three minutes displayed a message "Workspace does not exist". After clicking either Open Workspace or Cancel I got the message:

User's image

I found this error in the creation.log:

[?25h2024-09-22 14:27:08.575Z: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /var/lib/docker/codespacemount/workspace/mslearn-secure-aspnet-core-identity/.devcontainer/persisted-data/.aspnet
2024-09-22 14:27:08.578Z: Stop: Run: docker compose --project-name mslearn-secure-aspnet-core-identity_devcontainer -f /var/lib/docker/codespacemount/workspace/mslearn-secure-aspnet-core-identity/.devcontainer/docker-compose.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose.codespaces.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose/docker-compose.devcontainer.build-1727015151171.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose/docker-compose.devcontainer.containerFeatures-1727015204460-cd68268b-a803-420f-8035-6990c8bbb89a.yml up -d
2024-09-22 14:27:08.583Z: Error: Command failed: docker compose --project-name mslearn-secure-aspnet-core-identity_devcontainer -f /var/lib/docker/codespacemount/workspace/mslearn-secure-aspnet-core-identity/.devcontainer/docker-compose.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose.codespaces.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose/docker-compose.devcontainer.build-1727015151171.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose/docker-compose.devcontainer.containerFeatures-1727015204460-cd68268b-a803-420f-8035-6990c8bbb89a.yml up -d
2024-09-22 14:27:08.583Z:     at ltA (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:430:3355)
2024-09-22 14:27:08.583Z:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2024-09-22 14:27:08.583Z:     at async ctA (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:410:3506)
2024-09-22 14:27:08.583Z:     at async YtA (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:482:3944)
2024-09-22 14:27:08.583Z:     at async eB (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:482:4886)
2024-09-22 14:27:08.583Z:     at async prA (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:663:200)
2024-09-22 14:27:08.583Z:     at async drA (/.codespaces/agent/bin/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:662:14706)
2024-09-22 14:27:08.583Z: {"outcome":"error","message":"Command failed: docker compose --project-name mslearn-secure-aspnet-core-identity_devcontainer -f /var/lib/docker/codespacemount/workspace/mslearn-secure-aspnet-core-identity/.devcontainer/docker-compose.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose.codespaces.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose/docker-compose.devcontainer.build-1727015151171.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose/docker-compose.devcontainer.containerFeatures-1727015204460-cd68268b-a803-420f-8035-6990c8bbb89a.yml up -d","description":"An error occurred starting Docker Compose up."}
2024-09-22 14:27:08.589Z: devcontainer process exited with exit code 1

====================================== ERROR ====================================
2024-09-22 14:27:08.599Z: Failed to create container.
=================================================================================
2024-09-22 14:27:08.599Z: Error: Command failed: docker compose --project-name mslearn-secure-aspnet-core-identity_devcontainer -f /var/lib/docker/codespacemount/workspace/mslearn-secure-aspnet-core-identity/.devcontainer/docker-compose.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose.codespaces.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose/docker-compose.devcontainer.build-1727015151171.yml -f /var/lib/docker/codespacemount/.persistedshare/docker-compose/docker-compose.devcontainer.containerFeatures-1727015204460-cd68268b-a803-420f-8035-6990c8bbb89a.yml up -d
2024-09-22 14:27:08.601Z: Error code: 1302 (UnifiedContainersErrorFatalCreatingContainer)


This question is related to the following Learning Module

Community Center | Not monitored
{count} votes

Answer accepted by question author
  1. Pradeep M 9,875 Reputation points Microsoft External Staff Moderator
    2024-09-23T07:25:31.47+00:00

    Hi Roland Eriksson,

    Thank you for reaching out to us on the Microsoft Q&A forum. 

    It appears that the issue you are encountering is specific to GitHub Codespaces, while everything functions correctly in local Visual Studio Code environment. I recommend continuing your learning with the local setup, as it allows you to run and test the project without any complications.

    Please note that the issues in Codespaces may be addressed in future updates, so it could be beneficial to revisit the environment once improvements are implemented. If you have any further questions or require additional assistance, please do not hesitate to reach out.

    If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.       

    Thank you. 

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.