-
-
Notifications
You must be signed in to change notification settings - Fork 52.6k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
warelay login --verbose fails immediately with "WhatsApp Web connection ended before fully opening" without displaying a QR code.
Environment
- OS: macOS (darwin 24.6.0)
- Node: v22.21.1 (also tested with v20.19.5)
- warelay version: 1.1.0
- Network: No proxy, direct internet connection
Error Details
Running the Baileys connection directly reveals the actual error:
WebSocket Error (socket hang up)
ECONNRESET
statusCode: 408 (Request Time-out)
Full stack trace:
Error: WebSocket Error (socket hang up)
at WebSocketClient.<anonymous> (.../warelay/node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:879:17)
at WebSocket.emit (node:events:519:28)
at emitErrorAndClose (.../ws/lib/websocket.js:1041:13)
at ClientRequest.<anonymous> (.../ws/lib/websocket.js:881:5)
at TLSSocket.socketOnEnd (node:_http_client:598:5)
Steps to Reproduce
- Install warelay:
npm install -g warelay - Run:
warelay login --verbose - Connection fails before QR code is displayed
Connection Update Sequence
{"connection": "connecting", "receivedPendingNotifications": false}
{"connection": "close", "lastDisconnect": {"error": {"data": {"code": "ECONNRESET"}, "isBoom": true, "output": {"statusCode": 408, "payload": {"error": "Request Time-out", "message": "WebSocket Error (socket hang up)"}}}}}Investigation
- Network connectivity to
https://web.whatsapp.comworks (returns 307 redirect) - No HTTP/HTTPS proxy configured
- Credentials directory exists but is empty (
~/.warelay/credentials/) - Issue occurs with both Node 20 and Node 22
Possible Causes
- WhatsApp blocking certain IP ranges or ISPs
- Baileys library version incompatibility
- Corporate network/firewall blocking WebSocket upgrades (though curl works)
- Regional WhatsApp server issues
Workaround Attempted
- Cleared credentials directory
- Upgraded Node from 20 to 22
- Reinstalled warelay
None of these resolved the issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working