puppeteer
puppeteer copied to clipboard
[Bug]: Error: net::ERR_PROXY_CONNECTION_FAILED in cloudflare worker
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
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.
Were you able to get proxy auth working at all? Have you tried:
await page.goto('username:password@https://ipinfo.io/ip', { waitUntil: 'networkidle0' });
I tried, @cloudflare/puppeteer with proxy doesn't work
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.
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!