mautrix / whatsapp

A Matrix-WhatsApp puppeting bridge
https://maunium.net/go/mautrix-whatsapp
GNU Affero General Public License v3.0
1.29k stars 175 forks source link

Not receiving messages from new users #594

Closed chagai95 closed 1 year ago

chagai95 commented 1 year ago

I'm using a double puppeted account on a server which has the relay feature on.

Using v0.7.1 I was notified on Matrix when new users WhatsApp users wrote me a message, but using version v0.8.1 I am not getting notified for messages from new users.

Other weird things:

  1. The mark read is not bridged back to WhatsApp (this was not working well before but now it seems to not work at all)
  2. Messages sent from the (Android) WhatsApp client are not shown on the Matrix side (previously they were shown)
  3. Messages from the Matrix side did not get bridged at all for a day (rerunning the ansible playbook fixed this so this might not be relevant but nevertheless I thought I'd mention it) .
  4. I tried logging in and out to fix issue (3) and I logged in using the same linked device, after that I deleted the linked device completely and tried logging in again, which also did not fix issue (2) and probably not the main issue of not getting messages from new users but I can verify that only after a new user writes me (happens pretty often to me)

Here are some logs with a new number writing but not being handled:

Feb 04 08:44:38 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:38] [User/@corak81:tchncs.de/Client/Recv/DEBUG] <iq from="s.whatsapp.net" id="243.69-2789" t="1675496678" type="result"/>
Feb 04 08:44:38 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:38] [Matrix/DEBUG] Starting handling of transaction 4790679 (1 EDUs (unstable))
Feb 04 08:44:41 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:41] [Matrix/@mr:chagai.website/DEBUG] req #6005 (/v3/sync) completed in 30.006459223s with status 200 and 224 bytes of application/json body
Feb 04 08:44:41 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:41] [Puppet/491729652683@s.whatsapp.net/DEBUG] Skipping sync processing: custom user not connected to whatsapp
Feb 04 08:44:41 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:41] [Matrix/@mr:chagai.website/DEBUG] req #6007: GET http://matrix-nginx-proxy:12080/_matrix/client/v3/sync?filter=1&set_presence=offline&since=s3461518_27861446_4173_2275580_454127_1088_96668_14157406_1&timeout=30000
Feb 04 08:44:42 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:42] [User/@me:chagai.website/Client/Recv/DEBUG] <receipt from="41766524456@s.whatsapp.net" id="0862CE3FE55522997F00CBF4B9D44006" recipient="5215529666223@s.whatsapp.net" t="1675496682" type="read"/>
Feb 04 08:44:42 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:42] [User/@me:chagai.website/Client/Send/DEBUG] <ack class="receipt" id="0862CE3FE55522997F00CBF4B9D44006" recipient="5215529666223@s.whatsapp.net" to="41766524456@s.whatsapp.net" type="read"/>
Feb 04 08:44:42 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:42] [Database/User/DEBUG] Set last read timestamp of @me:chagai.website in 5215529666223@s.whatsapp.net-41766524456@s.whatsapp.net to 1675454222
Feb 04 08:44:42 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:42] [Matrix/@whatsapp_41766524456:chagai.website/DEBUG] req #6008: POST http://matrix-nginx-proxy:12080/_matrix/client/v3/rooms/%21gqThPPVXeWENoZGrFF:chagai.website/read_markers?user_id=%40whatsapp_41766524456%3Achagai.website {"m.read":"$_p6dRIG_8G85hSlzc0dSCu3ELUv-CJopBPmkt_1GuP8","m.fully_read":"$_p6dRIG_8G85hSlzc0dSCu3ELUv-CJopBPmkt_1GuP8","com.beeper.read.extra":{},"com.beeper.fully_read.extra":{}}
Feb 04 08:44:43 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:43] [Matrix/DEBUG] Starting handling of transaction 4790681 (1 EDUs (unstable))
Feb 04 08:44:43 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:43] [Matrix/DEBUG] Starting handling of transaction 4790682 (1 EDUs (unstable))
Feb 04 08:44:43 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:43] [Matrix/@whatsapp_41766524456:chagai.website/DEBUG] req #6008 (/v3/rooms/!gqThPPVXeWENoZGrFF:chagai.website/read_markers) completed in 689.98409ms with status 200 and 2 bytes of application/json body
Feb 04 08:44:43 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:43] [Portal/5215529666223@s.whatsapp.net-41766524456@s.whatsapp.net/DEBUG] Marked $_p6dRIG_8G85hSlzc0dSCu3ELUv-CJopBPmkt_1GuP8 as read by @whatsapp_41766524456:chagai.website
Feb 04 08:44:44 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:44] [User/@joscha:chagai.website/Client/Send/DEBUG] <iq id="104.59-2795" to="s.whatsapp.net" type="get" xmlns="w:p"><ping/></iq>
Feb 04 08:44:44 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:44] [User/@joscha:chagai.website/Client/Recv/DEBUG] <iq from="s.whatsapp.net" id="104.59-2795" t="1675496684" type="result"/>
Feb 04 08:44:46 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:46] [User/@bridge:chagai.website/Client/Send/DEBUG] <iq id="253.130-2817" to="s.whatsapp.net" type="get" xmlns="w:p"><ping/></iq>
Feb 04 08:44:46 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:46] [User/@bridge:chagai.website/Client/Recv/DEBUG] <iq from="s.whatsapp.net" id="253.130-2817" t="1675496686" type="result"/>
Feb 04 08:44:55 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:55] [User/@me:chagai.website/Client/Recv/DEBUG] <receipt from="41766524456@s.whatsapp.net" id="3ADDE233B0A8832B3B73" recipient="41794692416@s.whatsapp.net" t="1675496695" type="read"><list><item id="3A50207BB18FD3F370AD"/></list></receipt>
Feb 04 08:44:55 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:44:55] [User/@me:chagai.website/Client/Send/DEBUG] <ack class="receipt" id="3ADDE233B0A8832B3B73" recipient="41794692416@s.whatsapp.net" to="41766524456@s.whatsapp.net" type="read"/>
Feb 04 08:44:55 lo

Feb 04 08:48:11 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:11] [Matrix/@mr:chagai.website/DEBUG] req #6028: GET http://matrix-nginx-proxy:12080/_matrix/client/v3/sync?filter=1&set_presence=offline&since=s3461530_27861552_4175_2275601_454136_1088_96668_14157406_1&timeout=30000
Feb 04 08:48:14 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:14] [Matrix/DEBUG] Starting handling of transaction 4790734 (3 EDUs (unstable))
Feb 04 08:48:14 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:14] [Matrix/DEBUG] Starting handling of transaction 4790735 (1 EDUs (unstable))
Feb 04 08:48:15 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:15] [User/@344722243231krt:matrix.org/Client/Send/DEBUG] <iq id="47.154-2796" to="s.whatsapp.net" type="get" xmlns="w:p"><ping/></iq>
Feb 04 08:48:15 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:15] [User/@344722243231krt:matrix.org/Client/Recv/DEBUG] <iq from="s.whatsapp.net" id="47.154-2796" t="1675496895" type="result"/>
Feb 04 08:48:20 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:20] [User/@corak81:tchncs.de/Client/Send/DEBUG] <iq id="243.69-2798" to="s.whatsapp.net" type="get" xmlns="w:p"><ping/></iq>
Feb 04 08:48:20 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:20] [User/@corak81:tchncs.de/Client/Recv/DEBUG] <iq from="s.whatsapp.net" id="243.69-2798" t="1675496900" type="result"/>
Feb 04 08:48:21 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:21] [User/@me:chagai.website/Client/Recv/DEBUG] <message from="41766524456@s.whatsapp.net" id="FB482A58C052B45695B61AD08D819F05" notify="Chagai Friedlander" recipient="5215529666223@s.whatsapp.net" t="1675496901" type="text" verified_level="unknown" verified_name="4652848884582185163"><enc type="msg" v="2"><!-- 275 bytes --></enc><verified_name v="1" verified_level="unknown">0a2608cbf1dff889ad8fc9401206736d623a77
Feb 04 08:48:21 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:21] [User/@me:chagai.website/Client/DEBUG] Decrypting 2 messages from 41766524456@s.whatsapp.net in 5215529666223@s.whatsapp.net
Feb 04 08:48:21 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:21] [User/@me:chagai.website/Client/Send/DEBUG] <ack class="message" id="FB482A58C052B45695B61AD08D819F05" recipient="5215529666223@s.whatsapp.net" to="41766524456@s.whatsapp.net"/>
Feb 04 08:48:21 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:21] [User/@me:chagai.website/Client/Send/DEBUG] <receipt id="FB482A58C052B45695B61AD08D819F05" recipient="41766524456@s.whatsapp.net" to="5215529666223@s.whatsapp.net" type="sender"/>
Feb 04 08:48:21 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:21] [Portal/5215529666223@s.whatsapp.net-41766524456@s.whatsapp.net/DEBUG] Not handling FB482A58C052B45695B61AD08D819F05 (text): user doesn't have double puppeting enabled
Feb 04 08:48:21 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:21] [User/@me:chagai.website/Client/Recv/DEBUG] <receipt from="5215529666223@s.whatsapp.net" id="FB482A58C052B45695B61AD08D819F05" t="1675496901"/>
Feb 04 08:48:21 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:21] [User/@me:chagai.website/Client/Send/DEBUG] <ack class="receipt" id="FB482A58C052B45695B61AD08D819F05" to="5215529666223@s.whatsapp.net"/>
Feb 04 08:48:29 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:29] [User/@me:chagai.website/Client/Recv/DEBUG] <message from="41766524456@s.whatsapp.net" id="5DE1DC00D3F950A35AA872A641131CDD" notify="Chagai Friedlander" recipient="5215529666223@s.whatsapp.net" t="1675496908" type="text" verified_level="unknown" verified_name="4652848884582185163"><enc type="msg" v="2"><!-- 211 bytes --></enc><verified_name v="1" verified_level="unknown">0a2608cbf1dff889ad8fc9401206736d623a77
Feb 04 08:48:29 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:29] [User/@me:chagai.website/Client/DEBUG] Decrypting 2 messages from 41766524456@s.whatsapp.net in 5215529666223@s.whatsapp.net
Feb 04 08:48:29 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:29] [User/@me:chagai.website/Client/Send/DEBUG] <ack class="message" id="5DE1DC00D3F950A35AA872A641131CDD" recipient="5215529666223@s.whatsapp.net" to="41766524456@s.whatsapp.net"/>
Feb 04 08:48:29 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:29] [User/@me:chagai.website/Client/Send/DEBUG] <receipt id="5DE1DC00D3F950A35AA872A641131CDD" recipient="41766524456@s.whatsapp.net" to="5215529666223@s.whatsapp.net" type="sender"/>
Feb 04 08:48:29 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:29] [Portal/5215529666223@s.whatsapp.net-41766524456@s.whatsapp.net/DEBUG] Not handling 5DE1DC00D3F950A35AA872A641131CDD (text): user doesn't have double puppeting enabled
Feb 04 08:48:29 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:29] [User/@me:chagai.website/Client/Recv/DEBUG] <receipt from="5215529666223@s.whatsapp.net" id="5DE1DC00D3F950A35AA872A641131CDD" t="1675496909"/>
Feb 04 08:48:29 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:29] [User/@me:chagai.website/Client/Send/DEBUG] <ack class="receipt" id="5DE1DC00D3F950A35AA872A641131CDD" to="5215529666223@s.whatsapp.net"/>
Feb 04 08:48:29 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:29] [Matrix/@bridge:chagai.website/DEBUG] req #6026 (/v3/sync) completed in 30.008809913s with status 200 and 224 bytes of application/json body
Feb 04 08:48:29 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:29] [Matrix/@bridge:chagai.website/DEBUG] req #6029: GET http://matrix-nginx-proxy:12080/_matrix/client/v3/sync?filter=4&set_presence=offline&since=s3461531_27861553_4175_2275601_454136_1088_96668_14157406_1&timeout=30000
Feb 04 08:48:30 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:30] [User/@bridge:chagai.website/Client/Send/DEBUG] <iq id="253.130-2826" to="s.whatsapp.net" type="get" xmlns="w:p"><ping/></iq>
Feb 04 08:48:30 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:30] [User/@bridge:chagai.website/Client/Recv/DEBUG] <iq from="s.whatsapp.net" id="253.130-2826" t="1675496910" type="result"/>
Feb 04 08:48:32 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:32] [User/@joscha:chagai.website/Client/Send/DEBUG] <iq id="104.59-2804" to="s.whatsapp.net" type="get" xmlns="w:p"><ping/></iq>
Feb 04 08:48:32 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:32] [User/@joscha:chagai.website/Client/Recv/DEBUG] <iq from="s.whatsapp.net" id="104.59-2804" t="1675496912" type="result"/>
Feb 04 08:48:32 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:32] [User/@me:chagai.website/Client/Send/DEBUG] <iq id="115.224-3913" to="s.whatsapp.net" type="get" xmlns="w:p"><ping/></iq>
Feb 04 08:48:32 localhost.localdomain matrix-mautrix-whatsapp[11084]: [Feb  4, 2023 07:48:32] [User/@me:chagai.website/Client/Recv/DEBUG] <iq from="s.whatsapp.net" id="115.224-3913" t="1675496912" type="result"/>
F
chagai95 commented 1 year ago

Just got a new message and I was notified on the Matrix side, but I'm still facing the other weird things...

chagai95 commented 1 year ago

Now I got a message that I sent from the WhatsApp side as a message from the bridged user instead of from my main double puppeted user... @whatsapp_41766524456:chagai.website

chagai95 commented 1 year ago

I logged in again using 'login-matrix' and an access token and it seems to have solved all the weirdness that was left. I'm gonna close this for now