Issue 1:
System info

Playwright Version: 1.35.0

Operating System: [Ubuntu 22.04 amd64]

Browser: [Chromium, Firefox]

Other info:

Source code

const { firefox,chromium } = require('playwright');
(async () => {
const browser = await chromium.launch(
{
headless:true,
args: ['--no-sandbox']
}
);
const context = await browser.newContext();
const page = await context.newPage();
await page.goto('https://www.baidu.com');
await page.screenshot({ path: 'example.png' });
await browser.close();
console.log('success');
})();

logs:

node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^

browserType.launch: Browser closed.
==================== Browser output: ====================
<launching> /root/.cache/ms-playwright/chromium-1067/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 --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 --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --no-sandbox --user-data-dir=/tmp/playwright_chromiumdev_profile-xhQibb --remote-debugging-pipe --no-startup-window
<launched> pid=39161
[pid=39161][err] [0611/044944.462754:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.031667:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.031834:ERROR:stack_trace_posix.cc(810)] Failed to parse the contents of /proc/self/maps
[pid=39161][err] [0611/044945.059913:FATAL:zygote_main_linux.cc(145)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007d11504 logging::LogMessage::~LogMessage()
[pid=39161][err] #3 0x004007d11fbe logging::LogMessage::~LogMessage()
[pid=39161][err] #4 0x004007cfbd47 logging::CheckError::~CheckError()
[pid=39161][err] #5 0x0040071cb6b8 content::ZygoteMain()
[pid=39161][err] #6 0x0040071c46c6 content::RunZygote()
[pid=39161][err] #7 0x0040071c5592 content::RunOtherNamedProcessTypeMain()
[pid=39161][err] #8 0x0040071c6952 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #9 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #10 0x0040071c415d content::ContentMain()
[pid=39161][err] #11 0x004007835331 headless::HeadlessShellMain()
[pid=39161][err] #12 0x00400398f265 ChromeMain
[pid=39161][err] #13 0x004010ee9d90 <unknown>
[pid=39161][err] #14 0x004010ee9e40 __libc_start_main
[pid=39161][err] #15 0x00400398f02a _start
[pid=39161][err]
[pid=39161][err] [0611/044945.059918:FATAL:zygote_main_linux.cc(145)] Check failed: sandbox::ThreadHelpers::IsSingleThreaded().
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007d11504 logging::LogMessage::~LogMessage()
[pid=39161][err] #3 0x004007d11fbe logging::LogMessage::~LogMessage()
[pid=39161][err] #4 0x004007cfbd47 logging::CheckError::~CheckError()
[pid=39161][err] #5 0x0040071cb6b8 content::ZygoteMain()
[pid=39161][err] #6 0x0040071c46c6 content::RunZygote()
[pid=39161][err] #7 0x0040071c5592 content::RunOtherNamedProcessTypeMain()
[pid=39161][err] #8 0x0040071c6952 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #9 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #10 0x0040071c415d content::ContentMain()
[pid=39161][err] #11 0x004007835331 headless::HeadlessShellMain()
[pid=39161][err] #12 0x00400398f265 ChromeMain
[pid=39161][err] #13 0x004010ee9d90 <unknown>
[pid=39161][err] #14 0x004010ee9e40 __libc_start_main
[pid=39161][err] #15 0x00400398f02a _start
[pid=39161][err]
[pid=39161][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[pid=39161][err] qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[pid=39161][err] [0611/044945.734913:ERROR:bus.cc(399)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[pid=39161][err] Received signal 11 SEGV_MAPERR 74652f202d2d29
[pid=39161][err] #0 0x004007dcfef2 base::debug::CollectStackTrace()
[pid=39161][err] #1 0x004007dbd263 base::debug::StackTrace::StackTrace()
[pid=39161][err] #2 0x004007dcf981 base::debug::(anonymous namespace)::StackDumpSignalHandler()
[pid=39161][err] #3 0x004010f02520 <unknown>
[pid=39161][err] #4 0x004008783009 FcCharSetFreeze
[pid=39161][err] #5 0x004008783837 FcCharSetSerializeAlloc
[pid=39161][err] #6 0x0040087923dc FcValueListSerializeAlloc
[pid=39161][err] #7 0x004008792331 FcPatternSerializeAlloc
[pid=39161][err] #8 0x00400878a110 FcFontSetSerializeAlloc
[pid=39161][err] #9 0x004008780500 FcDirCacheBuild
[pid=39161][err] #10 0x004008786223 FcDirCacheScan
[pid=39161][err] #11 0x0040087862c0 IA__FcDirCacheRead
[pid=39161][err] #12 0x00400877ac67 FcConfigAddDirList
[pid=39161][err] #13 0x00400877abb2 IA__FcConfigBuildFonts
[pid=39161][err] #14 0x00400878a8d1 IA__FcInitLoadConfigAndFonts
[pid=39161][err] #15 0x00400877a0c1 FcConfigInit
[pid=39161][err] #16 0x00400848e9c4 base::NoDestructor<>::NoDestructor<>()
[pid=39161][err] #17 0x00400848e2ad gfx::GetGlobalFontConfig()
[pid=39161][err] #18 0x004005d268be content::BrowserMainRunnerImpl::Initialize()
[pid=39161][err] #19 0x00400dee16eb headless::HeadlessContentMainDelegate::RunProcess()
[pid=39161][err] #20 0x0040071c51e2 content::RunBrowserProcessMain()
[pid=39161][err] #21 0x0040071c6b84 content::ContentMainRunnerImpl::RunBrowser()
[pid=39161][err] #22 0x0040071c6976 content::ContentMainRunnerImpl::Run()
[pid=39161][err] #23 0x0040071c3f30 content::RunContentProcess()
[pid=39161][err] #24 0x0040071c415d content::ContentMain()
[pid=39161][err] #25 0x00400783521e headless::HeadlessShellMain()
[pid=39161][err] #26 0x00400398f265 ChromeMain
[pid=39161][err] #27 0x004010ee9d90 <unknown>
[pid=39161][err] #28 0x004010ee9e40 __libc_start_main
[pid=39161][err] #29 0x00400398f02a _start
[pid=39161][err] r8: 000036480006ce00 r9: 0000364800114340 r10: 000036480006c000 r11: 0000000000000000
[pid=39161][err] r12: 0000364800114480 r13: 6374652f202d2d21 r14: 0000000000000008 r15: 00003648000264c0
[pid=39161][err] di: 000000400e12b978 si: 0000000000000006 bp: 00000040101c9110 bx: 0000000000000008
[pid=39161][err] dx: 0000000000000001 ax: 0000000000000000 cx: 0000000000000000 sp: 00000040101c9090
[pid=39161][err] ip: 0000004008783009 efl: 0000000000000206 cgf: 002b000000000033 erf: 0000000000000004
[pid=39161][err] trp: ffffffffffffffff msk: 0000000000000000 cr2: 0074652f202d2d29
[pid=39161][err] [end of stack trace]
[pid=39161][err] qemu: uncaught target signal 11 (Segmentation fault) - core dumped

Issue 2:
System info

Playwright Version: [v1.33.0]

Operating System: [All, Windows 11, Ubuntu 20, macOS 13.2, etc.]

Browser: [All, Chromium, Firefox, WebKit]

Other info:

Source code

I provided exact source code that allows reproducing the issue locally.

Config file

// playwright.config.ts
import type { PlaywrightTestConfig } from '@playwright/test';
import { LaunchOptions, devices } from '@playwright/test';

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
require('dotenv').config();

const browserOptions: LaunchOptions = {
slowMo: 0,
args: [
'--use-fake-ui-for-media-stream',
'--use-fake-device-for-media-stream',
],
firefoxUserPrefs: {
'media.navigator.streams.fake': true,
'media.navigator.permission.disabled': true,
},
};

/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testDir: './tests',
/* Maximum time one test can run for. */
timeout: 500 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 50000,
},
/* Run tests in files in parallel */
fullyParallel: process.env.PARALLEL == 'true',
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: parseInt(process.env.RETRIES || '1'),
/* Opt out of parallel tests on CI. */
workers: parseInt(process.env.WORKERS || '20'),
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [['html', { outputFolder: 'playwright-report' }]],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
baseURL: process.env.FRONT,
headless: process.env.HEADLESS == 'true',
launchOptions: browserOptions,
trace: 'on',
// browserName: process.env.BROWSER,
channel: process.env.CHANNEL,
},
/* Configure projects for major browsers */
projects: [
{
name: 'Chrome Desktop',
use: {
headless: true,
...devices['Desktop Chrome'],
channel: 'chrome',
},
},
],

/* Folder for test artifacts such as screenshots, videos, traces, etc. */
// outputDir: 'test-results/',

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// port: 3000,
// },
};

export default config;

Steps

1- Set the config trace: 'retain-on-failure', on // playwright.config.ts

2- Set the HTML report config reporter: [['html', { outputFolder: 'playwright-report' }]], on // playwright.config.ts

3- Create any test that contains at least 5 steps and one of the tests is failing

4- Observe the time-travel results

Use this command to run the test and check the time travel trace

npx playwright test

or

npx playwright test --reporter=html

Expected

This is the expected behaviour when enabling the config trace: 'retain-on-failure',. Using this config it should display all steps in the time-travel report if any step failed.

2023-05-11_11-24-57.mp4

Actual

This is the behaviour when enabling the config trace: 'retain-on-failure',. Please see attached video

2023-05-11_11-36-06.mp4