Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

chat protocol on different clients are not equal #186

Closed
Micha-Btz opened this issue Dec 16, 2015 · 17 comments
Closed

chat protocol on different clients are not equal #186

Micha-Btz opened this issue Dec 16, 2015 · 17 comments

Comments

@Micha-Btz
Copy link

Hi there,

i using telegram with the same account on three different ways. One on my phone, one on win 7
and one on my linux debian with pidgin and the telegram plugin. Sometimes i miss on pidgin some chat entries, is there a way to force pidgin to get the complete chat from server?

Micha

if debugging needed it will try it when someone tells me how

@majn
Copy link
Owner

majn commented Dec 16, 2015

Telegram-Purple should do exactly that: fetch every single old message in the history and add it once you log in again.

There are two exceptions to that rule:

  1. When the message are already read and older than N days they won't be displayed to avoid annoying spam when not using it for a long time (by default N=7 days, it can be changed in settings)
  2. Messages that you have received before you first created the account in pidgin

If your missing messages can be explained by one of those exceptions, you can just change the settings to display arbitrarily old read messages. Otherwise it may be a bug.

@Micha-Btz
Copy link
Author

the messages are send during the day with win client and android phone.
and in the evening at home, i use pidgin and there are the messages missed.
but how i debug this?

@majn
Copy link
Owner

majn commented Dec 16, 2015

When you would receive a message, start pidgin -d from terminal and send me the log. Make sure to remove persnal info like phone number or contact names in case you upload it somewhere public or send it to me by email.

@majn
Copy link
Owner

majn commented Dec 16, 2015

Also, please include pidgin and telegram-version / commit

@Micha-Btz
Copy link
Author

hi there,

take some days but i have tested some stuff.

I have also a lot of messages like this in telegram:
(2016-01-07 22:00:26) Micha-PC:
Ihre Nachricht konnte nicht zugestellt werden
(2016-01-07 22:00:26) Micha-PC:
Ihre Nachricht konnte nicht zugestellt werden

i have tested it now for two weeks without telegram-purple and this message doesn't appear.
and after i compile and install it new i start pidgin with telegram and in two different chats came the message above.
and some of the missing posts are before those messages. maybe purple-pdigin thinks this messages was not send and received successful. still missing some parts with latest commit.

i have today update to lastest commit cf851ad
pidgin --version
Pidgin 2.10.11 (libpurple 2.10.11)

and extended question more related to pidgin i think. is there a plugin that i can read messages in pidgin like on the phone with complete history without go about in german it called Mitschnitt maybe message recording?

@BenWiederhake
Copy link
Collaborator

Since we're all Germans here, you can write down your problem in German, because I don't understand your English.

  1. Wir brauchen immernoch ein debug log von Dir, um rauszufinden was da überhaupt vor sich geht :P
  2. Synchronizing issue (linux and win32) #221 may be a duplicate of this (this reference will appear in the other thread)
  3. Es gibt bereits das Mittschnitt-Feature, dafür brauchst du noch nicht mal ein Plugin: Einfach einen Buddy in deiner Buddy List rechtklicken und auf "Mittschnitt anzeigen" klicken.
  4. So wie Du's formulierst passiert das mit dem Ihre Nachricht konnte nicht zugestellt werden in einem Chat, der nichts mit Telegram zu tun hat. Sicher, dass Du das wirklich meinst?

EDIT: Because there's also non-German people, I'll translate all posts:

  1. We still need a debug.log from you, to find out what's happening in the first place :P
  2. Synchronizing issue (linux and win32) #221 may be a duplicate of this (this reference will appear in the other thread)
  3. There already is a conversation log feature, and you don't need a plugin for that: Just right-click a buddy in your buddy list, and click on "conversation log".
  4. The way you phrase it sounds like the Your message couldn't be delivered appears in chats that have nothing to do with Telegram whatsoever. Are you sure that's what you mean?

@Micha-Btz
Copy link
Author

  1. Debuglog kann ich posten
  2. hm, rumkopieren der config passt eigentlich nicht so recht dazu, den syncen sollte er ja trotzdem immer
  3. Das Feature kenn ich, aber ich hätte am liebsten eine komplett durchgängig scrollbare History,
    so wie auf dem Handy oder eben der Win Desktop Client. Dieser Umweg nervt ein wenig, wenn ich was suche.
  4. Nein, diese Nachricht wird durch telegram-purple erzeugt. Extra um das Festzustellen, habe ich mal zwei Wochen auf pidgin-telegram verzichtet. Gestern, als ich die neue Version gebaut, installiert und gestartet habe, erschien diese Nachricht in zwei verschiedenen Telegram Chats.
    Meine fehlenden Einträge hängen anscheinend auch immer mit dieser Nachricht zusammen.

Ist den klar ob diese Nachricht durch pidgin-telegram erzeugt wird? Lt telegram support wird diese Nachricht nicht vom offiziellen Clients erstellt.


  1. I can post the debug logs
  2. Hm, copying around the config doesn't really fit, because he should always sync
  3. I know that feature, but I'd like to have a continuous scroll bar for the history, like on the phone or in the official Windows desktop client. This "detour" is a bit annoying if I search for something.
  4. No, the messages are generated by telegram-purple. Just to detect that, I refrained myself from telegram-purple. Yesterday, when I built, installed, and started the new version, the message appeared in two different Telegram chats. My missing entries seem to correspond with that message.

Is it sure that the message is generated by telegram-purple? According to the Telegram support, this message is not generated by any official client.

@BenWiederhake
Copy link
Collaborator

  1. Ja, dann her damit! Wir warten nur darauf, dass endlich einer von Euch das debug log sendet :P
  2. Also Du kopierst die Dateien nicht wild herum? Das ist gut, denn dabei kann es komische Effekte geben.
  3. Uff, dazu bräuchte es ein konkret Pidgin-specifisches Plugin. Keine Ahnung wo's sowas gibt, aber ich weiß, was Du meinst.
  4. in zwei verschiedenen Telegram Chats => Ah, okay, das macht mehr Sinn.

EDIT: Ja, die Nachricht kommt entweder von telegram-purple oder pidgin.

Nicht nur "antworten"!

Bitte das Log senden! :P


  1. Well, go for it! We only wait on you two to send those logs :P
  2. So you don't haphazardly copy files around? That's great, because that might have strange effects.
  3. Oomph, that would require a plugin specifically tailored to pidgin. No idea where to find that, but I know what you mean.
  4. in two different Telegram chats => Ah, okay, that makes more sense.

EDIT: Yes, the message comes either from telegram-purple or pidgin.

Don't just "respond"!

Send the logs, please! :P

@Micha-Btz
Copy link
Author

@BenWiederhake
Copy link
Collaborator

So you saw a Ihre Nachricht konnte nicht zugestellt werden during these 32 seconds? We need the debug log so we can see what's going on "under the hood" during the error. I don't see anything like it in the debug log, though. This could be because it just doesn't generate a debug message. It could also be because you didn't trigger the error message when taking the debug log.

For the record, there is something fishy things going on; maybe related, maybe not:

(13:46:14) prpl-telegram: update_on_ready(): The account is done fetching new history
(13:46:14) g_log: (telegram-purple.c:515):update_on_ready: runtime check failed: (P)

Maybe telegram-purple has a wrong idea about TLS->our_id? Hmm.
@Micha-Btz: Can you delete the file ~/.purple/telegram-purple/+49yournumber/auth while pidgin is closed, and try again? It will ask you to login again (with SMS code and stuff), which is intended.

@majn
Copy link
Owner

majn commented Jan 9, 2016

You are getting a bad_msg_notification there.

(13:46:14) prpl-telegram: outbound rpc connection from dc #4 becomed ready
(13:46:14) prpl-telegram: Sent query #334430535668 of size 108 to DC 4
(13:46:14) prpl-telegram: restarting query 334430535668
(13:46:14) prpl-telegram: Alarm query 334430535668 (type 'get config')
(13:46:14) prpl-telegram: bad_msg_notification: msg_id = 6237768152886099968, seq = 2, error = 64
(13:46:14) prpl-telegram: bad_msg_notification: msg_id = 6237768152886099968, seq = 2, error = 64

after the connection was ready, "get config" seems to fail. Error code 64 indicates that the container of the message is somehow "bad" or corrupted. more soon ...

@Micha-Btz
Copy link
Author

it happend again just in the last start, where do you have the log. compare the time.
telegram-foss_2016-01-09-16-26-49
the first pic is a screenshot from my mobile phone where you can see the message.
the message never shows in pidgin-telegram only in the other clients
pidgin_telegram_2016-01-09_16-30-07
this pic is from pidgin telegram and as you see the message is missing

and in the log seems to be nothing. i will try to delete ~/.purple/telegram-purple/+49yournumber/auth

@Micha-Btz
Copy link
Author

ok, now i have get him
https://gist.github.com/Micha-Btz/8725be605a985e621da3
see line 140. seems to be an auto reply message but why?
if i delete the whole +49yournumber dir this is being fetched again right?
maybe i should test this too.

@majn
Copy link
Owner

majn commented Jan 9, 2016

I'm stumped, so the error message is actually being displayed in the phone app? I don't see how this could possibly be a bug with Telegram-purple, does that error always manifest exactly this?

@majn
Copy link
Owner

majn commented Jan 9, 2016

if i delete the whole +49yournumber dir this is being fetched again right

No, starting a new session means you don't get older messages in telegram-purple.

@majn
Copy link
Owner

majn commented Jan 9, 2016

Your logs also show that you are running a "pidgin-privacy-please". Multiple log entries tell me that its probably responsible for blocking messages:

(16:40:44) pidgin-pp: Blocking message with regex
(16:40:44) pidgin-pp: Message was blocked, reply?
(16:40:44) pidgin-pp: Auto-reply: 'Ihre Nachricht konnte nicht zugestellt werden'
(16:40:44) pidgin-pp: Sending to: Telegram #1
(16:40:44) prpl-telegram: tgprpl_send_im()
(16:40:44) pidgin-pp: ,----- Current message list -----
(16:40:44) pidgin-pp: | Telegram #1
(16:40:44) pidgin-pp: `--------------------------------

and later:

(16:40:49) pidgin-pp: Timer for Telegram #1 expired
(16:40:49) pidgin-pp: Removing Telegram #1 from list
(16:40:49) pidgin-pp: ,----- Current message list -----
(16:40:49) pidgin-pp: `--------------------------------

I just grepped its source code and it seems to be responsible for sending those messages:

 grep -R 'Nachricht konnte nicht zugestellt werden' .
 /po/de.po:msgstr "Ihre Nachricht konnte nicht zugestellt werden"

Turn that plugin off and see if the problem disappears.

@majn majn removed the bug label Jan 9, 2016
@Micha-Btz
Copy link
Author

ok, i disabled the plugin and will close this. some chats are still missing and i will possibly it reopen if it happens again. thanks for your help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants