playwright: [Bug]: Error: browserContext._wrapApiCall: Target page, context or browser has been closed

Version

1.51.0

Steps to reproduce

Unfortunately, I don’t have a precise reproduction scenario. I’ve added DEBUG=pw:browser and shared that output below. On version 1.50.1, it doesn’t happen at all, and at 1.51.0, it happens frequently.

In the screen shot, the tracer:

  1. Doesn’t have any evidence of browser in the timeline
  2. After hooks failure with nothing prevented as failed in it.
  3. The exception
Image

Expected behavior

Browser to stay alive till test end

Actual behavior

Browser crashes during the test execution

Additional context

DEBUG=pw:browser:

  pw:browser <launching> /ms-playwright/chromium-1161/chrome-linux/chrome --disable-field-trial-config --disable-background-networking --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=AcceptCHFrame,AutoExpandDetailsElement,AvoidUnnecessaryBeforeUnloadCheckSync,CertificateTransparencyComponentUpdater,DeferRendererTasksAfterInput,DestroyProfileOnBrowserClose,DialMediaRouteProvider,ExtensionManifestV2Disabled,GlobalMediaControls,HttpsUpgrades,ImprovedCookieControls,LazyFrameLoading,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate --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 --enable-automation --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --disable-web-security --user-data-dir=/tmp/playwright_chromiumdev_profile-cplZpl --remote-debugging-pipe --no-startup-window +0ms
  pw:browser <launched> pid=2488 +5ms
  pw:browser [pid=2488][err] [2488:2503:0310/042033.063258:ERROR:bus.cc(408)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory +109ms
  pw:browser [pid=2488][err] [2488:2506:0310/042033.065881:ERROR:bus.cc(408)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory +2ms
  pw:browser [pid=2488][err] [2488:2506:0310/042033.065972:ERROR:bus.cc(408)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory +0ms
  pw:browser [pid=2488][err] [2488:2503:0310/042033.069597:ERROR:bus.cc(408)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") +3ms
  pw:browser [pid=2488][err] [2488:2503:0310/042033.069719:ERROR:bus.cc(408)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") +0ms
  pw:browser [pid=2488][err] [2488:2503:0310/042033.069736:ERROR:bus.cc(408)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") +1ms
  pw:browser [pid=2488][err] [2488:2503:0310/042033.069748:ERROR:bus.cc(408)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") +0ms
  pw:browser [pid=2488][err] [2488:2503:0310/042033.083236:ERROR:bus.cc(408)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") +13ms
  pw:browser [pid=2488][err] [2488:2503:0310/042033.098582:ERROR:bus.cc(408)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") +15ms
  pw:browser [pid=2488][err] [2488:2503:0310/042033.108950:ERROR:bus.cc(408)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") +11ms
  pw:browser [pid=2488][err] [2488:2488:0310/042033.111653:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:  +2ms
  pw:browser [pid=2488][err] [2488:2488:0310/042033.150041:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:  +39ms
  pw:browser [pid=2488][err] [2488:2503:0310/042033.150176:ERROR:bus.cc(408)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") +0ms
  pw:browser [pid=2488][err] [2488:2488:0310/042033.150186:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:  +0ms
  pw:browser [pid=2488][err] [2488:2503:0310/042033.150200:ERROR:bus.cc(408)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix") +0ms
  pw:browser [pid=2488][err] [2488:2488:0310/042033.151929:ERROR:global_accelerator_listener_linux.cc(350)] Failed to connect to signal: org.freedesktop.portal.GlobalShortcuts.Activated +2ms
  pw:browser [pid=2488][err] [2488:2570:0310/042033.152505:ERROR:bus.cc(408)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory +0ms
  pw:browser [pid=2488][err] [2488:2570:0310/042033.152575:ERROR:bus.cc(408)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory +2ms
  pw:browser [pid=2488][err] [2488:2570:0310/042033.152628:ERROR:bus.cc(408)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory +0ms
  pw:browser [pid=2488][err] [2488:2570:0310/042033.152722:ERROR:bus.cc(408)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory +0ms
  pw:browser [pid=2488][err] [2488:2570:0310/042033.152776:ERROR:bus.cc(408)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory +0ms
  pw:browser [pid=2488][err] [2488:2488:0310/042033.155146:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:  +1ms
  pw:browser [pid=2488][err] [2488:2488:0310/042033.155359:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.NameHasOwner: object_path= /org/freedesktop/DBus: unknown error type:  +0ms
  pw:browser <launching> /ms-playwright/ffmpeg-1011/ffmpeg-linux -loglevel error -f image2pipe -avioflags direct -fpsprobesize 0 -probesize 32 -analyzeduration 0 -c:v mjpeg -i pipe:0 -y -an -r 25 -c:v vp8 -qmin 0 -qmax 50 -crf 8 -deadline realtime -speed 8 -b:v 1M -threads 1 -vf pad=800:450:0:0:gray,crop=800:450:0:0 /codefresh/volume/playwright/test-results/.playwright-artifacts-4/4f43dd3fe5443565ab257e796778a491.webm +184ms
  pw:browser <launched> pid=2603 +4ms
  pw:browser [pid=2488][err] [2516:2516:0310/042036.148342:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0E01C007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +3s
  pw:browser [pid=2488][err] [2516:2516:0310/042036.156392:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0101D007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +8ms
  pw:browser [pid=2488][err] [2516:2516:0310/042037.263707:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0707A007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +1s
  pw:browser [pid=2488][err] [2516:2516:0310/042037.430900:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0D07A007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +167ms
  pw:browser [pid=2488][err] [2516:2516:0310/042037.557252:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0A07A007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +126ms
  pw:browser [pid=2488][err] [2516:2516:0310/042037.613719:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0C051007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +57ms
  pw:browser [pid=2488][err] [2516:2516:0310/042037.676316:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0F051007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +62ms
  pw:browser [pid=2488][err] [2516:2516:0310/042037.792228:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A05052007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +116ms
  pw:browser [pid=2488][err] [2516:2516:0310/042037.815419:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A02052007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +23ms
  pw:browser [pid=2488][err] [2516:2516:0310/042037.873791:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0C0CB007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +59ms
  pw:browser [pid=2488][err] [2516:2516:0310/042038.534045:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0101D007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +660ms
  pw:browser [pid=2488][err] [2517:2563:0310/042038.602482:ERROR:socket_manager.cc(147)] Failed to resolve address for ec2-52-23-111-175.compute-1.amazonaws.com., errorcode: -105 +68ms
  pw:browser [pid=2488][err] [2516:2516:0310/042038.732426:ERROR:gles2_cmd_decoder_passthrough.cc(958)] ContextResult::kFatalFailure: fail_if_major_perf_caveat + swiftshader +130ms
  pw:browser [pid=2488][err] [2516:2516:0310/042038.889045:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0E01C007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +157ms
  pw:browser [pid=2488][err] [2516:2516:0310/042038.897277:ERROR:gles2_cmd_decoder_passthrough.cc(958)] ContextResult::kFatalFailure: fail_if_major_perf_caveat + swiftshader +8ms
  pw:browser [pid=2488][err] [2516:2516:0310/042038.922795:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0A07A007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +26ms
  pw:browser [pid=2488][err] [2516:2516:0310/042040.326589:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0D07A007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +1s
  pw:browser [pid=2488][err] [2516:2516:0310/042040.768975:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0707A007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +443ms
  pw:browser [pid=2488][err] [2516:2516:0310/042040.777554:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A05052007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +8ms
  pw:browser [pid=2488][err] [2516:2516:0310/042040.928654:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0F051007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +152ms
  pw:browser [pid=2488][err] [2516:2516:0310/042040.950945:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0C051007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +22ms
  pw:browser [pid=2488][err] [2516:2516:0310/042040.958263:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A020CC007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +7ms
  pw:browser [pid=2488][err] [2516:2516:0310/042040.963875:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A050CC007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +6ms
  pw:browser [pid=2488][err] [2516:2516:0310/042040.969818:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0F0CB007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +6ms
  pw:browser [pid=2488][err] [2516:2516:0310/042041.019182:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A030F4007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +49ms
  pw:browser [pid=2488][err] [2516:2516:0310/042041.025242:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A000F4007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +6ms
  pw:browser [pid=2488][err] [2516:2516:0310/042041.842812:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0407A007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +818ms
  pw:browser [pid=2488][err] [2516:2516:0310/042042.791732:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A060F4007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +949ms
  pw:browser [pid=2488][err] [2516:2516:0310/042052.741011:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0101D007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +10s
  pw:browser [pid=2488][err] [2517:2563:0310/042053.005838:ERROR:socket_manager.cc(147)] Failed to resolve address for ec2-52-23-111-175.compute-1.amazonaws.com., errorcode: -105 +277ms
  pw:browser [pid=2488][err] [2516:2516:0310/042053.008609:ERROR:gles2_cmd_decoder_passthrough.cc(958)] ContextResult::kFatalFailure: fail_if_major_perf_caveat + swiftshader +1ms
  pw:browser [pid=2488][err] [2516:2516:0310/042053.239854:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A030F4007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +221ms
  pw:browser [pid=2488][err] [2516:2516:0310/042053.268872:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A090F4007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +29ms
  pw:browser [pid=2488][err] [2516:2516:0310/042053.357951:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0101D007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +89ms
  pw:browser [pid=2488][err] [2516:2516:0310/042053.407152:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A060F4007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +49ms
  pw:browser [pid=2488][err] [2516:2516:0310/042053.457010:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A000F4007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +50ms
  pw:browser [pid=2488][err] [2516:2516:0310/042053.506192:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A030EA037C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +49ms
  pw:browser [pid=2488][err] [2516:2516:0310/042053.555868:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A000EA037C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +50ms
  pw:browser [pid=2488][err] [2516:2516:0310/042053.667462:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A090EA037C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +111ms
  pw:browser [pid=2488][err] [2516:2516:0310/042053.719112:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A060EA037C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +52ms
  pw:browser [pid=2488][err] [2516:2516:0310/042053.778224:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0C0CB007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +59ms
  pw:browser [pid=2488][err] [2516:2516:0310/042054.000058:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0F0CB007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +222ms
  pw:browser [pid=2488][err] [2516:2516:0310/042054.073607:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A020CC007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +73ms
  pw:browser [pid=2488][err] [2516:2516:0310/042054.201767:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A050CC007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +129ms
  pw:browser [pid=2488][err] [2516:2516:0310/042054.480219:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0707A007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +278ms
  pw:browser [pid=2488][err] [2516:2516:0310/042054.487418:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0407A007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +7ms
  pw:browser [pid=2488][err] [2516:2516:0310/042055.547235:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0A07A007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +1s
  pw:browser [pid=2488][err] [2516:2516:0310/042055.611040:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0D07A007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +64ms
  pw:browser [pid=2488][err] [2516:2516:0310/042055.715669:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0C051007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +105ms
  pw:browser [pid=2488][err] [2516:2516:0310/042055.726765:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A030F4007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +11ms
  pw:browser <launching> /ms-playwright/ffmpeg-1011/ffmpeg-linux -loglevel error -f image2pipe -avioflags direct -fpsprobesize 0 -probesize 32 -analyzeduration 0 -c:v mjpeg -i pipe:0 -y -an -r 25 -c:v vp8 -qmin 0 -qmax 50 -crf 8 -deadline realtime -speed 8 -b:v 1M -threads 1 -vf pad=800:450:0:0:gray,crop=800:450:0:0 /codefresh/volume/playwright/test-results/.playwright-artifacts-4/6ebf72e84c7a9549dea622908bdcfa2a.webm +1s
  pw:browser <launched> pid=3591 +12ms
  pw:browser [pid=2488][err] [2516:2516:0310/042059.614172:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0E01C007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +3s
  pw:browser [pid=2488][err] [2516:2516:0310/042059.659058:ERROR:gles2_cmd_decoder_passthrough.cc(958)] ContextResult::kFatalFailure: fail_if_major_perf_caveat + swiftshader +54ms
  pw:browser [pid=2488][err] [2517:2563:0310/042059.768904:ERROR:socket_manager.cc(147)] Failed to resolve address for ec2-52-23-111-175.compute-1.amazonaws.com., errorcode: -105 +101ms
  pw:browser [pid=2488][err] [2516:2516:0310/042100.063252:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0E01C007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +294ms
  pw:browser [pid=2488][err] [2516:2516:0310/042100.072468:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0E01C007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +9ms
  pw:browser [pid=2488][err] [2516:2516:0310/042100.081568:ERROR:gl_utils.cc(431)] [.WebGL-0x1d940586f100]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels +9ms
  pw:browser [pid=2488][err] [2516:2516:0310/042100.113566:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0E01C007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +32ms
  pw:browser [pid=2488][err] [2516:2516:0310/042100.119022:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0E01C007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +6ms
  pw:browser [pid=2488][err] [2516:2516:0310/042100.330248:ERROR:gles2_cmd_decoder_passthrough.cc(1083)] [GroupMarkerNotSet(crbug.com/242999)!:A0E01C007C340000]Automatic fallback to software WebGL has been deprecated. Please use the --enable-unsafe-swiftshader flag to opt in to lower security guarantees for trusted content. +212ms
  pw:browser [pid=2488][err] [0310/042105.989192:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2) +6s
  pw:browser [pid=2488][err] [0310/042105.989269:ERROR:file_io_posix.cc(145)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2) +0ms
  pw:browser [pid=3591] <gracefully close start> +173ms
  pw:browser Closing stdin... +0ms
  pw:browser [pid=2603] <gracefully close start> +0ms
  pw:browser Closing stdin... +0ms
  pw:browser ffmpeg finished input. +0ms
  pw:browser ffmpeg finished input. +0ms
  pw:browser [pid=2603] <process did exit: exitCode=0, signal=null> +33ms
  pw:browser ffmpeg onkill exitCode=0 signal=null +0ms
  pw:browser [pid=2603] starting temporary directories cleanup +0ms
  pw:browser [pid=2603] finished temporary directories cleanup +1ms
  pw:browser [pid=2603] <gracefully close end> +0ms
  pw:browser [pid=3591] <process did exit: exitCode=0, signal=null> +1ms
  pw:browser ffmpeg onkill exitCode=0 signal=null +1ms
  pw:browser [pid=3591] starting temporary directories cleanup +0ms
  pw:browser [pid=3591] finished temporary directories cleanup +0ms
  pw:browser [pid=3591] <gracefully close end> +0ms
  pw:browser [pid=2488] <process did exit: exitCode=null, signal=SIGTRAP> +92ms
  pw:browser [pid=2488] starting temporary directories cleanup +1ms
  pw:browser [pid=2488] finished temporary directories cleanup +7ms

Environment

System:
    OS: Linux 5.10 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
    CPU: (32) x64 AMD EPYC 7R13 Processor
    Memory: 45.38 GB / 61.53 GB
    Container: Yes
  Binaries:
    Node: 22.13.1 - /usr/bin/node
    Yarn: 1.22.22 - /usr/bin/yarn
    npm: 10.9.2 - /usr/bin/npm
  Languages:
    Bash: 5.2.21 - /usr/bin/bash

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 21 (17 by maintainers)

Most upvoted comments

Just wanted to add my voice to this issue. It seems to be specific to Chrome/Chromium version 134.0.6998.35. The issues began for us on Chrome-based tests on March 5th, and this version was released to stable on March 4th: https://chromereleases.googleblog.com/2025/03/stable-channel-update-for-desktop.html … It seems like the browser is crashing midway through the test run. Note that Playwright 1.51.0 bumped Chromium to this version as well, while 1.50.1 had 133.0.6943.16.

I am also seeing the same issue as you with the empty trace files. We’re also seeing browserContext._wrapApiCall appearing on the CLI after the run, though I only began seeing that specific issue after bumping Playwright 1.49.1 -> 1.51.0. Before that (but after Chrome had been updated to the new version), while the browser would still crash and the test would (generally) fail with Target page, context or browser has been closed, the _wrapApiCall reference wasn’t found in our logs. This failure seems to be accompanied by a Worker teardown timeout issue whenever the browser crashed on that worker, but again, that issue didn’t begin to appear after crashes until bumping Playwright 1.49.1 -> 1.51.0.

I can confirm the issue, we get the same error locally and in our CI since we updated to playwright v1.51.1.

It looks like chrome is crashing, and the entire screenshot timeline just disappears at the moment the browser crashes, which makes it hard to debug.

Adding this:

test.afterEach(({ context }) => {
  console.log(context.browser()?.isConnected());
});

Will log that the browser is not connected after the test failure, which is not the case when the test succeed.

The error is happening randomly from run to run, but always on the same locator with the toBeVisible() assertion. This locator/assertion never failed in v1.50.1 and earlier versions.

For the meantime we downgraded playwright to v1.50.1, and the issue is gone. We’ll wait for a futur version with a newer version of chrome to see if this issue is resolved.

You can run with DEBUG=pw:api and DEBUG=pw:test separately. Hopefully that shows something.

the logs were too much for the machine to handle

Are you doing this testing on your CI machine, not your local one? Is the error only occurring in CI?