devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click!
https://waha.devlike.pro/
Apache License 2.0
806 stars 247 forks source link

[BUG][WEBJS] - Session stuck in INITIALIZING state #395

Closed KKshitiz closed 4 days ago

KKshitiz commented 4 days ago

Describe the bug

After calling the /start endpoint, the session goes into INITIALIZING state and never shows the QR code.

Version

{
  version: '2024.6.7',
  engine: 'WEBJS',
  tier: 'PLUS',
  browser: '/usr/bin/chromium'
}

Logs

WhatsApp HTTP API is running on: http://[::1]:3000
Environment: {
  version: '2024.6.7',
  engine: 'WEBJS',
  tier: 'PLUS',
  browser: '/usr/bin/chromium'
}
[Nest] 30  - 06/28/2024, 8:15:54 AM     LOG [SessionManager] 'session-jghiarny9d66arrf32g0' - starting session...
[Nest] 30  - 06/28/2024, 8:15:54 AM     LOG [MediaManager - session-jghiarny9d66arrf32g0] Only 'audio,image,application/pdf,video' mimetypes will be downloaded for the session
[Nest] 30  - 06/28/2024, 8:15:54 AM     LOG [Webhook - session-jghiarny9d66arrf32g0] Configuring webhooks for https://api.prod.unirsal.com/backend-service/v2/webhook/whatsapp/handler...
[Nest] 30  - 06/28/2024, 8:15:54 AM     LOG [Webhook - session-jghiarny9d66arrf32g0] Event 'session.status' is enabled for url: https://api.prod.unirsal.com/backend-service/v2/webhook/whatsapp/handler
[Nest] 30  - 06/28/2024, 8:15:54 AM     LOG [Webhook - session-jghiarny9d66arrf32g0] Webhooks were configured for https://api.prod.unirsal.com/backend-service/v2/webhook/whatsapp/handler.
[Nest] 30  - 06/28/2024, 8:15:54 AM     LOG [Webhook - session-jghiarny9d66arrf32g0] Sending POST to https://api.prod.unirsal.com/backend-service/v2/webhook/whatsapp/handler...
[Nest] 30  - 06/28/2024, 8:15:54 AM VERBOSE [Webhook - session-jghiarny9d66arrf32g0] POST DATA: {"event":"session.status","session":"session-jghiarny9d66arrf32g0","me":null,"payload":{"name":"session-jghiarny9d66arrf32g0","status":"STARTING"},"engine":"WEBJS","environment":{"version":"2024.6.7","engine":"WEBJS","tier":"PLUS","browser":"/usr/bin/chromium"}}
[Nest] 30  - 06/28/2024, 8:15:54 AM   DEBUG [WhatsappSession - session-jghiarny9d66arrf32g0] Using web version: '2.2412.54'
[Nest] 30  - 06/28/2024, 8:15:54 AM     LOG [Webhook - session-jghiarny9d66arrf32g0] Event 'message.any' is enabled for url: https://api.prod.unirsal.com/backend-service/v2/webhook/whatsapp/handler
[0628/081554.127349:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[Nest] 30  - 06/28/2024, 8:15:54 AM     LOG [Webhook - session-jghiarny9d66arrf32g0] POST request was sent with status code: 200
[Nest] 30  - 06/28/2024, 8:15:54 AM   DEBUG [Webhook - session-jghiarny9d66arrf32g0] Response: {"message":"Webhook receive success","data":{"event":"Session update","details":{"id":363,"session":"session-jghiarny9d66arrf32g0","status":"INITIALIZING"}}}
[0628/081554.203587:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[0628/081554.203625:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[0628/081554.205111:WARNING:audio_manager_linux.cc(53)] Falling back to ALSA for audio output. PulseAudio is not available or could not be initialized.
[0628/081554.212081:WARNING:bluez_dbus_manager.cc(248)] Floss manager not present, cannot set Floss enable/disable.

DevTools listening on ws://127.0.0.1:38721/devtools/browser/261fbdba-9633-49d3-85b0-30e5a364a518
[0628/081556.389214:INFO:CONSOLE(314)] "Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'needsUpdate')", source: https://web.whatsapp.com/app.2c7f8dd150ae88037cde.js (314)
[0628/081556.758897:INFO:CONSOLE(314)] "Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'needsUpdate')", source: https://web.whatsapp.com/app.2c7f8dd150ae88037cde.js (314)
[0628/081556.986421:INFO:CONSOLE(314)] "Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'needsUpdate')", source: https://web.whatsapp.com/app.2c7f8dd150ae88037cde.js (314)
[0628/081557.225759:INFO:CONSOLE(314)] "Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'needsUpdate')", source: https://web.whatsapp.com/app.2c7f8dd150ae88037cde.js (314)
[0628/081557.439124:INFO:CONSOLE(314)] "Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'needsUpdate')", source: https://web.whatsapp.com/app.2c7f8dd150ae88037cde.js (314)
[0628/081557.656082:INFO:CONSOLE(314)] "Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'needsUpdate')", source: https://web.whatsapp.com/app.2c7f8dd150ae88037cde.js (314)
[0628/081557.884228:INFO:CONSOLE(314)] "Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'needsUpdate')", source: https://web.whatsapp.com/app.2c7f8dd150ae88037cde.js (314)
[0628/081558.249870:INFO:CONSOLE(314)] "Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'needsUpdate')", source: https://web.whatsapp.com/app.2c7f8dd150ae88037cde.js (314)
[0628/081558.328316:INFO:CONSOLE(215)] "Another connection wants to delete database 'wawc'. Closing db now to resume the delete request.", source: https://web.whatsapp.com/serviceworker.js (215)
[0628/081558.457341:INFO:CONSOLE(314)] "Uncaught (in promise) TypeError: Cannot set properties of undefined (setting 'needsUpdate')", source: https://web.whatsapp.com/app.2c7f8dd150ae88037cde.js (314)
[0628/081558.618600:INFO:CONSOLE(215)] "Another connection wants to delete database 'wawc'. Closing db now to resume the delete request.", source: https://web.whatsapp.com/serviceworker.js (215)
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
[0628/081559.150005:ERROR:alsa_util.cc(204)] PcmOpen: default,No such file or directory
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5233:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM default
[0628/085116.987197:ERROR:alsa_util.cc(204)] PcmOpen: plug:default,No such file or directory
Warning: vkCreateInstance failed with VK_ERROR_INCOMPATIBLE_DRIVER
    at CheckVkSuccessImpl (../../third_party/dawn/src/dawn/native/vulkan/VulkanError.cpp:101)
    at CreateVkInstance (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:493)
    at Initialize (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:379)
    at Create (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:301)
    at operator() (../../third_party/dawn/src/dawn/native/vulkan/BackendVk.cpp:556)

Warning: Failed to load libEGL.so
    at DiscoverPhysicalDevices (../../third_party/dawn/src/dawn/native/opengl/BackendGL.cpp:74)

ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4745:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings

Additional context

I also tried stopping, restarting and then starting again but still the same issue The older containers/servers I'm having don't have this issue although they use the same version and have the exact same configuration

patron:ADVANCED

KapteinBabbalas commented 4 days ago

I have the same. The screenshot cycles from initializing and then this message and then restarts again image

KKshitiz commented 4 days ago

@KapteinBabbalas Upgrading to version 2024.6.8 solved the issue for me. Closing this ticket.

patron:ADVANCED

KapteinBabbalas commented 4 days ago

@KapteinBabbalas Upgrading to version 2024.6.8 solved the issue for me. Closing this ticket.

patron:ADVANCED

Does anybody run the container in Azure? I'm running the container in Azure's Conatiner Apps. Adding Environment variables does not seem to fix it. The application still uses the old settings that came with the image even after a restart. (I'm not a container expert) .

Chat GPT suggested that I rebuild the container myself with the correct environment settings and deploy it like that.

Any ideas? image

image

jerryrat commented 4 days ago

actually, latest version still not working, and even previous version , can not start new session

egbertomonteiro commented 3 days ago

same problem here. latest version not working.

KapteinBabbalas commented 1 day ago

I saw the problem that I had was that I was using the old container:

devlikeapro/whatsapp-http-api:latest

you should use the new one

devlikeapro/waha:latest