microsoft / playwright-dotnet

.NET version of the Playwright testing and automation library.
https://playwright.dev/dotnet/
MIT License
2.47k stars 235 forks source link

[BUG] Chromium crash with bad parameters configuration #2003

Closed danielbichuetti closed 2 years ago

danielbichuetti commented 2 years ago

Context:

Code Snippet

var _playwright = await Playwright.CreateAsync();

var _browser = await _playwright.Chromium.LaunchAsync(new BrowserTypeLaunchOptions()
            {
                Args = new []
                {
                    "--disable-gpu",
                    "",
                    "--no-sandbox",
                    "--single-process"
                },
                Timeout = 30000,
                Headless = true
            });

Describe the bug

When sending empty arg (after disable GPU line) on the string array from BrowserTypeLauncheOptions Args variable, it causes Chromium to crash.

mxschmitt commented 2 years ago

AWS Lambda Custom Image

Thats not officially supported, for the official supported operating systems see here: https://playwright.dev/dotnet/docs/intro#linux

You could try setting the DEBUG=pw:api,pw:browser environment variable, this should give you more hints whats actually crashing and on which side its crashing (Chromium vs. Playwright).