wwebjs-api icon indicating copy to clipboard operation
wwebjs-api copied to clipboard

Frequent net::ERR_TIMED_OUT and Protocol error (Runtime.callFunctionOn): Target closed. leading to Session Crash

Open NuxKalin opened this issue 2 months ago • 2 comments

The project frequently terminates unexpectedly when we are running tests.

error log

{"level":30,"time":1761891447755,"pid":30764,"hostname":"linxiaoxuan-PC","sessionId":"f15b059d8cb34cd4ba5d0aef9af1428b","msg":"Destroying session"}
/home/linxiaoxuan/Project/wwebjs-api/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:329
                error: new Errors_js_1.ProtocolError(),
                       ^

ProtocolError: Protocol error (Runtime.callFunctionOn): Target closed.
    at /home/linxiaoxuan/Project/wwebjs-api/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:329:24
    at new Promise (<anonymous>)
    at CDPSessionImpl.send (/home/linxiaoxuan/Project/wwebjs-api/node_modules/puppeteer-core/lib/cjs/puppeteer/common/Connection.js:325:16)
    at ExecutionContext._ExecutionContext_evaluate (/home/linxiaoxuan/Project/wwebjs-api/node_modules/puppeteer-core/lib/cjs/puppeteer/common/ExecutionContext.js:211:46)
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
    at async JSHandle.evaluateHandle (/home/linxiaoxuan/Project/wwebjs-api/node_modules/puppeteer-core/lib/cjs/puppeteer/common/JSHandle.js:97:16)
    at async WaitTask.rerun (/home/linxiaoxuan/Project/wwebjs-api/node_modules/puppeteer-core/lib/cjs/puppeteer/common/WaitTask.js:114:28) {
  originalMessage: ''
}

Node.js v22.17.1

I look forward to your feedback on this. Thank you.

NuxKalin avatar Oct 31 '25 06:10 NuxKalin

Can you pull the latest image and give it another try?

avoylenko avatar Nov 07 '25 09:11 avoylenko

This issue occurred upon repeated logins (or re-logging in). It has temporarily disappeared recently, but if it reappears after a future version update, I will promptly communicate it to you.

NuxKalin avatar Nov 10 '25 07:11 NuxKalin