guyzyl / whatsapp-contact-sync

Easy way to sync between the contact photos on WhatsApp to Google Contacts
https://whasync.com/
Other
190 stars 23 forks source link

ProtocolError: Protocol error (Network.getResponseBody): Target closed #135

Closed guyzyl closed 10 months ago

guyzyl commented 10 months ago

Bug appears when performing these actions:

  1. Open WhaSync
  2. Link WhatsApp to WhaSync
  3. Go to WhaSync home screen
  4. Remove the new linked device on WhatsApp
  5. Press Continue / Get Started on WhaSync

This error causes the backend to crash.

Full error:

ProtocolError: Protocol error (Network.getResponseBody): Target closed.
    at whatsapp-contact-sync/server/node_modules/puppeteer/src/common/Connection.ts:304:16
    at new Promise (<anonymous>)
    at CDPSession.send (whatsapp-contact-sync/server/node_modules/puppeteer/src/common/Connection.ts:300:12)
    at whatsapp-contact-sync/server/node_modules/puppeteer/src/common/HTTPResponse.ts:192:47
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async HTTPResponse.text (whatsapp-contact-sync/server/node_modules/puppeteer/src/common/HTTPResponse.ts:220:21)
    at async whatsapp-contact-sync/server/node_modules/whatsapp-web.js/src/Client.js:733:44 {
  originalMessage: ''

This error also sometimes appear:

Error: Protocol error (Runtime.callFunctionOn): Session closed. Most likely the page has been closed.
    at CDPSession.send (whatsapp-contact-sync/server/node_modules/puppeteer/src/common/Connection.ts:286:9)
    at ExecutionContext._evaluateInternal (whatsapp-contact-sync/server/node_modules/puppeteer/src/common/ExecutionContext.ts:254:44)
    at ExecutionContext.evaluate (whatsapp-contact-sync/server/node_modules/puppeteer/src/common/ExecutionContext.ts:140:23)
    at DOMWorld.evaluate (whatsapp-contact-sync/server/node_modules/puppeteer/src/common/DOMWorld.ts:174:20)