Not able to read traces generated with pytest-playwright with playwright show-trace command

I’m using pytest-playwright running in a debian container and trying to follow their docs.

playwright         1.43.0
pytest-playwright  0.5.0

I just ran

pip install pytest-playwright
playwright install
playwright install-deps

Basic tests from the docs:

import re
from playwright.sync_api import Page, expect

def test_has_title(page: Page):
    page.goto("https://playwright.dev/")

    # Expect a title "to contain" a substring.
    expect(page).to_have_title(re.compile("Playwright"))

def test_get_started_link(page: Page):
    page.goto("https://playwright.dev/")

    # Click the get started link.
    page.get_by_role("link", name="Get started").click()

    # Expects page to have a heading with the name of Installation.
    expect(page.get_by_role("heading", name="Installation")).to_be_visible()

I run pytest -vv --tracing on to generate traces.

Try to view them: playwright show-trace blah/trace.zip

Get this error:

playwright show-trace test-results/test-basic-py-test-get-started-link-chromium/trace.zip
  pw:browser <launching> /root/.cache/ms-playwright/chromium-1112/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=ImprovedCookieControls,LazyFrameLoading,GlobalMediaControls,DestroyProfileOnBrowserClose,MediaRouter,DialMediaRouteProvider,AcceptCHFrame,AutoExpandDetailsElement,CertificateTransparencyComponentUpdater,AvoidUnnecessaryBeforeUnloadCheckSync,Translate,HttpsUpgrades,PaintHolding --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --no-sandbox --app=data:text/html, --window-size=1280,800 --test-type= --user-data-dir=/tmp/playwright_chromiumdev_profile-PiCNtL --remote-debugging-pipe about:blank +0ms
  pw:browser <launched> pid=1940 +7ms
  pw:browser [pid=1940][err] [0509/143817.126425:WARNING:stack_trace_posix.cc(918)] Failed to open file: /mnt/lima-rosetta/rosetta +53ms
  pw:browser [pid=1940][err]   Error: Success +1ms
  pw:browser [pid=1940][err] [0509/143817.232732:WARNING:stack_trace_posix.cc(918)] Failed to open file: /mnt/lima-rosetta/rosetta +103ms
  pw:browser [pid=1940][err]   Error: Success +0ms
  pw:browser [pid=1940][err] [0509/143817.232738:WARNING:stack_trace_posix.cc(918)] Failed to open file: /mnt/lima-rosetta/rosetta +1ms
  pw:browser [pid=1940][err]   Error: Success +0ms
  pw:browser [pid=1940][err] [1940:1955:0509/143817.346236:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory +111ms
  pw:browser [pid=1940][err] [1940:1940:0509/143817.352343:ERROR:ozone_platform_x11.cc(243)] Missing X server or $DISPLAY +6ms
  pw:browser [pid=1940][err] [1940:1940:0509/143817.352359:ERROR:env.cc(258)] The platform failed to initialize.  Exiting. +1ms
  pw:browser [pid=1940] <gracefully close start> +36ms
  pw:browser [pid=1940] <kill> +2ms
  pw:browser [pid=1940] <will force kill> +0ms
  pw:browser [pid=1940] <process did exit: exitCode=1, signal=null> +1ms
  pw:browser [pid=1940] starting temporary directories cleanup +0ms
  pw:browser [pid=1940] finished temporary directories cleanup +6ms
  pw:browser [pid=1940] <gracefully close end> +0ms
Error: Protocol error (Browser.getVersion): Internal server error, session closed.

Error about Missing X server or $DISPLAY +6ms doesn’t make sense because it runs headless by default: https://playwright.dev/python/docs/test-runners

I read somewhere maybe I need to disable the gpu but I see no options for that. I’m using the pytest plugin which I think means I should not be creating a browser context myself in code correct?

I tried to disable the GPU like this but I’m not sure if its correct because they have no official examples of how to properly use browser_type_launch_args: https://playwright.dev/python/docs/test-runners

@pytest.fixture(scope="session")
def browser_type_launch_args(browser_type_launch_args):
    return {**browser_type_launch_args, "args": ["--disable-gpu"]}

I’m just trying to use pytest-playwright with their most basic examples.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật