telegram icon indicating copy to clipboard operation
telegram copied to clipboard

Bridge and user are being kicked

Open hooger opened this issue 3 years ago • 33 comments

Hello all, I setup the telegram bridge a couple of weeks back and it was working fine, I was chatting on it with a friend. I checked the bridge after about a week and ping said that "You were logged in, but there appears to have been an error". When I login I get the link in the bridge (via matrix), click on the link, fill in my phone number and get the SMS. After typing, the bridge says that login was successful. However, it does not take long. After a couple of minutes I got kicked, just like the account on my android VM. I have no phone, that is why I had to setup an Android VM. The VM is created based on this: https://docs.mau.fi/bridges/go/whatsapp/android-vm-setup.html The used android image is "system-images;android-28;google_apis_playstore;x86" What I see in the logs:

Jan 08 15:32:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:39,396] [[email protected]] Assigned msg_id = 7050858656773658996 to GetContactsRequest (7f8fe2611a00)                             
Jan 08 15:32:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:39,396] [[email protected]] Encrypting 1 message(s) in 28 bytes for sending                                                           
Jan 08 15:32:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:39,397] [[email protected]] Encrypted messages put in a queue to be sent                                                              
Jan 08 15:32:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:39,397] [[email protected]] Waiting for messages to send...                                                                           
Jan 08 15:32:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:39,397] [[email protected]] Assigned msg_id = 7050858656779619464 to MsgsAck (7f8fb6dc3910)                                        
Jan 08 15:32:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:39,398] [[email protected]] Encrypting 1 message(s) in 36 bytes for sending                                                           
Jan 08 15:32:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:39,398] [[email protected]] Encrypted messages put in a queue to be sent                                                              
Jan 08 15:32:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:39,399] [[email protected]] Waiting for messages to send...                                                                           
Jan 08 15:32:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:39,454] [[email protected]] Handling RPC result for message 7050858656773658996                                                       
Jan 08 15:32:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:39,457] [[email protected]] Receiving items from the network...                                                                       
Jan 08 15:32:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:39,476] [[email protected].@gergely:horvath.club] Updating contacts of @gergely:horvath.club...                                                                        
Jan 08 15:32:40 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:40,066] [[email protected]] Assigned msg_id = 7050858659748965152 to UpdateStatusRequest (7f8fb6d3e9d0)                            
Jan 08 15:32:40 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:40,067] [[email protected]] Encrypting 1 message(s) in 24 bytes for sending                                                           
Jan 08 15:32:40 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:40,068] [[email protected]] Encrypted messages put in a queue to be sent                                                              
Jan 08 15:32:40 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:40,069] [[email protected]] Waiting for messages to send...                                                                           
Jan 08 15:32:40 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:40,069] [[email protected]] Assigned msg_id = 7050858659761168368 to MsgsAck (7f8fb70288b0)                                        
Jan 08 15:32:40 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:40,069] [[email protected]] Encrypting 1 message(s) in 36 bytes for sending                                                           
Jan 08 15:32:40 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:40,070] [[email protected]] Encrypted messages put in a queue to be sent                                                              
Jan 08 15:32:40 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:40,070] [[email protected]] Waiting for messages to send...                                                                          
Jan 08 15:32:40 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:40,119] [[email protected]] Handling RPC result for message 7050858659748965152                                                      
Jan 08 15:32:40 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:32:40,119] [[email protected]] Receiving items from the network...                                                                      
Jan 08 15:33:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:25,063] [[email protected]] Assigned msg_id = 7050858853011245840 to PingRequest (7f8fb6d8f460)                                   
Jan 08 15:33:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:25,064] [[email protected]] Encrypting 1 message(s) in 28 bytes for sending                                                          
Jan 08 15:33:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:25,064] [[email protected]] Encrypted messages put in a queue to be sent                                                             
Jan 08 15:33:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:25,065] [[email protected]] Waiting for messages to send...                                                                          
Jan 08 15:33:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:25,065] [[email protected]] Assigned msg_id = 7050858853018574824 to MsgsAck (7f8fb6daaf10)                                       
Jan 08 15:33:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:25,065] [[email protected]] Encrypting 1 message(s) in 36 bytes for sending                                                          
Jan 08 15:33:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:25,067] [[email protected]] Encrypted messages put in a queue to be sent                                                             
Jan 08 15:33:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:25,067] [[email protected]] Waiting for messages to send...
Jan 08 15:33:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:25,100] [[email protected]] Handling pong for message 7050858853011245840
Jan 08 15:33:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:25,101] [[email protected]] Receiving items from the network...
Jan 08 15:33:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:50,462] [[email protected]] Assigned msg_id = 7050858961980450440 to UpdateStatusRequest (7f8fb701fb50)
Jan 08 15:33:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:50,462] [[email protected]] Encrypting 1 message(s) in 24 bytes for sending
Jan 08 15:33:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:50,464] [[email protected]] Encrypted messages put in a queue to be sent
Jan 08 15:33:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:50,465] [[email protected]] Waiting for messages to send...
Jan 08 15:33:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:50,465] [[email protected]] Assigned msg_id = 7050858961993305968 to MsgsAck (7f8fb701f6a0)                              [397/1898]
Jan 08 15:33:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:50,465] [[email protected]] Encrypting 1 message(s) in 36 bytes for sending
Jan 08 15:33:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:50,466] [[email protected]] Encrypted messages put in a queue to be sent
Jan 08 15:33:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:50,466] [[email protected]] Waiting for messages to send...
Jan 08 15:33:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:50,700] [[email protected]] Handling RPC result for message 7050858961980450440
Jan 08 15:33:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:33:50,700] [[email protected]] Receiving items from the network...
Jan 08 15:34:17 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:17,946] [[email protected]] Handling update UpdatesTooLong
Jan 08 15:34:17 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:17,947] [[email protected]] Receiving items from the network...
Jan 08 15:34:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:25,070] [[email protected]] Assigned msg_id = 7050859110735787160 to PingRequest (7f8fb6d3ecd0)
Jan 08 15:34:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:25,070] [[email protected]] Encrypting 1 message(s) in 28 bytes for sending
Jan 08 15:34:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:25,071] [[email protected]] Encrypted messages put in a queue to be sent
Jan 08 15:34:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:25,071] [[email protected]] Waiting for messages to send...
Jan 08 15:34:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:25,072] [[email protected]] Assigned msg_id = 7050859110743376500 to MsgsAck (7f8fb6daad00)
Jan 08 15:34:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:25,072] [[email protected]] Encrypting 1 message(s) in 44 bytes for sending
Jan 08 15:34:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:25,073] [[email protected]] Encrypted messages put in a queue to be sent
Jan 08 15:34:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:25,074] [[email protected]] Waiting for messages to send...
Jan 08 15:34:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:25,107] [[email protected]] Handling pong for message 7050859110735787160
Jan 08 15:34:25 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:25,108] [[email protected]] Receiving items from the network...
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,732] [[email protected]] Assigned msg_id = 7050859173515228788 to UpdateStatusRequest (7f8fb6d8f130)
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,733] [[email protected]] Encrypting 1 message(s) in 24 bytes for sending
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,733] [[email protected]] Encrypted messages put in a queue to be sent
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,733] [[email protected]] Waiting for messages to send...
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,734] [[email protected]] Assigned msg_id = 7050859173521376172 to MsgsAck (7f8fb6dc3d30)
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,734] [[email protected]] Encrypting 1 message(s) in 36 bytes for sending
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,735] [[email protected]] Encrypted messages put in a queue to be sent
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,735] [[email protected]] Waiting for messages to send...
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,781] [[email protected]] Handling RPC result for message 7050859173515228788
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,781] [[email protected]] Receiving items from the network...
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,781] [[email protected]] Assigned msg_id = 7050859173712133924 to MsgsAck (7f8fb6d8f5e0)
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,782] [[email protected]] Encrypting 1 message(s) in 36 bytes for sending
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,782] [[email protected]] Encrypted messages put in a queue to be sent
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,782] [[email protected]] Waiting for messages to send...
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,783] [[email protected]] Assigned msg_id = 7050859173717268508 to MsgsAck (7f8fb6d3ecd0)
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,783] [[email protected]] Encrypting 1 message(s) in 36 bytes for sending
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:34:39,783] [[email protected]] Error handling manually received Matrix event
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: Traceback (most recent call last):
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/mautrix/bridge/matrix.py", line 434, in try_handle_sync_event
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:     await self.handle_ephemeral_event(evt)
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/mautrix_telegram/matrix.py", line 359, in handle_ephemeral_event
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:     await self.handle_presence(evt.sender, evt.content.presence)
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/mautrix_telegram/matrix.py", line 320, in handle_presence
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:     await user.set_presence(presence == PresenceState.ONLINE)
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/mautrix_telegram/user.py", line 340, in set_presence
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:     await self.client(UpdateStatusRequest(offline=not online))
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 30, in __call__
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:     return await self._call(self._sender, request, ordered=ordered)
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 84, in _call
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]:     result = await future
Jan 08 15:34:39 matrix matrix-mautrix-telegram[9628]: telethon.errors.rpcerrorlist.SessionRevokedError: The authorization has been invalidated, because of the user terminating all sessions (caused by UpdateStatusRequest)

and than it repeats itself until I send ping. Around the ping these are in the log:

Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]: Traceback (most recent call last):
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/mautrix/bridge/matrix.py", line 434, in try_handle_sync_event                                                                               
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:     await self.handle_ephemeral_event(evt)
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/mautrix_telegram/matrix.py", line 359, in handle_ephemeral_event                                                                            
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:     await self.handle_presence(evt.sender, evt.content.presence)                                                                                                                     
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/mautrix_telegram/matrix.py", line 320, in handle_presence                                                                                   
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:     await user.set_presence(presence == PresenceState.ONLINE)
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/mautrix_telegram/user.py", line 340, in set_presence                                                                                        
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:     await self.client(UpdateStatusRequest(offline=not online))
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 30, in __call__                                                                                             
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:     return await self._call(self._sender, request, ordered=ordered)                                                                                                                  
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:   File "/usr/lib/python3.9/site-packages/telethon/client/users.py", line 84, in _call                                                                                                
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]:     result = await future
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]: telethon.errors.rpcerrorlist.SessionRevokedError: The authorization has been invalidated, because of the user terminating all sessions (caused by UpdateStatusRequest)               
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:39,658] [[email protected]] Encrypted messages put in a queue to be sent                                                             
Jan 08 15:42:39 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:39,659] [[email protected]] Waiting for messages to send...                                                                          
Jan 08 15:42:48 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:48,989] [[email protected]] 172.18.0.9 [08/Jan/2022:15:42:48 +0000] "PUT /transactions/423?access_token=<TOKEN> HTTP/1.1" 200 158 "-" "Synapse/1.49.2"
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,480] [[email protected]] 172.18.0.9 [08/Jan/2022:15:42:49 +0000] "PUT /transactions/424?access_token=<TOKEN> HTTP/1.1" 200 158 "-" "Synapse/1.49.2"
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,899] [[email protected]] 172.18.0.9 [08/Jan/2022:15:42:49 +0000] "PUT /transactions/425?access_token=<TOKEN> HTTP/1.1" 200 158 "-" "Synapse/1.49.2"
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,899] [[email protected]] Received Matrix event $WcPVlVK4Po-ZHOZge0puJUDhRetzsH-OxdanY5o7UTY from @gergely:horvath.club in !sRODJuldQsoMjUfACu:horvath.club           
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,935] [[email protected]] Assigned msg_id = 7050861278861974672 to GetUsersRequest (7f8fb6d8fa30)                               
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,936] [[email protected]] Encrypting 1 message(s) in 32 bytes for sending                                                          
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,936] [[email protected]] Encrypted messages put in a queue to be sent                                                             
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,936] [[email protected]] Waiting for messages to send...                                                                          
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,977] [[email protected]] Handling RPC result for message 7050861278861974672                                                      
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,978] [[email protected]] Receiving items from the network...                                                                      
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,978] [[email protected]] Assigned msg_id = 7050861279032160716 to MsgsAck (7f8fb6daae20)                                       
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,978] [[email protected]] Encrypting 1 message(s) in 36 bytes for sending                                                          
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,978] [[email protected]] Encrypted messages put in a queue to be sent                                                             
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,978] [[email protected]] Waiting for messages to send...                                                                          
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,979] [[email protected]] Assigned msg_id = 7050861279034821464 to MsgsAck (7f8fb6d27970)                                       
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,979] [[email protected]] Encrypting 1 message(s) in 36 bytes for sending                                                          
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,979] [[email protected].@gergely:horvath.club] Authorization error in get_me(): The authorization has been invalidated, because of the user terminating all sessions (caused by GetUsersRequest)
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,979] [[email protected]] Disconnecting from 149.154.167.91:443/TcpFull...                                                          
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,979] [[email protected]] Closing current connection...                                                                            
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,980] [[email protected]] Cancelling 0 pending message(s)...                                                                       
Jan 08 15:42:49 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:49,981] [[email protected]] Disconnection from 149.154.167.91:443/TcpFull complete!                                                   
Jan 08 15:42:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:50,229] [[email protected]] 172.18.0.9 [08/Jan/2022:15:42:50 +0000] "PUT /transactions/426?access_token=<TOKEN> HTTP/1.1" 200 158 "-" "Synapse/1.49.2"
Jan 08 15:42:50 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:50,265] [[email protected]] 172.18.0.9 [08/Jan/2022:15:42:50 +0000] "PUT /transactions/427?access_token=<TOKEN> HTTP/1.1" 200 158 "-" "Synapse/1.49.2"
Jan 08 15:42:51 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:42:51,020] [[email protected]] 172.18.0.9 [08/Jan/2022:15:42:51 +0000] "PUT /transactions/428?access_token=<TOKEN> HTTP/1.1" 200 158 "-" "Synapse/1.49.2"
Jan 08 15:46:08 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:46:08,117] [[email protected]] 172.18.0.9 [08/Jan/2022:15:46:08 +0000] "PUT /transactions/429?access_token=<TOKEN> HTTP/1.1" 200 158 "-" "Synapse/1.49.2"
Jan 08 15:46:08 matrix matrix-mautrix-telegram[9628]: [2022-01-08 15:46:08,336] [[email protected]] 172.18.0.9 [08/Jan/2022:15:46:08 +0000] "PUT /transactions/430?access_token=<TOKEN> HTTP/1.1" 200 158 "-" "Synapse/1.49.2"

Any idea what can be the problem? Any help/hint is appreciated!

hooger avatar Jan 08 '22 15:01 hooger

Same problem, the telegram app(phone), sign out completely by itself and the bridge Lost, after 10-15 seconds since bridge connected

smith2462 avatar Jan 12 '22 00:01 smith2462

I added two-factor auth, same thing happened. These logs seems like some message is stuck, is it correct?

Encrypting 1 message(s) in 36 bytes for sending
Encrypted messages put in a queue to be sent
Waiting for messages to send...

hooger avatar Jan 18 '22 19:01 hooger

I also have this issue but only on one of my 2 accounts. This also resulted in me getting a temporary restriction on my number. I'm currently waiting for that to lift, but it's a bit of a strange problem. I likely was signed out by Telegram quite some time ago without noticing but recently wanted to get back and hit by the sign-out.

dsonck92 avatar Jan 20 '22 13:01 dsonck92

Actually I don't really have any traffic on my account. I try to up it a bit from the VM by joining a group (pinephone, bad idea with its 1600 users...), and maybe sending some random stuff to another user. See what happens.

hooger avatar Jan 20 '22 13:01 hooger

Having the same issue. All devices attached to the Telegram account are logged out. This does not happen when authenticating with a bot API key. Maybe Telegram is clamping down on bots using human accounts.

daniel-mcdonough avatar Feb 08 '22 22:02 daniel-mcdonough

Happening to me as well. Given that my phone and the bridge VM are in different locations and on different continents, I'm wondering if there's some geolock that now happens when multiple accounts log in for the same person but from drastically different locations?

@Daniel-McDonough, you say this doesn't happen with a bot token? Just to confirm, you're using the relay bot mechanism? I.e. https://docs.mau.fi/bridges/python/telegram/relay-bot.html? I'm fairly new to Telegram, but I'm guessing that wouldn't let me chat as myself, only as the bot?

Thanks.

ndarilek avatar Feb 09 '22 11:02 ndarilek

@ndarilek Correct. This does not happen when using a bot token. You chat as the bot but I'm pretty sure there is a config that allows the bot to prefix the message with your user. The bot cannot subscribe to a public channel, though, unless there is something I missed.

daniel-mcdonough avatar Feb 10 '22 00:02 daniel-mcdonough

I'll also add that, I did manage to get a bit of messages from my 2nd telegram account before discovering that it again logged out everything. It's kinda interesting how only one of my accounts is affected. I have two Telegram accounts. My main one, which receives casual talk with some family members remains totally unaffected. However, my other telegram account for other kinds of communities is hitting the issue.

One thing that just popped up in my head, I do know my 2nd account is member of a channel, whereas my main one isn't. Perhaps it's not properly handling the new changes to channels.

I might try leaving that channel (as it's actually not useful for me anyways) and see if this eliminates the issue.

dsonck92 avatar Feb 10 '22 00:02 dsonck92

Interesting. I'll add another data point: my account is brand new and is only subscribed to a single channel--no contacts or anything else. I'll leave the channel and try logging in again tomorrow.

ndarilek avatar Feb 10 '22 00:02 ndarilek

I'll also add that, I did manage to get a bit of messages from my 2nd telegram account before discovering that it again logged out everything.

Same thing happened to me. I have maybe 2-5 minutes of messages being pulled before the deauth.

I wonder why this is not occurring with another client like Nekox.

daniel-mcdonough avatar Feb 10 '22 01:02 daniel-mcdonough

I'm also wondering why it's not occurring with another account using the exact same bridge version and mostly same configuration. Leaving the channels didn't change much, I still got logged out pretty fast.

dsonck92 avatar Feb 10 '22 01:02 dsonck92

I also experience the same, when my account was only participating in a 1on1 chat it was kicked, and later when I tested to join a channel with 1600 user, it also was kicked in about 1-5 minutes once this issue started to occur.

My account was kind of dead for about 3 years when I reactivated it to use it with the bridge. Directly after reactivation, in about 30minutes (definitely outside of the 1-5 minute margin) a friend reached out, like "hi, u using Telegram, how cool" and we chated on and off for a couple hours. Everything seemed shiny, and I checked back in a week, and the issue started. So my Telegram account hasn't seen too much of an activity, but still it shouldn't be that strict. :D

Also: IP address of the bridge is from the same country as the client VM. I also tested if the VM from my computer with the official telegram client gets banned, but it didn't happened if I wasn't using the bridge.

hooger avatar Feb 10 '22 07:02 hooger

Hi ! I got the same problems when I try to login to my Telegram account. It just work ~ 10-20 sec and it disconnect all my Telegram session for all my devices. I try to use a bot-relay, but I don't understand how it work :/ I managed to creat a bot with botfather, to connect it to the bridge with the bot_token, the command "ping-bot" show me my bot id, but I don't understand how to tchat with my Telegrams contacts... If someone can help me to use the bridge, or if someone can fix this disconnect problem, It would be amazing ! ;)

SpiderOnTheNet avatar Feb 14 '22 02:02 SpiderOnTheNet

I have also been having this issue, with the app local to the server (eg same IP address) or with my phone on mobile data (different IP address).

Signout happens pretty fast after activating the bridge.

Cerothen avatar Mar 01 '22 13:03 Cerothen

I too am hit by this particular behavior. I'm running my bridge on a VPS in DigitalOcean. Is everyone else using a public VPS provider?

thefirstofthe300 avatar Mar 12 '22 18:03 thefirstofthe300

I run it in an LXC container locally on my proxmox server

Cerothen avatar Mar 12 '22 19:03 Cerothen

I have my own server in a server house. No VPS provider

hooger avatar Mar 14 '22 15:03 hooger

Same problem here.

I've tried VPS on DO and EMS servers, got the same result. Sometimes the error occurs after bridge trying to "Updating contacts of" and I didn't sync contacts in the official app so maybe it could be somehow related to the problem

pashutk avatar May 16 '22 15:05 pashutk

FWIW, I also have contact-syncing disabled in the app and experience this issue. Not sure if it's at all relevant, but if this works for some folks but not for others then I wonder what the common thread might be.

ndarilek avatar May 16 '22 15:05 ndarilek

Same thing here, getting kicked after half a day or so.

Contact-syncing also disabled. It might be worth having someone try if that makes a difference at some point, I can delete all my contacts on the phone I'm using, add a couple of dummy ones and try sharing it to make it happy if that helps... I'll try next time I get kicked out (so probably around tomorrow)

martinetd avatar Jun 17 '22 08:06 martinetd

hmm, I actually got disconnected immediately when reconnecting mautrix-telegram this time. I relogged in on phone, shared a single contact they already had and logged in again from matrix and it didn't kick me out yet -- will post again if/when I notice the next force logoff...

martinetd avatar Jun 17 '22 09:06 martinetd

... and just got kicked out again, so unrelated. (sorry for the spam)

martinetd avatar Jun 17 '22 10:06 martinetd

Meanwhile I have recently tried to add my alt telegram again, and this time it still works to this day (added perhaps about 2 weeks ago). So it seems like after some regular use through the official apps, I have prevented the issue.

dsonck92 avatar Jun 18 '22 13:06 dsonck92

This is definitely happening to me as well, it happened so often that Telegram banned my phone number. I sent an email to get it unbanned (which worked), then I re-added my account, deleted everything from my mautrix-telegram database, and this is still happening. Going to try to not sign into the bridge for 2-3 weeks and see if that helps

th0mcat avatar Jun 20 '22 02:06 th0mcat

I'm pretty sure something on the Telegram end is logging some people out if it doesn't like the app you are using to login.

I'd like to confirm that manually setting your device_info in your mautrix-telegram config.yaml to the following works for other people and not just me.

    device_info:                                                                           
        # "auto" = OS name+version.                                                        
        device_model: GooglePixel 6                                                
        # "auto" = Telethon version.
        system_version: SDK 32                                                    
        # "auto" = mautrix-telegram version.                                               
        app_version: 8.7.4 (26367)                                                         
        lang_code: en                                                                      
        system_lang_code: en

th0mcat avatar Jul 05 '22 16:07 th0mcat

Setting the device info manually does seem to have helped with my issue. I haven't been booted yet. 🤞

thefirstofthe300 avatar Jul 05 '22 19:07 thefirstofthe300

I can confirm that solution provided by @th0mcat is working for me too, at least for some time. I'll update the message if it works only temporarily/unstable. Thanks!

pashutk avatar Jul 06 '22 09:07 pashutk

I can confirm that this worked for me as well, though I'm now having a different issue. If like me you use the Matrix Docker Ansible playbooks, here is how I set these device properties.

ndarilek avatar Jul 07 '22 15:07 ndarilek

I can confirm we had this issue but only with a new user who recently joined our server. At this time existing logins were not dropped because of the device_info being "suspicious".

This was disruptive af because it was completely un-indicated by both Telegram Desktop messages/notifications and Matrix messages

https://github.com/mautrix/telegram/issues/733#issuecomment-1175267044 fixed the issue for our server, for the time being.

boxmein avatar Jul 10 '22 20:07 boxmein

I have tried adding the device info to my vars.yml - I am using the ansible-docker install - but I'm still getting logged out of all my sessions after about 5 mins. Can anyone tell me if have added it correctly - this is the telegram part of my vars.yaml:

matrix_mautrix_telegram_enabled: true
matrix_mautrix_telegram_api_id: redacted
matrix_mautrix_telegram_api_hash: redacted
matrix_mautrix_telegram_configuration_extension_yaml: |
  bridge:
    permissions:
      '@redacted:redacted': admin
    encryption:
      allow: true
      default: true
    device_info:
      device_model: GooglePixel 6
      system_version: SDK 32
      app_version: 8.7.4 (26367)
      lang_code: en
      system_lang_code: en
matrix_mautrix_telegram_login_shared_secret: redacted

tquest1 avatar Apr 30 '23 19:04 tquest1