question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Playwright refuses to load some pages via proxy in Firefox

See original GitHub issue

Context:

System:

  • OS: macOS 12.0.1
  • Memory: 7.83 GB / 64.00 GB

Binaries:

  • Node: 16.11.1 - ~/.asdf/installs/nodejs/16.11.1/bin/node
  • Yarn: 1.22.17 - /usr/local/bin/yarn
  • npm: 8.0.0 - ~/.asdf/plugins/nodejs/shims/npm

Languages:

  • Bash: 3.2.57 - /bin/bash

npmPackages:

  • playwright: ^1.16.3 => 1.16.3

Code Snippet

Help us help you! Put down a short code snippet that illustrates your bug and that we can run and debug locally. For example:


const { chromium, webkit, firefox } = require("playwright");

(async function () {
  const browser = await firefox.launch({
    headless: false,
    ignoreHTTPSErrors: true,
    proxy: {
      server: "$SERVER",
      username: "$UN",
      password: "$PWD",
    },
  });

  const page = await browser.newPage();

  let response = await page.goto(
    "https://www.github.com"
  );
})();

Describe the bug

For some pages using the Firefox engine, Playwright will not load them at all when given a proxy – it’ll just spin until it gets a timeout error. For example, https://www.github.com: http://recordit.co/cXjdMkOG1X

Other pages work just fine. For example, Reddit: https://recordit.co/WFKZB0b0sG

The Chromium engine does not have this problem, and I have tried multiple HTTP proxies, so it’s not an issue with the specific proxy or the site. Playwright loads sites just fine without the proxy.

(I’m using https://brightdata.com proxies, if you’d like to test this on your own).

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
brettneesecommented, Dec 28, 2021

@aslushnikov I was away for the holidays, but thanks!!! I’m glad I wasn’t hallucinating or doing something wrong.

1reaction
aslushnikovcommented, Dec 16, 2021

This is fixed on tip-of-tree now. The fix will be available tomorrow at @next channel: npm i @playwright/test@next

Read more comments on GitHub >

github_iconTop Results From Across the Web

firefox browser does not start in playwright - Stack Overflow
I found the error. It was because of some missing libraries need. I discovered this when I downgraded playwright to version 1.9 and...
Read more >
407 Proxy Authentication Required - HTTP - MDN Web Docs
The HTTP 407 Proxy Authentication Required client error status response code indicates that the request has not been applied because it lacks ...
Read more >
Run your first Playwright test on BrowserStack Automate
A quickstart guide to running your first Playwright test across 100+ desktop browsers on BrowserStack.
Read more >
Potential Security Risk Ahead' Error in Firefox
If you're seeing any of the above security warnings while visiting a website on the Mozilla Firefox browser, this article will guide you...
Read more >
playwright._impl._api_types.error: execution context was ...
I came into this issue today, and found that this problem occurs in this case: I was use page object loading a url...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found