[WIP] Fix connection issue with WhatsApp #11
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.
Original prompt
quero que você ajuste a conexão com o Whatsapp, acontece que ao tentar fazer a conexão com o connection.ts ele retorna um erro DEBUG [30/01/2026 11:27:26]: [1769783246598] connection.update full payload: {"qr":"2@UftKO3AuM5C5TDGcoH/7UGDtKbq7d5OO/jzwxWfDnmZgFGR4Cu6UMa9EQZj9BdJkaYeeU7FEMpyGRKmXPaqExNeDSycRKzNrSAU=,iKjIell1mi4/euMqIWSdTXcMZDYb63I/drwvdG12sho=,0NRuLw24HtwHdsLuIvwDxKNM9BMY2qth5GRGctMUjUM=,1OmkAp5U6tqeGHBJWjoANo6OMFSB7n9vTVxmpaci4wc="}
DEBUG [30/01/2026 11:27:26]: [1769783246598] Update-Key: qr, Value: "2@UftKO3AuM5C5TDGcoH/7UGDtKbq7d5OO/jzwxWfDnmZgFGR4Cu6UMa9EQZj9BdJkaYeeU7FEMpyGRKmXPaqExNeDSycRKzNrSAU=,iKjIell1mi4/euMqIWSdTXcMZDYb63I/drwvdG12sho=,0NRuLw24HtwHdsLuIvwDxKNM9BMY2qth5GRGctMUjUM=,1OmkAp5U6tqeGHBJWjoANo6OMFSB7n9vTVxmpaci4wc="
DEBUG [30/01/2026 11:27:26]: [1769783246598] 🔑 QR Code gerado
DEBUG [30/01/2026 11:27:38]: [1769783258947] pair success recv
INFO [30/01/2026 11:27:38]: [1769783258962] pairing configured successfully, expect to restart the connection...
me: {
"id": "554797010769:31@s.whatsapp.net"
}
platform: "android"
DEBUG [30/01/2026 11:27:38]: [1769783258963] connection.update full payload: {"isNewLogin":true}
DEBUG [30/01/2026 11:27:38]: [1769783258963] Update-Key: isNewLogin, Value: true
DEBUG [30/01/2026 11:27:38]: [1769783258963] Update-Key: qr, Value: undefined
ERROR [30/01/2026 11:27:39]: [1769783259459] stream errored out
node: {
"tag": "stream:error",
"attrs": {
"code": "515"
}
}
INFO [30/01/2026 11:27:39]: [1769783259460] connection errored
trace: "Error: Stream Errored (restart required)\n at WebSocketClient. (/home/polabiel/Trabalho/Quirk/node_modules/.pnpm/baileys@6.17.16_bufferutil@4.1.0_eslint@8.57.1_qrcode-terminal@0.12.0_typescript@5.9.3/node_modules/baileys/lib/Socket/socket.js:519:13)\n at WebSocketClient.emit (node:events:524:28)\n at /home/polabiel/Trabalho/Quirk/node_modules/.pnpm/baileys@6.17.16_bufferutil@4.1.0_eslint@8.57.1_qrcode-terminal@0.12.0_typescript@5.9.3/node_modules/baileys/lib/Socket/socket.js:236:35\n at Object.decodeFrame (/home/polabiel/Trabalho/Quirk/node_modules/.pnpm/baileys@6.17.16_bufferutil@4.1.0_eslint@8.57.1_qrcode-terminal@0.12.0_typescript@5.9.3/node_modules/baileys/lib/Utils/noise-handler.js:144:17)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
DEBUG [30/01/2026 11:27:39]: [1769783259460] connection.update full payload: {"connection":"close","lastDisconnect":{"error":{"data":{"tag":"stream:error","attrs":{"code":"515"}},"isBoom":true,"isServer":true,"output":{"statusCode":515,"payload":{"statusCode":515,"error":"Unknown","message":"Stream Errored (restart required)"},"headers":{}}},"date":"2026-01-30T14:27:39.460Z"}}
DEBUG [30/01/2026 11:27:39]: [1769783259460] Update-Key: connection, Value: "close"
DEBUG [30/01/2026 11:27:39]: [1769783259460] Update-Key: lastDisconnect, Value: {"error":{"data":{"tag":"stream:error","attrs":{"code":"515"}},"isBoom":true,"isServer":true,"output":{"statusCode":515,"payload":{"statusCode":515,"error":"Unknown","message":"Stream Errored (restart required)"},"headers":{}}},"date":"2026-01-30T14:27:39.460Z"}
INFO [30/01/2026 11:27:39]: [1769783259460]
🔄 Me reinicie por favor! Digite "npm start" ou caso esteja em modo de desenvolvimento, Digite "npm run dev".
DEBUG [30/01/2026 11:27:39]: [1769783259460] 🔒 Conexão fechada
INFO [30/01/2026 11:27:39]: [1769783259460] 🔄 Tentando reconectar...
🟢 Iniciando conexão com Whatsapp
INFO [30/01/2026 11:27:44]: [1769783264464] Using WA Web version: 2,3000,1028397221
DEBUG [30/01/2026 11:27:44]: [1769783264467] connection.update full payload: {"connection":"connecting","receivedPendingNotifications":false}
DEBUG [30/01/2026 11:27:44]: [1769783264467] Update-Key: connection, Value: "connecting"
DEBUG [30/01/2026 11:27:44]: [1769783264467] Update-Key: receivedPendingNotifications, Value: false
DEBUG [30/01/2026 11:27:44]: [1769783264467] Update-Key: qr, Value: undefined
DEBUG [30/01/2026 11:27:44]: [1769783264467] 🔄 Conectando...
INFO [30/01/2026 11:27:44]: [1769783264682] connected to WA
browser: [
"Ubuntu",
"Desktop",
"6.14.0-37-generic"
]
helloMsg: {
"clientHello": {
"ephemeral": "UgYHduA0CBy5ucNo2siTt0Hvm/NuFQJ8nLkHtLSyGEE="
}
}
INFO [30/01/2026 11:27:44]: [1769783264889] logging in...
node: {
"username": "554797010769",
"passive": false,
"userAgent": {
"platform": "WEB",
"appVersion": {
"primary": 2,
"secondary": 3000,
"tertiary": 1028397221
},
"mcc": "000",
"mnc": "000",
"osVersion": "0.1",
"device": "Desktop",
"osBuildNumber": "0.1",
"releaseChannel": "RELEASE",
"localeLanguageIso6391": "en",
"localeCountryIso31661Alpha2": "US"
},
"webInfo": {
"webSubPlatform": "WEB_BROWSER"
},
"connectType": "WIFI_UNKNOWN",
...
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.