puppeteer icon indicating copy to clipboard operation
puppeteer copied to clipboard

[Bug]: Error: net::ERR_PROXY_CONNECTION_FAILED in cloudflare worker

Open tagplus5 opened this issue 9 months ago • 3 comments

Minimal, reproducible example

import puppeteer from '@cloudflare/puppeteer';

export default {
  async scheduled(event, env, ctx): Promise<void> {
    const browser = await puppeteer.launch(env.BROWSER);
    const proxy = `http://${proxyServer}:${proxyPort}`;
    const context = await browser.createIncognitoBrowserContext({
      proxyServer: proxy,
    });
    const page = await context.newPage();
    await page.authenticate({ username: proxyUsername, password: proxyPassword });
    await page.goto('https://ipinfo.io/ip', { waitUntil: 'networkidle0' });
    const ip = await page.evaluate(() => document.body.innerText);
    console.log('IP:', ip);
    await browser.close();
  },
} satisfies ExportedHandler<Env>;

Error string

Uncaught (in response) Error: net::ERR_PROXY_CONNECTION_FAILED at https://ipinfo.io/ip

Expectation

Logs IP in console

Reality

Uncaught (in promise) Error: net::ERR_PROXY_CONNECTION_FAILED

Puppeteer version

0.0.14

Node version

22.14.0

Package manager

npm

Package manager version

11.1.0

Operating system

macOS

tagplus5 avatar Mar 02 '25 20:03 tagplus5

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

github-actions[bot] avatar May 02 '25 02:05 github-actions[bot]

Were you able to get proxy auth working at all? Have you tried:

await page.goto('username:password@https://ipinfo.io/ip', { waitUntil: 'networkidle0' });

bitnom avatar May 04 '25 13:05 bitnom

I tried, @cloudflare/puppeteer with proxy doesn't work

tagplus5 avatar May 04 '25 17:05 tagplus5

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

github-actions[bot] avatar Jul 04 '25 02:07 github-actions[bot]

We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accommodate it!

github-actions[bot] avatar Jul 11 '25 02:07 github-actions[bot]