Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG][WEBJS] - Sessions Not Starting #691

Open
whera opened this issue Dec 11, 2024 · 4 comments
Open

[BUG][WEBJS] - Sessions Not Starting #691

whera opened this issue Dec 11, 2024 · 4 comments
Labels
bug Something isn't working engine:WEBJS

Comments

@whera
Copy link

whera commented Dec 11, 2024

After updating to the version:

{
  "version": "2024.12.3",
  "engine": "WEBJS",
  "tier": "PLUS",
  "browser": "/usr/bin/chromium"
}

I encountered an issue where existing sessions cannot be started. They remain stuck in the STARTING status and do not proceed.
When checking the logs, the following error is displayed:

[12:49:37.275] ERROR (WhatsappSession/1): session:1705 - Runtime.callFunctionOn timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed. {"reqId":770,"session":"1705"}
    err: {
      "type": "ProtocolError",
      "message": "Runtime.callFunctionOn timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.",
      "stack":
          ProtocolError: Runtime.callFunctionOn timed out. Increase the 'protocolTimeout' setting in launch/connect calls for a higher timeout if needed.
              at <instance_members_initializer> (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:94:14)
              at new Callback (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:98:16)
              at CallbackRegistry.create (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/common/CallbackRegistry.js:23:26)
              at Connection._rawSend (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/Connection.js:90:26)
              at CdpCDPSession.send (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/CDPSession.js:66:33)
              at #evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:360:50)
              at ExecutionContext.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/ExecutionContext.js:275:36)
              at IsolatedWorld.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/cdp/IsolatedWorld.js:100:30)
              at CdpFrame.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Frame.js:341:43)
              at CdpFrame.<anonymous> (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/util/decorators.js:104:27)
              at CdpPage.evaluate (/app/node_modules/puppeteer-core/lib/cjs/puppeteer/api/Page.js:807:43)
              at WebjsClient.inject (/app/node_modules/whatsapp-web.js/src/Client.js:107:55)
              at async WebjsClient.initialize (/app/node_modules/whatsapp-web.js/src/Client.js:334:9)
      "name": "ProtocolError"
    }
@whera whera added the bug Something isn't working label Dec 11, 2024
@evollution
Copy link

I have same problem all my sessions remain in status starting

[11:06:19.635] INFO (1): request errored {"reqId":168,"req":{"id":168,"method":"GET","url":"/api/contacts/check-exists?phone=&session=session_","query":{"phone":"40723468122","session":"session_"},"params":{"0":"api/contacts/check-exists"}},"res":{"statusCode":422},"responseTime":6090}
err: {
"type": "UnprocessableEntityException",
"message": "Unprocessable Entity Exception",
"stack":
UnprocessableEntityException: Unprocessable Entity Exception
at SessionManagerPlus.waitUntilStatus (/app/dist/core/abc/manager.abc.js:65:19)
at runNextTicks (node:internal/process/task_queues:65:5)
at process.processTimers (node:internal/timers:526:9)
at async ContactsController.checkExists (/app/dist/api/contacts.controller.js:36:26)
"response": {
"error": "Session status is not as expected. Try again later or restart the session",
"session": "session_",
"status": "STARTING",
"expected": [
"WORKING"
]
},
"status": 422,
"options": {},
"name": "UnprocessableEntityException"

@devlikepro
Copy link
Contributor

devlikepro commented Dec 14, 2024

Hi! Could you try to stop all session and start exactly one and send the logs to [email protected]? That's weird behaviour

patron:PRO

@devlikepro
Copy link
Contributor

devlikepro commented Dec 14, 2024

ANother thing to try is to swithc to chrome based docker image

devlikeapro/waha-plus:chrome

https://waha.devlike.pro/docs/how-to/engines/#docker-images

patron:PRO

@devlikepro
Copy link
Contributor

devlikepro commented Dec 14, 2024

@whera what is your CPU/Memory configuration? How many sessions do you have?
Usually timeout happens because it starts all sessions at once when you restart container

patron:PRO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working engine:WEBJS
Projects
None yet
Development

No branches or pull requests

3 participants