Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Safari tests fail due to "browserContext.newPage: Protocol error" #17699

Closed
MarcoSpoerl opened this issue Sep 29, 2022 · 1 comment · Fixed by #17731
Closed

[BUG] Safari tests fail due to "browserContext.newPage: Protocol error" #17699

MarcoSpoerl opened this issue Sep 29, 2022 · 1 comment · Fixed by #17731
Assignees

Comments

@MarcoSpoerl
Copy link

Context:

  • Playwright Version: 1.26.1
  • Operating System: macOS 10.15.7
  • Node.js version: 16.17.1
  • Browser: WebKit
  • Extra: n/a

Code Snippet

This is one test of many showing the same error.

test.describe("sign-in", () => {
  test.beforeEach(async ({ page }) => {
    await page.goto("/");
  });

  test.afterEach(async ({ page }) => {
    await expect(page).toHaveURL(
      /^https:\/\/api\.twitter\.com\/oauth\/authenticate/
    );
    await page
      .locator('[id="username_or_email"]')
      .fill(process.env.TWITTER_TEST_USERNAME || "");
    await page
      .locator('[id="password"]')
      .fill(process.env.TWITTER_TEST_PASSWORD || "");
    await page.locator('[id="allow"]').click();
    await expect(page).toHaveURL("/searches");
  });

  test("main sign-in is working", async ({ page }) => {
    await page.locator('button:has-text("Sign in with Twitter")').click();
  });
});

Describe the bug

I haven't touched the test specs or the config. Yet all Safari-based tests (both mobile and desktop) stopped working. Chrome and Firefox still work fine.

I upgraded Playwright from 1.25.1 to 1.26.1, before this error showed up.

The only hint I have is this error:

browserContext.newPage: Protocol error (Page.setForcedColors): 'Page.setForcedColors' was not found [{"code":-32601,"message":"'Page.setForcedColors' was not found"}]

aslushnikov added a commit to aslushnikov/playwright that referenced this issue Sep 30, 2022
The error looks like this:

```
aslushnikov:~/prog/playwright(main)$ npx playwright wk
[object.<anonymous>: Browser closed.
==================== Browser output: ====================
<launching> /Users/andreylushnikov/Library/Caches/ms-playwright/webkit-1616/pw_run.sh --inspector-pipe --no-startup-window
<launched> pid=15076
[pid=15076][out] ****************************************************************
[pid=15076][out] ****************************************************************
[pid=15076][out]
[pid=15076][out] ERROR: MacOS version is too old!
[pid=15076][out]
[pid=15076][out] This version of Playwright does not support running
[pid=15076][out] WebKit on MacOS 10.15. Please either:
[pid=15076][out] - update your operating system to version 11 or higher
[pid=15076][out] - use Playwright v1.25 or older
[pid=15076][out]
[pid=15076][out] ****************************************************************
[pid=15076][out] ****************************************************************
[pid=15076] <process did exit: exitCode=1, signal=null>
[pid=15076] starting temporary directories cleanup
=========================== logs ===========================
```

Fixes microsoft#17699
@aslushnikov
Copy link
Collaborator

aslushnikov commented Sep 30, 2022

@MarcoSpoerl yes, Playwright 1.25 was the last Playwright to support WebKit @ MacOS 10.15 - see announcements: https://github.com/microsoft/playwright/releases/tag/v1.25.0

Please either update MacOS to 11+ or keep Playwright version 1.25!

@aslushnikov aslushnikov self-assigned this Sep 30, 2022
aslushnikov added a commit that referenced this issue Sep 30, 2022
The error looks like this:

```
aslushnikov:~/prog/playwright(main)$ npx playwright wk
[object.<anonymous>: Browser closed.
==================== Browser output: ====================
<launching> /Users/andreylushnikov/Library/Caches/ms-playwright/webkit-1616/pw_run.sh --inspector-pipe --no-startup-window
<launched> pid=15076
[pid=15076][out] ****************************************************************
[pid=15076][out] ****************************************************************
[pid=15076][out]
[pid=15076][out] ERROR: MacOS version is too old!
[pid=15076][out]
[pid=15076][out] This version of Playwright does not support running
[pid=15076][out] WebKit on MacOS 10.15. Please either:
[pid=15076][out] - update your operating system to version 11 or higher
[pid=15076][out] - use Playwright v1.25 or older
[pid=15076][out]
[pid=15076][out] ****************************************************************
[pid=15076][out] ****************************************************************
[pid=15076] <process did exit: exitCode=1, signal=null>
[pid=15076] starting temporary directories cleanup
=========================== logs ===========================
```

Fixes #17699
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants