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]: Puppeteer seems to not work with proxys #7719

Closed
iJoris opened this issue Oct 25, 2021 · 5 comments
Closed

[Bug]: Puppeteer seems to not work with proxys #7719

iJoris opened this issue Oct 25, 2021 · 5 comments
Labels

Comments

@iJoris
Copy link

iJoris commented Oct 25, 2021

Bug description

Steps to reproduce the problem:

  1. … Find an IP:PORT HTTP proxy
  2. Run simple puppeteer example
  3. see ERR_TUNNEL_FAILED
const puppeteer = require("puppeteer");

(async () => {

  let proxyserver = "--proxy-server=" + '127.0.0.1:2882';

  const browser = await puppeteer.launch({
    args: [proxyserver],
    headless: false,
    ignoreHTTPSErrors: true,
  });

  const page = await browser.newPage();
  await page.goto("https://www.whatismyip.com/");
  await page.screenshot({ path: "example.png" });
})();

Puppeteer version

10.2.0

Node.js version

14.7

npm version

6.14

What operating system are you seeing the problem on?

Windows

Relevant log output

No response

@iJoris iJoris added the bug label Oct 25, 2021
@phmLabs
Copy link

phmLabs commented Oct 31, 2021

Have the same issue. Started with Puppeteer 10.

@adrianmihalko
Copy link

I have same problem.

I am trying to use local tor proxy with puppeteer, but for some reason it is not using it:

const puppeteer = require('puppeteer');

async function getPic(arg){
    console.log(arg);
    const browser = await puppeteer.launch({
    args: [
      '--proxy-server=socks5h://127.0.0.1:9050',
    ],
    });
    var gh = 0;
    while(gh < 1000){
      const context = await browser.createIncognitoBrowserContext();

      const page = await context.newPage();

    await page.goto('http://ipinfo.io/',{waitUntil: 'networkidle2'});
    await page.screenshot({path: 'screenshot.png'});

    console.log("done for" + gh);
    gh++;
  }
    await browser.close();
}

getPic(process.argv[2]);

As a result I still see my original IP on the result screenshot. Proxy is working correctly, I checked with curl.

@phmLabs
Copy link

phmLabs commented Nov 17, 2021

Did somebody check if this is a Chrome or a Puppeteer issue? Did Chrome perhaps change the parameter?

@mzalazar
Copy link

💥💥 Tor PROXY doesn't work when using incognito mode 💥💥

@iJoris
Copy link
Author

iJoris commented Feb 23, 2022

Found out that my local ISP blocked the proxy. When I turned on an vpn the proxy worked perfectly.

Please note that the last working version of puppeteer is 10.2, any above that the incognito proxy function is still broken.

#7770

@iJoris iJoris closed this as completed Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants