[Error] -> Timed Out
Hey guys, I don't know if you've already come across this error, but normally when it happens to me I have to scan the qrcode again.
Does anyone know how to fix this error? because it is in the lib itself.
- Note: I'm already using the new version.
Error:

Usually this happens after a certain time that the connection is active, this timedout problem really sucks. But basically the way I dealt with it was creating solutions in which when it was not possible to send a message because of timedout I restarted the connection and you don't have to read the qrcode again every time this happens, you can activate the sessions and there it is saved if you stop the code and turn it on again it will not ask to read the qr again.
@Guilherme-j10 How do you restart the connection exactly? Where to catch this?
Same issue
Same issue
Same issue
Hey everyone, it looks like it's normal for baileys to lose connection to the socket.
Unfortunately, you have to keep trying to perform this reconnection automatically.
A possible approach to solving this error is to use a messaging service, where when the socket does not respond, you leave the message with an error status and when the socket is restarted and responds again, the application will consume this message.
I use this approach and so far it has worked very well.
A question. /** ping-pong interval for WS connection */ keepAliveIntervalMs: number
this config is not enough ?
hello, any update about this issue?
same issue
, the appli
how to do this btw? I mean, where should i edit?
Same Issue... I guess that using pm2 is a patch that circunvent the problem... but should be a way to solve or at least prevent the program halt, catching this?
pm2 it just keeps the service running, the timedout itself doesn't stop the service it stays in a freeze state where it's possible to only receive messages but not send them
this problem is a bit annoying to tell the truth and any way to solve it is inefficient from the point of view that when the connection is being restarted and a message is received it will not be saved. Anyway inconsistencies will be generated
fixed?
Same issue
same
.../node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:136
.then(() => reject(new boom_1.Boom('Timed Out', {
^
Error: Timed Out
at .../@whiskeysockets/baileys/lib/Utils/generics.js:136:32 {
data: {
stack: 'Error\n' +
' at promiseTimeout (.../node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:131:19)\n' +
' at waitForMessage (.../node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:114:53)\n' +
' at query (.../node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:136:22)\n' +
' at groupQuery (.../node_modules/@whiskeysockets/baileys/lib/Socket/groups.js:12:55)\n' +
' at groupMetadata (.../node_modules/@whiskeysockets/baileys/lib/Socket/groups.js:22:30)\n' +
' at .../node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:288:47\n' +
' at .../node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:291:23\n' +
' at Object.transaction (.../node_modules/@whiskeysockets/baileys/lib/Utils/auth-utils.js:136:32)\n' +
' at relayMessage (.../node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:278:30)\n' +
' at Object.sendMessage (.../node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:649:23)'
},
isBoom: true,
isServer: false,
output: {
statusCode: 408,
payload: {
statusCode: 408,
error: 'Request Time-out',
message: 'Timed Out'
},
headers: {}
}
}
up
Guys i think i found a solution. My project was giving this error after 2 days. 3 days passed and there was no problem. I just added the following:
defaultQueryTimeoutMs: undefined,
Here is my full code:
sock = makeWASocket({
printQRInTerminal: true,
auth: state,
logger: log({ level: "silent" }),
browser: Browsers.macOS("Desktop"),
syncFullHistory: false,
/** Default timeout for queries, undefined for no timeout */
defaultQueryTimeoutMs: undefined,
});
I live with this issue. Just PM2 do the job of restarting the process everytime it exits. I'll check the undefined thing, sounds weird
Has anyone tried Jasermon's solution and can confirm that it solves the problem?
Guys i think i found a solution. My project was giving this error after 2 days. 3 days passed and there was no problem. I just added the following:
defaultQueryTimeoutMs: undefined,Here is my full code:
sock = makeWASocket({ printQRInTerminal: true, auth: state, logger: log({ level: "silent" }), browser: Browsers.macOS("Desktop"), syncFullHistory: false, /** Default timeout for queries, undefined for no timeout */ defaultQueryTimeoutMs: undefined, });
Any update? same error
Alguém já tentou a solução do Jasermon e pode confirmar que ela resolve o problema?
Pessoal, acho que encontrei uma solução. Meu projeto estava apresentando esse erro após 2 dias. 3 dias se passaram e não houve problema. Acabei de adicionar o seguinte:
defaultQueryTimeoutMs: undefined,Aqui está meu código completo:sock = makeWASocket({ printQRInTerminal: true, auth: state, logger: log({ level: "silent" }), browser: Browsers.macOS("Desktop"), syncFullHistory: false, /** Default timeout for queries, undefined for no timeout */ defaultQueryTimeoutMs: undefined, });
Eu utilizei mas deu foi erro!!
Desistí de que funcione sin que de Timeout. Lo uso con PM2 y listo
El mar, 21 nov 2023 a las 10:56, arcanjinha @.***>) escribió:
Alguém já tentou a solução do Jasermon e pode confirmar que ela resolve o problema?
Pessoal, acho que encontrei uma solução. Meu projeto estava apresentando esse erro após 2 dias. 3 dias se passaram e não houve problema. Acabei de adicionar o seguinte: defaultQueryTimeoutMs: undefined, Aqui está meu código completo:
sock = makeWASocket({ printQRInTerminal: true, auth: state, logger: log({ level: "silent" }), browser: Browsers.macOS("Desktop"), syncFullHistory: false, /** Default timeout for queries, undefined for no timeout */ defaultQueryTimeoutMs: undefined, });
Eu utilizei mas deu foi erro!!
— Reply to this email directly, view it on GitHub https://github.com/WhiskeySockets/Baileys/issues/34#issuecomment-1820973739, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG3Y4CEDCZ2QYNFJJKCSWDTYFSXJDAVCNFSM6AAAAAAXOJSAIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRQHE3TGNZTHE . You are receiving this because you commented.Message ID: @.***>
--
Claudio Falaschini
Hello everyone,
I had this issue for a couple days, in my case, the problem was that I should NOT add a "+" at the start of the jid.
So, instead of '[email protected]' it should be '[email protected]'
Hope this helps someone!
Same
I got the same error. There is any solution for it. .../node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:136 .then(() => reject(new boom_1.Boom('Timed Out', { ^
Error: Timed Out at .../@whiskeysockets/baileys/lib/Utils/generics.js:136:32 { data: { stack: 'Error\n' + ' at promiseTimeout (.../node_modules/@whiskeysockets/baileys/lib/Utils/generics.js:131:19)\n' + ' at waitForMessage (.../node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:114:53)\n' + ' at query (.../node_modules/@whiskeysockets/baileys/lib/Socket/socket.js:136:22)\n' + ' at groupQuery (.../node_modules/@whiskeysockets/baileys/lib/Socket/groups.js:12:55)\n' + ' at groupMetadata (.../node_modules/@whiskeysockets/baileys/lib/Socket/groups.js:22:30)\n' + ' at .../node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:288:47\n' + ' at .../node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:291:23\n' + ' at Object.transaction (.../node_modules/@whiskeysockets/baileys/lib/Utils/auth-utils.js:136:32)\n' + ' at relayMessage (.../node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:278:30)\n' + ' at Object.sendMessage (.../node_modules/@whiskeysockets/baileys/lib/Socket/messages-send.js:649:23)' }, isBoom: true, isServer: false, output: { statusCode: 408, payload: { statusCode: 408, error: 'Request Time-out', message: 'Timed Out' }, headers: {} } }
I am also facing same issue , any fix available ?
Hello everyone,
I had this issue for a couple days, in my case, the problem was that I should NOT add a "+" at the start of the jid.
So, instead of
'[email protected]'it should be'[email protected]'Hope this helps someone!
Sorry, I don't understand. Where exactly are these JIDs being defined? In my case, I don’t need to perform any actions for this issue to occur after some time running.
That said, while it's possible to partially "fix" this issue by restarting the process when it exits, I find this approach unattractive. We could potentially miss events while it’s rebooting and logging in again.