tomer8007 / whatsapp-web-incognito

A Chrome extension that disables read receipts and presence updates on WhatsApp Web
MIT License
312 stars 74 forks source link

Error when sending messages #124

Closed eduardokabello closed 3 months ago

eduardokabello commented 1 year ago

It's been a week since my whatsapp web started showing an error when sending a message.

When I open WhatsApp Web, it works normally for the first few messages (between 1 and 5 messages), after that it gives an error, as shown in the image.

waincognito

The message shown in the image is in Portuguese, and the translation is "An error has occurred. Click to learn more."

If I reload the page it works for the first few messages again, but the error returns again.

When I disable the plugin, WhatsApp Web works normally, without errors.

I installed the plugin on another computer, with a clean install of Chrome, without any other plugins, and the error also happens.

The version of WhatsApp Web I'm using is 2.2319.9

Has anyone had this error?

tomer8007 commented 1 year ago

Hi, Thank you for opening an issue for this.

I would guess that this error could be related to the message interception functionality of the extension, but I'll need some red javascript errors to be sure. Can you provide these?

The last time I tried I had no problem sending tens of messages.

eduardokabello commented 1 year ago

interception

injected

tomer8007 commented 1 year ago

Anything that appears before the MD send failure?

eduardokabello commented 1 year ago

Here it's the sequence of console messages.

https://pastebin.com/sGQ01mE5

tomer8007 commented 1 year ago

@eduardokabello I don't see MD send failure in these logs. Are you sure these logs are written when you try to send a message without success?

eduardokabello commented 1 year ago

@tomer8007 I certainly forgot to copy this part. I made the sequence again:

https://pastebin.com/xN8CACwF

tomer8007 commented 1 year ago

According to the error interception.js:677 [WhatsApp][3] -- sendMsgRecord: MD send failure It looks like something was messed up in the message interception flow. Can you please

  1. Tell me what version of WhatsApp Web are you using? I'm using 2.2321.6.
  2. Try to type into the console
    WAdebugMode = true;
    WAPassthroughWithDebug = true;

    and look at the logs again?

eduardokabello commented 1 year ago

I'm also using WhatsApp Web version v2.23.21.6 and Google Chrome v113.0.5672.127

After looping error, I typed WAdebugMode = true; and WAPassthroughWithDebug = true; and the result was:

https://pastebin.com/Y18JYDR1

And the looping error continues.

By the way, I installed WAIncognito 2.0.5 in the Edge browser v113.0.1774.50 and got the same error from Google Chrome

tomer8007 commented 1 year ago

I don't see any indication to the message send failure in your logs. I need you to WAdebugMode = true; WAPassthroughWithDebug = true; and then trigger the error by trying to send a message without success. Also in debug mode I expect to see more messages.

eduardokabello commented 1 year ago

Coincidence or not, after I enabled WAdebugMode = true; WAPassthroughWithDebug = true; before start send any message, I'm using WhatsApp at least for 1 hour without error. Anyway, I'll keep an eye

tomer8007 commented 1 year ago

I think it's not a coincidence because WAPassthroughWithDebug disables some part of the interception. So if you could only WAdebugMode = true and restore the error, this would be good.

eduardokabello commented 1 year ago

I started WhatsApp, put only WAdebugMode = true and the error come back

https://pastebin.com/crENP5KQ

tomer8007 commented 1 year ago

Uhh It's hard for me to debug it this way. I would expect more [Out] debug information before the MD send failure line. Perhaps there is something that you do that triggers this error that I don't. Can you describe exactly how to reproduce this or try it on another WhatsApp account?

eduardokabello commented 1 year ago

Step by step action:

I installed a clean Edge browser and installed WAIncognito.

I opened a WhatsApp Web tab and I connected with a new WhatsApp account

I opened a console and put WAdebugMode = true;

I navigated in some messages and send some messages and leave browser opened and checking sometimes console messages.

In one moment, the looping error started without send any messages, and then, I tried to send a message and error happening again.

https://pastebin.com/05iq21c4

tomer8007 commented 1 year ago

Can you send at least one message successfully? I would expect to see something like [Out] Sending binary with tag '' (152 bytes, decrypted): interception.js:534 <message id=​"3EB02714E3239A94137127" to=​"...@g.us" phash=​"2:​..." type=​"text">​…​</message>​ but I don't see it in your logs.

I think that for some reason the sockets are getting closed in your end because something was screwed in the interception previously, but at my end it looks fine. Thanks again for reporting the issue though.

eduardokabello commented 1 year ago

Yes, I can send some messages successfully before error

Something like this?

idmessage

See complete console capture: https://pastebin.com/W6kj8mDT

tomer8007 commented 1 year ago

According to the error

vendor.js?v=4.8.7.5:1 Uncaught TypeError: Promise resolver undefined is not a function
    at new Promise (<anonymous>)
    at Pe.window.<computed>.ChatState.sendChatStateComposing (vendor.js?v=4.8.7.5:1:122989)

from your logs, it looks like the version that's running on my end is different than yours (it doesn't use new Promise):

image Can you tell me again what version are you using or try to use Chrome instead of Edge?

eduardokabello commented 1 year ago

Chrome v114.0.5735.91 Edge v113.0.1774.57 WhatsApp Web v2.2322.15

tomer8007 commented 1 year ago

Now I'm using WhatsApp version 2.2323.4. But do you have the same problem in Chrome or only Edge?

eduardokabello commented 1 year ago

The same error in both browser, Chrome and Edge

tomer8007 commented 1 year ago

Still trying to reproduce this without success. EDIT: Is there a chance this problem happens only for groups?

eduardokabello commented 1 year ago

Still trying to reproduce this without success. EDIT: Is there a chance this problem happens only for groups?

No, the problem happens with person to person messages

ranggasan commented 1 year ago

Is there any solution about this issue? Because I'm experiencing the same problem, unable to send messages after some times and need to reload the page to resend them

ss.jpg

tomer8007 commented 1 year ago

I was able to reproduce this on my side only when sending messages to a group with a large number of participants. I suspect that this is caused by the same underlying reason as #127. Hopefully I could solve this one by solving #127 the next time I encounter it.

ranggasan commented 1 year ago

I was able to reproduce this on my side only when sending messages to a group with a large number of participants. I suspect that this is caused by the same underlying reason as #127. Hopefully I could solve this one by solving #127 the next time I encounter it.

For your additional information, it also happens in personal chat, like in the screenshot I attach above

tomer8007 commented 11 months ago

@ranggasan @eduardokabello Can you please tell me if version 2.0.6 seems to change anything?

ranggasan commented 11 months ago

@ranggasan @eduardokabello Can you please tell me if version 2.0.6 seems to change anything?

Unfortunately, the problem still persist

wa.jpg

ranggasan commented 11 months ago

I'm enabling wa web plus side by side with wa incognito, I think it's the cause of the issue. When I disable wa web plus, I found no issue.

I'm using wa web plus because I need its feature like blur messages and lock the screen. It would be nice if wa incognito has this features as well

tomer8007 commented 11 months ago

@ranggasan All I can see is that when I send messages to groups with a large number of participants, it initially shows the message as pending, and when I refresh the page, it shows the red warning sign like in your screenshot (even though the message was sent). So I suspect either this does not relate to WA Web Plus, or it is related and the problem I'm seeing is a different one.

Interesting finding though, I will test with WA Web Plus. @eduardokabello Are you using WA Web Plus?

eduardokabello commented 11 months ago

Unfortunately, the problem still persists here also.

Yes, I use WA Web Plus here too. I thought the issue was the WA Web Plus extension, but when I made a test with clean installation on Edge, the only extension installed was WAIncognito and the same error occurred.

tomer8007 commented 6 months ago

@eduardokabello @ranggasan Still happens in version 2.1.2?

eduardokabello commented 6 months ago

@eduardokabello @ranggasan Still happens in version 2.1.2?

Yes, still happens, but I found a way to partially work. Disabling “Don't send read confirmation” option. In this way, I don't get error anymore, but unfortunately I lose this function.

ranggasan commented 6 months ago

@eduardokabello @ranggasan Still happens in version 2.1.2?

Everything is working fine, I'm enabling all features in WA Web Incognito. And only enabling blur messages and lock screen in WA Web Plus

wa

If I enable, hide typing/hide recording/hide online/restore deleted messages, it conflict with WA Web Incognito and problem persist

tomer8007 commented 5 months ago

@ranggasan @eduardokabello I did some refactoring to the message interception flow in version 2.1.3, changed the message restore feature, removed old code and added more sanity checks. Does this by chance fix the problem?

eduardokabello commented 5 months ago

@ranggasan @eduardokabello I did some refactoring to the message interception flow in version 2.1.3, changed the message restore feature, removed old code and added more sanity checks. Does this by chance fix the problem?

Unfortunately, the error still persists. To work, the option “Don't send read confirmation” needs to be disabled.

ranggasan commented 5 months ago

@ranggasan @eduardokabello I did some refactoring to the message interception flow in version 2.1.3, changed the message restore feature, removed old code and added more sanity checks. Does this by chance fix the problem?

Everything is working fine so far

eduardokabello commented 5 months ago

@ranggasan @eduardokabello I did some refactoring to the message interception flow in version 2.1.3, changed the message restore feature, removed old code and added more sanity checks. Does this by chance fix the problem?

Everything is working fine so far

Even if you enable "hide typing/hide recording/hide online/restore deleted messages" options?

ranggasan commented 5 months ago

@ranggasan @eduardokabello I did some refactoring to the message interception flow in version 2.1.3, changed the message restore feature, removed old code and added more sanity checks. Does this by chance fix the problem?

Everything is working fine so far

Even if you enable "hide typing/hide recording/hide online/restore deleted messages" options?

I disabled those features because WA Web Incognito has them. I install WA Web Plus only to blur messages, lock screen and chat folder

tomer8007 commented 4 months ago

@eduardokabello @ranggasan I was able to reproduce the problem deterministically in cases where a message is sent together with a read receipt. I fixed the problem at least in these cases in 856da2f9dd97fac2dee3c91367dcf7bd0d8626d7. Please let me know if it fixes the problem for you.

eduardokabello commented 3 months ago

@eduardokabello @ranggasan I was able to reproduce the problem deterministically in cases where a message is sent together with a read receipt. I fixed the problem at least in these cases in 856da2f. Please let me know if it fixes the problem for you.

Unfortunately, this error persists and about a week for now, another error started to happening (look at the image).

wa error

I am using WhatsApp Web v2.3000.1012212426 and Chrome v123.0.6312.59

tomer8007 commented 3 months ago

@eduardokabello This is another issue #159 .

tomer8007 commented 3 months ago

@eduardokabello @ranggasan What about the error when sending messages? still happening?

ranggasan commented 3 months ago

@eduardokabello @ranggasan What about the error when sending messages? still happening?

Nope, I guess you can close this issue.

But another issue arise, when I clicked mark as read, the button is greyed out and the modal dialog doesn't disappear, so I need to refresh the page. I think it's related to issue #159

inco

tomer8007 commented 3 months ago

@ranggasan OK, closing this issue.

But the warning shows up fine for me in version 2.3000, not sure why it doesn't for you. Maybe open a separate issue for this.

image