Skip to content

Chromium browser crashes when running UI tests with Docker image #837

@emmaaroche

Description

@emmaaroche

Description

UI tests fail with TargetClosedError when using chromium (the default browser) in the UI Docker container. The browser context fails to initialize, causing all tests to error during setup.

Steps to Reproduce

Requires UI Dockerfile from: #820

  1. Build the UI Docker image: docker build -t testsuite-ui:local -f ui.Dockerfile

  2. Run UI tests:

    docker run --rm \
      -v /tmp/ocp/kubeconfig:<cluster>:/run/kubeconfig:ro \
      -v $(pwd)/config/settings.local.yaml:/run/secrets.yaml:ro \
      -v $(pwd)/test-run-results:/test-run-results \
      testsuite-ui:local
    

Expected Behavior

Tests should run successfully with chromium browser.

Actual Behavior

Tests pass locally but when run in docker, all tests fail during setup with:
playwright._impl._errors.TargetClosedError: Browser.new_context: Target page, context or browser has been closed

Environment

  • Base Image: mcr.microsoft.com/playwright/python:v1.57.0-noble
  • Platform: linux/amd64
  • Tests affected: All UI tests (6 total)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    📋 Backlog

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions