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

[🐛 Bug]: Poetry installs are failing due to /opt/venv directory existing. #2768

Closed
b4handjr opened this issue Apr 8, 2025 · 3 comments · Fixed by #2769
Closed

[🐛 Bug]: Poetry installs are failing due to /opt/venv directory existing. #2768

b4handjr opened this issue Apr 8, 2025 · 3 comments · Fixed by #2769

Comments

@b4handjr
Copy link

b4handjr commented Apr 8, 2025

What happened?

Using the 4.31.0 image, I noticed that our integration tests on CircleCI were reporting an error about permissions.

Upon further infestation it seems that the /opt/venv directory is already created and is owned by the root user. Rolling back to image 4.30.0 seems to fix the issue as the /opt/venv directory doesn't exist.

Command used to start Selenium Grid with Docker (or Kubernetes)

firefox:
    image: selenium/standalone-firefox
    env_file: .env
    platform: linux/amd64
    environment:
      - MOZ_HEADLESS
      - FIREFOX_CHANNEL
      - PYTEST_ARGS
      - INTEGRATION_TEST_KINTO_URL
      - INTEGRATION_TEST_NGINX_URL
    volumes:
      - .:/code
      - /code/experimenter/tests/integration/.tox
    depends_on:
      - nginx
      - kinto
      - ping-server
      - demo-app-frontend
    expose:
      - "4444"
    ports:
      - "5900:5900"
      - "7902:7900"
    shm_size: 2g
    working_dir: /code

Relevant log output

Installing dependencies from lock file
The lock file might not be compatible with the current version of Poetry.
Upgrade Poetry to ensure the lock file is read properly or, alternatively, regenerate the lock file with the `poetry lock` command.

Package operations: 66 installs, 4 updates, 0 removals

  - Installing attrs (23.2.0): Failed

  PermissionError

  [Errno 13] Permission denied: '/opt/venv/lib/python3.12/site-packages/attr'

  at /usr/lib/python3.12/pathlib.py:1313 in mkdir
      1309│         """
      1310│         Create a new directory at this given path.
      1311│         """
      1312│         try:
    → 1313│             os.mkdir(self, mode)
      1314│         except FileNotFoundError:
      1315│             if not parents or self.parent == self:
      1316│                 raise
      1317│             self.parent.mkdir(parents=True, exist_ok=True)

Cannot install attrs.

Operating System

Ubuntu

Docker Selenium version (image tag)

4.31.0-20250404

Selenium Grid chart version (chart version)

No response

Copy link

github-actions bot commented Apr 8, 2025

@b4handjr, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@b4handjr b4handjr changed the title [🐛 Bug]: Poetry install are vailing due to /opt/venv directory existing. [🐛 Bug]: Poetry installs are failing due to /opt/venv directory existing. Apr 8, 2025
@VietND96
Copy link
Member

VietND96 commented Apr 8, 2025

Yes, in the recent version, we changed something that initialized venv for script utilities. Let me check on this

@b4handjr
Copy link
Author

Thanks for the quick fix!

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

Successfully merging a pull request may close this issue.

2 participants