MobCode100 / whatsapp-web.js

whatsapp-web.js + link with phone number. See https://t.ly/KWR4p.
https://wwebjs.dev
Apache License 2.0
2 stars 4 forks source link

Error starting whatsapp-web.js #4

Closed MobCode100 closed 3 months ago

MobCode100 commented 3 months ago

Is there an existing issue for this?

Describe the bug

/usr/src/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:329
                error: new Errors_js_1.ProtocolError(),
                       ^

ProtocolError: Waiting for selector `[data-icon='search']` failed: Protocol error (Runtime.callFunctionOn): Target closed.
    at /usr/src/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:329:24
    at new Promise (<anonymous>)
    at CDPSessionImpl.send (/usr/src/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:325:16)
    at ExecutionContext._ExecutionContext_evaluate (/usr/src/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:211:46)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async JSHandle.evaluateHandle (/usr/src/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js:97:16)
    at async WaitTask.rerun (/usr/src/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:114:28) {
  originalMessage: ''
}

Node.js v20.12.1

After restarting whatsapp-web.js, the error pops out.

Expected behavior

The whatsapp-web.js able to successfully start and log in.

Steps to Reproduce the Bug or Issue

  1. Restart server node using the whatsapp-web.js library.
  2. Error reproduced.

Relevant Code

No response

Browser Type

Chromium

WhatsApp Account Type

Standard

Does your WhatsApp account have multidevice enabled?

Yes, I am using Multi Device

Environment

OS: Docker + Alpine Phone OS: Android WhatsApp Web version: 2.2407.5 Node.js Version: v20.12.1

Additional context

No response

MobCode100 commented 3 months ago

@pfnh26 Thank you very much for your support! Sorry for the quite late response. This problem should be fixed I think. I've updated the WhatsApp Web version to the latest stable 2.2412.5, and it fixed the problem for me. For now, I will still open this issue for a few days to let anyone test the fix.