Comments (10)
hi, it just happened again
{
"statusCode": 500,
"timestamp": "2023-01-16T16:38:53.402Z",
"exception": {
"stack": "Error: Protocol error (Target.activateTarget): Session closed. Most likely the page has been closed.\n at CDPSession.send (/app/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:218:35)\n at Page._screenshotTask (/app/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1984:28)\n at /app/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1981:62",
"message": "Protocol error (Target.activateTarget): Session closed. Most likely the page has been closed.",
"name": "Error"
},
"request": {
"path": "/api/screenshot?session=default",
"method": "GET",
"body": {},
"query": {
"session": "default"
}
},
"version": {
"version": "2022.12.11",
"tier": "CORE"
}
from whatsapp-http-api.
it that like some sort of timeout ?
from whatsapp-http-api.
pedroslopez/whatsapp-web.js#1387
that might help
from whatsapp-http-api.
it that like some sort of timeout ?
I don't think so. Just browser had been closed before the request.
Weird, I'll test it and look how we can fix it
from whatsapp-http-api.
hi , it happened again
{ "statusCode": 500, "timestamp": "2023-01-19T10:36:26.176Z", "exception": { "stack": "Error: Protocol error: Connection closed. Most likely the page has been closed.\n at assert (/app/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/assert.js:26:15)\n at Page.close (/app/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:2126:32)\n at WhatsappSessionWebJSCore.stop (/app/dist/core/session.webjs.core.js:39:38)\n at SessionManagerCore.stop (/app/dist/core/manager.core.js:92:23)\n at SessionsController.stop (/app/dist/api/sessions.controller.js:29:29)\n at /app/node_modules/@nestjs/core/router/router-execution-context.js:38:29\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async /app/node_modules/@nestjs/core/router/router-execution-context.js:46:28\n at async /app/node_modules/@nestjs/core/router/router-proxy.js:9:17", "message": "Protocol error: Connection closed. Most likely the page has been closed.", "name": "Error" }, "request": { "path": "/api/sessions/stop", "method": "POST", "body": { "name": "default" }, "query": {} }, "version": { "version": "2022.12.11", "tier": "CORE" } }
from whatsapp-http-api.
@behind24proxies does it happens in other endpoints or only in /stop
?
from whatsapp-http-api.
@behind24proxies does it happens in other endpoints or only in
/stop
?
On all of them
from whatsapp-http-api.
@allburov I'm having the same problem, after a few hours of starting the session it gives this error.
I leave you with some questions:
Can the session close due to no interaction for some period of time?
If the webhook goes off, what is the behavior of the session?
{ "statusCode": 500, "timestamp": "2023-09-27T12:11:39.041Z", "exception": { "stack": "Error: Protocol error (Target.activateTarget): Session closed. Most likely the page has been closed.\n at CDPSession.send (/app/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/Connection.js:218:35)\n at Page._screenshotTask (/app/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1984:28)\n at /app/node_modules/whatsapp-web.js/node_modules/puppeteer/lib/cjs/puppeteer/common/Page.js:1981:62", "message": "Protocol error (Target.activateTarget): Session closed. Most likely the page has been closed.", "name": "Error" }, "request": { "path": "/api/screenshot?session=local", "method": "GET", "body": {}, "query": { "session": "local" } }, "version": { "version": "2023.9.7", "tier": "PLUS", "browser": "/usr/bin/chromium" } }
from whatsapp-http-api.
Hi! We've added session autorestart in WEBJS in case of failiing chromium, try updating and see if it helps
from whatsapp-http-api.
Can the session close due to no interaction for some period of time?
Unlikely, only if there's no memory or an error
If the webhook goes off, what is the behavior of the session?
It retries, nothing with chrome instance should be done.
@whera
If it happens with the latest version - could you enable debug mode and send the logs here?
https://waha.devlike.pro/docs/how-to/sessions/#enable-debug
Another option to try - to use Chrome version instead
https://waha.devlike.pro/docs/how-to/engines/#docker-images
devlikeapro/waha-plus:chrome
from whatsapp-http-api.
Related Issues (20)
- [BUG][NOWEB] - Different behaviour in NOWEB and WEBJS HOT 3
- [BUG][WEBJS] - /api/{session}/chats?limit=100&offset=0 HOT 5
- [Feature Request][Dashboard] - Add Custom Headers to UI HOT 1
- [Feature Request] Block and unblock users / List in contact route
- [Feature Request] - Do not restart STOPPED sessions when WHATSAPP_RESTART_ALL_SESSIONS=True (keep track of session status) HOT 5
- [Feature Request] When a new version is updated, how can I save my account without having to scan the code again HOT 2
- [BUG] - security environment variables ignored HOT 4
- [BUG][WEBJS] - Once the session is connected, the message.reaction webhook event from long ago will be received HOT 3
- [BUG][WEBJS] - READ message.ack event on Group messages HOT 2
- [BUG][WEBJS] - dockor run issue after new update HOT 1
- [Feature Request] - new group invite HOT 1
- [Feature Request] - Mark chat as unread HOT 2
- [Feature Request] - add session.created | updated | deleted events
- [Feature Request] - show "me" for STOPPED session
- [BUG][WEBJS] - Unable to Send Poll HOT 1
- PRO Plan HOT 4
- [Feature Request] Reply a media - NOWEB, WEBJS HOT 2
- [BUG][NOWEB] - It seems that the sticker cannot be downloaded HOT 2
- [Feature Request] Bring a field informing replied message HOT 1
- [BUG][WEBJS] - api/sendImage to Channel issue HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from whatsapp-http-api.