Open hooger opened 2 years ago
Same problem, the telegram app(phone), sign out completely by itself and the bridge Lost, after 10-15 seconds since bridge connected
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...
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.
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.
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.
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 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.
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.
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.
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.
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.
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.
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 ! ;)
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.
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?
I run it in an LXC container locally on my proxmox server
I have my own server in a server house. No VPS provider
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
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.
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)
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...
... and just got kicked out again, so unrelated. (sorry for the spam)
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.
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
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
Setting the device info manually does seem to have helped with my issue. I haven't been booted yet. 🤞
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!
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.
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.
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
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
I got it working with this config, i think yours might just be wrong
matrix_mautrix_telegram_configuration_extension_yaml: |
bridge:
permissions:
'@redacted:redacted': admin
telegram:
device_info:
device_model: GooglePixel 6
system_version: SDK 32
app_version: 8.7.4 (26367)
lang_code: en
system_lang_code: en
'@redacted:redacted': admin
Is it the matrix user you are bridging telegram to? Or some arbitrary "telegram admin" account?
thx @th0mcat !
what I did after logging in with my second account (brand new phone number):
@BotFather
and added it to bot_token:
( as some users might think this could help)# Device info sent to Telegram.
device_info:
device_model: Google Pixel 7 Pro
system_version: SDK 33
app_version: 11.2.3
lang_code: de
system_lang_code: de
not sure which of these both fixed it or both together but at least it does not kick me out immediately anymore.
before that I was kicked directly after doing sync chats
.
also to note:
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:
and than it repeats itself until I send
ping
. Around the ping these are in the log:Any idea what can be the problem? Any help/hint is appreciated!