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.05k stars 3.58k forks source link

HTTPResponse Error on reconnection whatsappweb #2707

Closed tinyprocessing closed 8 months ago

tinyprocessing commented 8 months ago

Is there an existing issue for this?

Describe the bug

When client reload page or trying reconnect - this error appeared

/whatsapp/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/HTTPResponse.js:136 throw new Errors_js_1.ProtocolError('Could not load body for this request. This might happen if the request is a preflight request.'); ^

ProtocolError: Could not load body for this request. This might happen if the request is a preflight request. at /whatsapp/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/HTTPResponse.js:136:31 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async HTTPResponse.text (/whatsapp/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/HTTPResponse.js:148:25) at async /whatsapp/node_modules/whatsapp-web.js/src/Client.js:744:44 { originalMessage: '' }

Node.js v20.5.1

Expected behavior

No errors

Steps to Reproduce the Bug or Issue

Check how whatsapp web cache works

Relevant Code

Client.js:744:44

Browser Type

Google Chrome

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

Node.js v20.5.1 Docker

Additional context

No response

alechkos commented 8 months ago

@tinyprocessing Provide the code

alechkos commented 8 months ago

Check https://github.com/puppeteer/puppeteer/issues/9864