Skip to content

[REGRESSION]: Cannot set ChromiumSandbox launch option because of error "slowMo: expected number, got boolean" #2834

@brutaldev

Description

@brutaldev

Context:

  • GOOD Playwright Version: 1.40.0
  • BAD Playwright Version: 1.41.0
  • Operating System: Windows
  • Extra: None

Code Snippet

var playwright = await Playwright.CreateAsync();
var chromeLaunchOptions = new BrowserTypeLaunchOptions
{
  ChromiumSandbox = false,  // <-- This is the problem.
};
var chrome = await playwright.Chromium.LaunchAsync(chromeLaunchOptions);

Describe the bug

On the call to LaunchAsync when using BrowserTypeLaunchOptions that sets the ChromiumSandbox value(true or false), the following exception is thrown:

Microsoft.Playwright.PlaywrightException: slowMo: expected number, got boolean
   at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](ChannelOwner object, String method, Dictionary`2 dictionary, Boolean keepNulls) in /_/src/Playwright/Transport/Connection.cs:line 208
   at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func`1 action, Boolean isInternal) in /_/src/Playwright/Transport/Connection.cs:line 538
   at Microsoft.Playwright.Core.BrowserType.LaunchAsync(BrowserTypeLaunchOptions options) in /_/src/Playwright/Core/BrowserType.cs:line 56

Simply rolling back to 1.40.0 makes this code work again.

Basic console app:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions