Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wp-env package: error when starting previously stopped projects (wsl2) #46550

Closed
Shelob9 opened this issue Dec 14, 2022 · 3 comments
Closed

wp-env package: error when starting previously stopped projects (wsl2) #46550

Shelob9 opened this issue Dec 14, 2022 · 3 comments
Labels
Needs Testing Needs further testing to be confirmed. [Status] Needs More Info Follow-up required in order to be actionable. [Tool] Env /packages/env

Comments

@Shelob9
Copy link
Contributor

Shelob9 commented Dec 14, 2022

Description

I am using wp-env on Windows 10, with wsl2 and Ubuntu-20.04. I can start a project and it works fine. When I run wp-env start on a stopped project I get a Docker error.

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/34ec5833acc422103f08cf6d54e92ac4931609adcd09f7a99577979325d327df" to rootfs at "/var/www/html": mount /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/34ec5833acc422103f08cf6d54e92ac4931609adcd09f7a99577979325d327df:/var/www/html (via /proc/self/fd/14), flags: 0x5000: no such file or directory: unknown

Step-by-step reproduction instructions

  1. Create new project
  2. Start env
  3. Stop env
  4. npm run env start

Steps to resolve:

  • In Docker Desktop delete all projects with random hashes for names
  • npm run env start

Screenshots, screen recording, code snippet

No response

Environment info

  • Windows 10 with wsl2 and Ubuntu-20.04.
  • Docker Desktop v 4.14.1
  • Node v16.18.1
"devDependencies": {
    "@wordpress/env": "^5.4.0",
    "@wordpress/eslint-plugin": "^13.3.0",
    "@wordpress/scripts": "^24.3.0",
    "npm-run-all": "^4.1.5",
    "parse-gitignore": "^0.5.1"
  },
  "dependencies": {
    "@wordpress/api-fetch": "^6.19.0",
    "@wordpress/blocks": "^11.21.0",
    "@wordpress/components": "^22.1.0",
    "@wordpress/data": "^7.6.0",
    "@wordpress/dom-ready": "^3.22.0",
    "@wordpress/edit-post": "^6.19.0",
    "@wordpress/icons": "^9.13.0",
    "@wordpress/plugins": "^4.20.0",
    "archiver": "^5.3.1"
  }

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@kathrynwp kathrynwp added [Type] Bug An existing feature does not function as intended [Tool] Env /packages/env labels Dec 14, 2022
@t-hamano
Copy link
Contributor

Thanks for the report.
I always run wp-env on WSL2 as well and have never encountered that error.

You might try the following:

  • Delete all docker containers/images/volumes
  • Delete the folder where WordPress is installed (You can check with npm run wp-env install-path)
  • Reset Ubuntu

Please note that these commands may result in the loss of data stored on the WSL.

@t-hamano t-hamano added Needs Testing Needs further testing to be confirmed. and removed [Type] Bug An existing feature does not function as intended labels Dec 18, 2022
@Mamaduka Mamaduka added the [Status] Needs More Info Follow-up required in order to be actionable. label Jan 10, 2023
@Mamaduka
Copy link
Member

Hi, @Shelob9

I just wanted to check if you were able to resolve the problem based on @t-hamano's instructions.

@Shelob9
Copy link
Contributor Author

Shelob9 commented Jan 17, 2023

@Mamaduka Yes, that does work.

@Shelob9 Shelob9 closed this as completed Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Needs further testing to be confirmed. [Status] Needs More Info Follow-up required in order to be actionable. [Tool] Env /packages/env
Projects
None yet
Development

No branches or pull requests

4 participants