dev-environments icon indicating copy to clipboard operation
dev-environments copied to clipboard

Can't delete Dev Environment

Open MagicalBomb opened this issue 3 years ago • 2 comments

Describe the bug When I want to delete a dev environment, it tips me "Error: TypeError: error.toJSON is not a function"

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Dev Environments'
  2. Click on 'Create'
  3. Click on 'Get Started'
  4. Click on 'Locale Directory'
  5. Click on 'Select'
  6. Select an empty directory
  7. Click on Continue
  8. WIndow closed
  9. You can't delete dev environments you just created

Expected behavior Enter next setup step

Screenshots image

Desktop (please complete the following information):

  • OS: macOS
  • Version 11.6.2

Version of Docker Desktop:

4.3.2 (72729)

MagicalBomb avatar Dec 29 '21 06:12 MagicalBomb

Hey @MagicalBomb, thanks for reporting the issue.

While we fix it, please try removing the existing dev env from the ~/.docker/devenvironments/data.json and delete the associated directories too.

felipecruz91 avatar Jan 03 '22 07:01 felipecruz91

delete the associated directories

Can someone please provide more information about exactly which directories and images can be removed? Assuming I have the default example 'Go' dev environment dockersamples/single-dev-env:

There is a directory e.g. ~/.docker/devenvironments/single-dev-env-charming_grothendieck which I can delete, sure. There are a couple of volumes volume-single-dev-env-charming_grothendieck and vsCodeServerVolume-single-dev-env-charming_grothendieck - delete those?

There are also a couple of docker/desktop-git-helper images (not sure why there are two?) and crazymax/linguist - presumably these should all be kept just in case another dev environment is created.

docker/desktop-git-helper    6d03332b2f0c03ace31c9bca98de4830908e5bcc   4c4669551643   5 months ago   42.9MB
crazymax/linguist            7.17.0                                     8f263c71d27c   5 months ago   70.9MB
docker/desktop-git-helper    5a4fca126aadcd3f6cc3a011aa991de982ae7000   9c0a9e13692c   8 months ago   43.2MB

Update

I tried deleting a dev environment using docker desktop 4.7.0 (77141) UI and it worked. It updated data.json, deleted the associated dir in ~/.docker/devenvironments and deleted the two volumes. The only thing it doesn't do is delete any of the images, which is fair enough.

Then I created the same dev environment again specifying https://github.com/dockersamples/single-dev-env.git and whilst the same artefacts were created, the dev environment won't start - grrr.

abulka avatar Apr 10 '22 01:04 abulka