Skip to content

[Feature]: Resolve mismatch between Playwright and public juggler version #41551

Description

@leeN

🚀 Feature Request

Since v1.61.0, custom Firefox builds are broken with Playwright. The suggestion would be to update the browser_patches/juggler.

Example

Custom Firefox forks could be used with Playwright again; this used to be painless, but is sadly impossible at the moment.

Motivation

Currently, the protocol differs between Playwright and Juggler (https://github.com/microsoft/playwright/blob/main/browser_patches/firefox/juggler/protocol/Protocol.js#L79 <-> https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/firefox/protocol.d.ts#L209), and the additional isMobile flag causes a crash when creating a new Context.

The error message is:

browser.newContext: Protocol error (Browser.setDefaultViewport): ERROR: failed to call method 'Browser.setDefaultViewport' with parameters {
"browserContextId": "81e60b08-fc7d-4f70-961d-fd9e808d95ac",
"viewport": {
"viewportSize": {
"width": 1280,
"height": 720
},
"deviceScaleFactor": 1,
"isMobile": false
}
}
Found property ".viewport.isMobile" - false, which is not described in this scheme
at async /home/user/Projects/playwright_tests/index.js:17:21 {
log: [],
name: 'Error'
}

The following commit causes this: #41179; i.e., the required juggler changes are not public. There was a PR (#41181), but it got closed due to some issue. These issues apparently have been resolved, as there has been a release (1.61) since then; the roll PR for Firefox is at #41249. This change has sadly not been reflected in the juggler folder.

Is this for a specific reason? I'm aware that this is not an actively supported configuration and do not need any help with the code itself. I would like to continue building Firefox forks that support Playwright.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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