Comments (26)
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.
from baileys.
@Guilherme-j10 How do you restart the connection exactly? Where to catch this?
from baileys.
Same issue
from baileys.
Same issue
from baileys.
Same issue
from baileys.
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.
from baileys.
A question.
/** ping-pong interval for WS connection */
keepAliveIntervalMs: number
this config is not enough ?
from baileys.
hello, any update about this issue?
from baileys.
same issue
from baileys.
, the appli
how to do this btw? I mean, where should i edit?
from baileys.
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?
from baileys.
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
from baileys.
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
from baileys.
fixed?
from baileys.
Same issue
from baileys.
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: {}
}
}
from baileys.
up
from baileys.
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,
});
from baileys.
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
from baileys.
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, });
from baileys.
Any update?
same error
from baileys.
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!!
from baileys.
from baileys.
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!
from baileys.
Same
from baileys.
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: {}
}
}
from baileys.
Related Issues (20)
- Emoji Reaction HOT 3
- [BUG] How fix Connection Terminate? HOT 1
- Is there a way to access whatsapp channel?
- [BUG] How to send an event invitation message in a group with the community
- [BUG] SCHEDULE CALL -> WAITING MESSAGE
- [BUG] unable to get message.update event from poll vote HOT 1
- [BUG] Baileys
- [BUG] Looping in message.upsert HOT 2
- Send Media Message Memory Leak HOT 1
- [BUG] makeInMemoryStore HOT 2
- [BUG]
- [BUG]
- [BUG] HOT 3
- [BUG] HOT 3
- Request Adding Charge Buyer for WhatsApp Bussiness HOT 1
- [BUG] Broadcast option is not present in the message options
- [BUG] HOT 1
- [BUG] Stream errored out after QR scan HOT 3
- [BUG] HOT 2
- [BUG] Error playing audio on iOS/WA (Windows) devices
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from baileys.