Baileys icon indicating copy to clipboard operation
Baileys copied to clipboard

Flush Buffer

Open makanSukros opened this issue 1 year ago • 3 comments

makanSukros avatar Jun 12 '23 02:06 makanSukros

Thanks for your contribution.

The next step is to wait for review and approval to merge it to main repository

The community can help reacting with a thumb up (:thumbsup:) for approval and rocket (:rocket:) for who has tested it.

To test this PR you can run the following command below:

# NPM
npm install @whiskeysockets/baileys@makanSukros/Baileys#master
# YARN v2
yarn add @whiskeysockets/baileys@makanSukros/Baileys#master

whiskeysockets-bot avatar Jun 12 '23 02:06 whiskeysockets-bot

@makanSukros , could you explain this change?

edgardmessias avatar Jun 12 '23 13:06 edgardmessias

@makanSukros , could you explain this change?

to solve the problem of messages.upsert not getting through sometimes

makanSukros avatar Jun 14 '23 02:06 makanSukros

@makanSukros no, this is not fix the root cause

I am who made this quick fix in my repo https://github.com/kbiits/Whiskey-Baileys

please don't just copy paste and made a PR for fixing, you need to analyze the root cause

my quick fix is not solve the root cause

kbiits avatar Jun 22 '23 03:06 kbiits

I personally don't experience this issue. Maybe there is something wrong with your code/ misconfigure or missing auth/ something else. I suggest to close this pr and investigate the root cause as @kbiits suggest.

Fonnte avatar Jun 22 '23 04:06 Fonnte

I personally don't experience this issue. Maybe there is something wrong with your code/ misconfigure or missing auth/ something else. I suggest to close this pr and investigate the root cause as @kbiits suggest.

No, I don't thinks it's from the code / configuration. A lot of people experience this issue. I still can't figure out what the root cause is and why the buffer is not flushed. Currently I don't have any spare time to investigate it more. But what I can say is it's not from the client code / configuration

kbiits avatar Jun 22 '23 04:06 kbiits

I agree with @kbiits , we need to investigate it.

edgardmessias avatar Jun 22 '23 11:06 edgardmessias

I don't know if this could be related to the timedouts that occur with me and others using the code. But after some time connected it becomes unfeasible to use the message sending and number validation methods, if your defaultQueryTimeoutMs is not set to undefined a TimedOut error message will be printed in the terminal, at least the only simple way to solve this is by stopping the application and starting again, programmatically to do this becomes somewhat complex, as in my case I had to use child_process. Anyway, I already opened an issue on the old repo to talk about the subject and almost no one responded, but talking to some developers who use Baileys, everyone goes through this problem, including investigating a little deeper into the issues related to this subject this problem is even a little old and at least no one has been able to solve this problem at the root, not even Adi himself

Guilherme-j10 avatar Jun 23 '23 13:06 Guilherme-j10

Não sei se isso pode estar relacionado aos tempos limite que ocorrem comigo e com outras pessoas usando o código. Mas depois de algum tempo conectado torna-se inviável usar os métodos de envio de mensagens e validação de número, se o seu defaultQueryTimeoutMs não estiver definido como undefined uma mensagem de erro TimedOut será impressa no terminal, pelo menos a única maneira simples de resolver isso é parando o aplicativo e começando novamente, programaticamente para fazer isso se torna um pouco complexo, como no meu caso eu tive que usar child_process. Enfim, já abri uma edição no antigo repo para falar sobre o assunto e quase ninguém respondeu, mas conversando com alguns desenvolvedores que usam Baileys, todo mundo passa por esse problema, inclusive investigando um pouco mais a fundo nas questões relacionadas a esse assunto esse problema é até um pouco antigo e pelo menos ninguém conseguiu resolver esse problema na raiz, nem mesmo o próprio Adi

tell me how you solved it, this problem is a headache.

tiagomatrixd avatar Sep 06 '23 05:09 tiagomatrixd

With this, started to receive the: recv messages and chats.update

tudonetwork avatar Nov 22 '23 10:11 tudonetwork