fix: use MACOS platform to resolve 405 Connection Failure#2365
fix: use MACOS platform to resolve 405 Connection Failure#2365kobie3717 wants to merge 1 commit intoWhiskeySockets:masterfrom
Conversation
|
Thanks for opening this pull request and contributing to the project! The next step is for the maintainers to review your changes. If everything looks good, it will be approved and merged into the main branch. In the meantime, anyone in the community is encouraged to test this pull request and provide feedback. ✅ How to confirm it worksIf you’ve tested this PR, please comment below with: This helps us speed up the review and merge process. 📦 To test this PR locally:If you encounter any issues or have feedback, feel free to comment as well. |
|
nice 👍 |
|
woah tested from local me :) thanks @kobie3717 |
|
Tested and working ✅ |
|
confirmed working locally, you’re the hero |
|
Tested and working ✅ |
|
Tested and working ✅ |
2 similar comments
|
Tested and working ✅ |
|
Tested and working ✅ |
|
I hope as soon to merged 🙏 |
|
It worked. |
|
Tested and working ✅ |
|
Tested and Working ✅ |
|
Fiz exatamente como orientado na PR mudei o platafroma para MACOS , estou no local dev e deu este error o que acontecde muito em producao e dev. meu logs WARN [09:19:15.990] (6661) <EventEmitter. (file:///Users/devrhapp/Documents/intra-connect-saas/whaticket/backend/src/libs/wbot.ts:1:10574)>: {"level":30,"time":"2026-02-24T12:09:24.420Z","pid":5454,"hostname":"Mac-mini-de-Dev.local","trace":"Error: WebSocket Error (connect ETIMEDOUT 57.144.165.32:443)\n at WebSocketClient. (file:///Users/devrhapp/Documents/intra-connect-saas/whaticket/backend/node_modules/baileys/src/Socket/socket.ts:1070:11)\n at WebSocketClient.emit (node:events:526:35)\n at WebSocket. (file:///Users/devrhapp/Documents/intra-connect-saas/whaticket/backend/node_modules/baileys/src/Socket/Client/websocket.ts:39:52)\n at WebSocket.emit (node:events:514:28)\n at emitErrorAndClose (/Users/devrhapp/Documents/intra-connect-saas/whaticket/backend/node_modules/ws/lib/websocket.js:1046:13)\n at ClientRequest. (/Users/devrhapp/Documents/intra-connect-saas/whaticket/backend/node_modules/ws/lib/websocket.js:886:5)\n at ClientRequest.emit (node:events:514:28)\n at TLSSocket.socketErrorListener (node:_http_client:495:9)\n at TLSSocket.emit (node:events:514:28)\n at emitErrorNT (node:internal/streams/destroy:151:8)","msg":"connection errored"} |
|
@devrhapp Your issue is different from the 405 fix in this PR. You have two separate problems: 1. Status 428 (Precondition Required)
2. ETIMEDOUT to 57.144.165.32:443
Suggested steps:
Hope this helps! |
- WhatsApp passou a rejeitar Platform.WEB (value 14) em 2026-02-24 - Adiciona version: [2, 3000, 1033893291] em TODOS os 4 makeWASocket calls - Cria patch-baileys-platform.mjs para trocar Platform.WEB -> MACOS - Integra patch no build script (roda antes do vite build) - Remove fetchLatestBaileysVersion() no pairing (versao fixa) - Ref: WhiskeySockets/Baileys#2370 - Ref: WhiskeySockets/Baileys#2365
|
Tested and Working ✅ |
Fix for 405 Connection Failure (Issue #2364)
This PR resolves the 405 Connection Failure affecting ALL new Baileys connections globally as of 2026-02-24.
Root Cause
WhatsApp servers have started rejecting the UserAgent.Platform.WEB (value 14) and now require MACOS (value 24) for new device pairing. The noise handshake succeeds, but WhatsApp then sends
<failure reason='405' location='xxx'/>due to client payload validation failure.Solution
Changed
platform: proto.ClientPayload.UserAgent.Platform.WEBtoplatform: proto.ClientPayload.UserAgent.Platform.MACOSinsrc/Utils/validate-connection.ts.This aligns with WhatsApp Web's current behavior, which now identifies itself as MACOS platform rather than WEB.
Impact
Testing
Confirmed that QR codes generate successfully after this change, resolving the global connection issues reported in issue #2364.
Closes #2364