pedroslopez / whatsapp-web.js

A WhatsApp client library for NodeJS that connects through the WhatsApp Web browser app
https://wwebjs.dev
Apache License 2.0
15.18k stars 3.62k forks source link

Issue with Puppeteer: ERR_PROXY_CONNECTION_FAILED at web.whatsapp.com #3217

Closed FractalMx closed 2 months ago

FractalMx commented 2 months ago

Is there an existing issue for this?

Describe the bug

I am encountering an issue when trying to use whatsapp-web.js with Puppeteer to access https://web.whatsapp.com/. The error I receive is net::ERR_PROXY_CONNECTION_FAILED, which prevents the WhatsApp client from starting correctly.

Expected behavior

const { Client, LocalAuth } = require('whatsapp-web.js'); const puppeteer = require('puppeteer');

const whatsapp = new Client({ authStrategy: new LocalAuth(), puppeteer: { headless: false, args: ['--no-sandbox', '--disable-setuid-sandbox'] } });

whatsapp.on('qr', (qr) => { console.log('QR RECEIVED', qr); });

whatsapp.on('ready', () => { console.log('READY'); });

whatsapp.initialize();

Steps to Reproduce the Bug or Issue

const { Client, LocalAuth } = require('whatsapp-web.js'); const puppeteer = require('puppeteer');

const whatsapp = new Client({ authStrategy: new LocalAuth(), puppeteer: { headless: false, args: ['--no-sandbox', '--disable-setuid-sandbox'] } });

whatsapp.on('qr', (qr) => { console.log('QR RECEIVED', qr); });

whatsapp.on('ready', () => { console.log('READY'); });

whatsapp.initialize();

Relevant Code

No response

Browser Type

Other (please write in Additional Context)

WhatsApp Account Type

WhatsApp Business

Does your WhatsApp account have multidevice enabled?

No, I am not using Multi Device

Environment

Node.js Version: node v22.5.1 whatsapp-web.js Version: "github:pedroslopez/whatsapp-web.js#webpack-exodus" Puppeteer Version:18.2.1 Operating System: macOs bigsur 11.6.5 Network/Proxy Configuration: No proxy is being used.

Additional context

No response