majn / telegram-purple

Adds support for Telegram to Pidgin, Adium, Finch and other Libpurple based messengers.
GNU General Public License v2.0
734 stars 81 forks source link

group chat doesn't open #233

Open powerman opened 8 years ago

powerman commented 8 years ago

When I try to open group chat after restarting pidgin I got this error: 71: RPC_CALL_FAIL 400: USER_ALREADY_PARTICIPANT. After getting this error several times it stop responding at all (no visible effect on click on group chat contact), after some delay I get this error message again when try to open this chat. This chat was set to "[✓] Auto-Join" and "[✓] Persistent", but removing these checks doesn't helps.

powerman commented 8 years ago

To work around this issue I had to open web.telegram.org and use it to Leave group first and then Rejoin to group - this result in that group's chat tab pops up in pidgin.

BenWiederhake commented 8 years ago

That's strange, I wonder what happened there. If this ever happens again, we could change tgl to look out for error 71 (or its textual representation), and just ignore that error.

I mean, the goal is to be in that group, so already in the group is not an error.

powerman commented 8 years ago

If this ever happens again

It happens all of time - I never seen another behaviour.

majn commented 8 years ago

I tried to create a persistent and auto-join chat and I don't experience any of this behavior. The error you are describing should only be emitted when you are inviting someone, not when you just join. Do you have any weird pidgin plugins that might cause invitations of users into chats?

An application log would probably also be helpful, but please make sure that you remove sensitive information like your phone number.

powerman commented 8 years ago

No, I don't have any such plugins, but I've added that chat to pidgin using invite link (so in "Edit Settings" of that chat only non-empty field is "Invite link" set to https://telegram.me/joinchat/XXXXX) - may it be related to this issue?

BenWiederhake commented 8 years ago

No, that part is rather normal.

A debug log from the time during failure would greatly help us.

powerman commented 8 years ago

I've tried to remove all messages related for other protocols, but probably some are still there. Log timeline:

Pidgin Debug Log : Fri Feb 19 12:55:29 2016
(12:53:11) GLib-GObject: The property GtkDialog:has-separator is deprecated and shouldn't be used anymore. It will be removed in a future version.
(12:53:11) util: Writing file /home/powerman/.purple/icons/68c650b2455ea4c3cd98e775c8d0b3181ba098f9.png
(12:53:11) util: Writing file /home/powerman/.purple/icons/c09a30d040a019856b1066fe88343935c95fa847.png
(12:53:12) util: Writing file prefs.xml to directory /home/powerman/.purple
(12:53:12) util: Writing file /home/powerman/.purple/prefs.xml
(12:53:13) account: Connecting to account +380971234567.
(12:53:13) connection: Connecting. gc = 0x99337887b90
(12:53:13) prpl-telegram: tgprpl_login(): Purple is telling the prpl to connect the account
(12:53:13) prpl-telegram: base configuration path: '/home/powerman/.purple/telegram-purple/+380971234567'
(12:53:13) prpl-telegram: trying global pubkey at /etc/telegram-purple/server.tglpub
(12:53:13) prpl-telegram: read pubkey file: n_len=256 e=65537
(12:53:13) prpl-telegram: using global pubkey
(12:53:13) prpl-telegram: 'direct' public key loaded successfully
(12:53:14) prpl-telegram: DC1 'DC' update: 149.154.175.50:443
(12:53:14) prpl-telegram: read dc: id=1
(12:53:14) prpl-telegram: DC2 'DC' update: 149.154.167.51:443
(12:53:14) prpl-telegram: read dc: id=2
(12:53:14) prpl-telegram: DC3 'DC' update: 149.154.175.100:443
(12:53:14) prpl-telegram: read dc: id=3
(12:53:14) prpl-telegram: DC4 'DC' update: 149.154.167.91:443
(12:53:14) prpl-telegram: read dc: id=4
(12:53:14) prpl-telegram: DC5 'DC' update: 91.108.56.165:443
(12:53:14) prpl-telegram: read dc: id=5
(12:53:14) prpl-telegram: read auth file: dcs=5 dc_working_num=2 our_id=1
(12:53:14) prpl-telegram: read state file: seq=18 pts=1663 qts=544568301 date=1455861911
(12:53:14) prpl-telegram: update_on_logged_in(): The account is signed in
(12:53:14) prpl-telegram: wrote auth file: magic=-2037733347 max_dc_num=5 dc_working_num=2
(12:53:14) prpl-telegram: state: seq = 18, pts = 1663, date = 1455861911
(12:53:14) pidgin-libnotify: event_connection_throttle() called
(12:53:14) prpl-telegram: loading known ids from buddy list ...
(12:53:14) prpl-telegram: read secret chat: ! Daniel Podolsky, state=3, in_seq_no=12, last_in_seq_no=9, out_seq_no=9
(12:53:14) prpl-telegram: Secret chat in ok state
(12:53:14) prpl-telegram: update_secret_chat_handler() flags: CREATED WORKING ACCESS_HASH
(12:53:14) blist: Updating buddy status for ! Daniel Podolsky (Telegram)
(12:53:14) prpl-telegram: read secret chat file: 1 chats read
(12:53:14) dnsquery: Performing DNS lookup for 149.154.167.51
(12:53:14) prpl-telegram: Sent query #4375092954258388 of size 132 to DC 2
(12:53:14) dnsquery: IP resolved for 149.154.167.51
(12:53:14) proxy: Attempting connection to 149.154.167.51
(12:53:14) proxy: Connecting to 149.154.167.51:443 with no proxy
(12:53:14) proxy: Connection in progress
(12:53:14) proxy: Connecting to 149.154.167.51:443.
(12:53:14) proxy: Connected to 149.154.167.51:443.
(12:53:14) prpl-telegram: outbound rpc connection from dc #2 becomed ready
(12:53:14) prpl-telegram: Sent query #4375093221909176 of size 120 to DC 2
(12:53:14) prpl-telegram: restarting query 4375093221909176
(12:53:14) prpl-telegram: Alarm query 4375093221909176 (type 'get config')
(12:53:14) prpl-telegram: bad_msg_notification: msg_id = 6252953525157923840, seq = 2, error = 64
(12:53:14) prpl-telegram: bad_msg_notification: msg_id = 6252953525157923840, seq = 2, error = 64
(12:53:14) prpl-telegram: failing session 1770179034324817216
(12:53:14) dnsquery: Performing DNS lookup for 149.154.167.51
(12:53:14) dnsquery: IP resolved for 149.154.167.51
(12:53:14) proxy: Attempting connection to 149.154.167.51
(12:53:14) proxy: Connecting to 149.154.167.51:443 with no proxy
(12:53:14) proxy: Connection in progress
(12:53:14) proxy: Connecting to 149.154.167.51:443.
(12:53:14) proxy: Connected to 149.154.167.51:443.
(12:53:14) prpl-telegram: outbound rpc connection from dc #2 becomed ready
(12:53:14) prpl-telegram: Sent query #6252953525579741184 of size 120 to DC 2
(12:53:14) prpl-telegram: adjusting CLOCK_MONOTONIC delta to 0.146705
(12:53:14) prpl-telegram: work_new_session_created: msg_id = 6252953526253858817, dc = 2
(12:53:14) prpl-telegram: regen query from old session 4375093221909176
(12:53:14) prpl-telegram: regen query from old session 4375092954258388
(12:53:14) prpl-telegram: Alarm query 4375093221909176 (type 'get config')
(12:53:14) prpl-telegram: Resent query #4375093221909176 as #6252953525579741188 of size 120 to DC 2
(12:53:14) prpl-telegram: DC1 '' update: 2001:0b28:f23d:f001:0000:0000:0000:000a:443
(12:53:14) prpl-telegram: DC2 '' update: 2001:067c:04e8:f002:0000:0000:0000:000a:443
(12:53:14) prpl-telegram: DC3 '' update: 2001:0b28:f23d:f003:0000:0000:0000:000a:443
(12:53:14) prpl-telegram: DC4 '' update: 2001:067c:04e8:f004:0000:0000:0000:000a:443
(12:53:14) prpl-telegram: DC4 '' update: 149.154.165.120:443
(12:53:14) prpl-telegram: DC5 '' update: 91.108.56.125:443
(12:53:14) prpl-telegram: DC5 '' update: 2001:0b28:f23f:f005:0000:0000:0000:000a:443
(12:53:14) prpl-telegram: Alarm query 4375092954258388 (type 'get difference')
(12:53:14) prpl-telegram: Resent query #4375092954258388 as #6252953525590341632 of size 132 to DC 2
(12:53:14) prpl-telegram: update_chat_handler() flags: CREATED PHOTO TITLE
(12:53:14) prpl-telegram: update 0x2f2f21bf (check=-1)
(12:53:14) prpl-telegram: update_on_ready(): The account is done fetching new history
(12:53:14) g_log: (telegram-purple.c:517):update_on_ready: runtime check failed: (P)
(12:53:14) prpl-telegram: Sent query #6252953526166743040 of size 12 to DC 2
(12:53:14) prpl-telegram: Sent query #6252953526167246848 of size 8 to DC 2
(12:53:14) prpl-telegram: update_user_handler() flags: CREATED PHONE PHOTO NAME FLAGS ACCESS_HASH USERNAME
(12:53:14) prpl-telegram: update_user_handler() flags: CREATED PHOTO NAME ACCESS_HASH USERNAME
(12:53:14) prpl-telegram: 131779045: when=0
(12:53:14) prpl-telegram: mobile
(12:53:14) blist: Updating buddy status for Daniel Podolsky (Telegram)
(12:53:14) prpl-telegram: update_user_handler() flags: CREATED PHOTO NAME ACCESS_HASH USERNAME
(12:53:14) prpl-telegram: 59122311: when=0
(12:53:14) prpl-telegram: mobile
(12:53:14) blist: Updating buddy status for Roman Belyakovsky (Telegram)
(12:53:14) prpl-telegram: update_user_handler() flags: CREATED NAME ACCESS_HASH
(12:53:14) prpl-telegram: 156443501: when=0
(12:53:14) prpl-telegram: mobile
(12:53:14) blist: Updating buddy status for Vyacheslav Lyan (Telegram)
(12:53:14) prpl-telegram: update_user_handler() flags: CREATED PHONE PHOTO NAME ACCESS_HASH
(12:53:14) prpl-telegram: 777000: when=0
(12:53:14) prpl-telegram: mobile
(12:53:14) blist: Updating buddy status for Telegram (Telegram)
(12:53:14) prpl-telegram: update_user_handler() flags: CREATED PHONE PHOTO NAME ACCESS_HASH USERNAME
(12:53:14) prpl-telegram: 25270533: when=0
(12:53:14) prpl-telegram: mobile
(12:53:14) blist: Updating buddy status for Anton Umnitsyn (Telegram)
(12:53:14) prpl-telegram: Fetched dialogue list of size: 6
(12:53:14) prpl-telegram: 25270533: when=1455864351
(12:53:14) prpl-telegram: mobile
(12:53:14) blist: Updating buddy status for Anton Umnitsyn (Telegram)
(12:53:14) prpl-telegram: 777000: when=1455027692
(12:53:14) prpl-telegram: offline
(12:53:14) blist: Updating buddy status for Telegram (Telegram)
(12:53:14) prpl-telegram: 156443501: when=1455866888
(12:53:14) prpl-telegram: mobile
(12:53:14) blist: Updating buddy status for Vyacheslav Lyan (Telegram)
(12:53:14) prpl-telegram: 59122311: when=1455819103
(12:53:14) prpl-telegram: mobile
(12:53:14) blist: Updating buddy status for Roman Belyakovsky (Telegram)
(12:53:14) prpl-telegram: 131779045: when=1455878629
(12:53:14) prpl-telegram: mobile
(12:53:14) blist: Updating buddy status for Daniel Podolsky (Telegram)
(12:53:16) util: Writing file accounts.xml to directory /home/powerman/.purple
(12:53:16) util: Writing file /home/powerman/.purple/accounts.xml
(12:53:19) util: Writing file blist.xml to directory /home/powerman/.purple
(12:53:19) util: Writing file /home/powerman/.purple/blist.xml
(12:53:29) prpl-telegram: ping alarm
(12:53:44) prpl-telegram: ping alarm
(12:53:59) prpl-telegram: ping alarm
(12:54:09) GLib: Source ID 43397 was not found when attempting to remove it
(12:54:11) GLib: Source ID 43402 was not found when attempting to remove it
(12:54:14) prpl-telegram: ping alarm
(12:54:20) prpl-telegram: tgprpl_chat_join()
(12:54:20) prpl-telegram: Sent query #6252953811021051904 of size 28 to DC 2
(12:54:20) prpl-telegram: error for query 'forward messages' #6252953811021051904: #400 USER_ALREADY_PARTICIPANT
(12:54:20) prpl-telegram: 71: RPC_CALL_FAIL 400: USER_ALREADY_PARTICIPANT
(12:54:36) prpl-telegram: ping alarm
(12:54:42) prpl-telegram: update 0x1bfbd823 (check=0)
(12:54:46) prpl-telegram: update 0x1f2b0afd (check=0)
(12:54:46) prpl-telegram: Sent query #6252953922700437504 of size 8 to DC 2
(12:54:46) prpl-telegram: wrote state file: wpts=1665 wqts=544568301 wseq=18 wdate=1455879286
(12:54:46) prpl-telegram: wrote secret chat: ! Daniel Podolsky, state=3, in_seq_no=12, out_seq_no=9
(12:54:46) prpl-telegram: wrote secret chat file: 1 chats written.
(12:54:46) prpl-telegram: tgp_msg_on_loaded_chat_full()
(12:54:46) prpl-telegram: tgp_chat_add_all_users()
(12:54:46) g_log: purple_conv_chat_add_users: assertion 'users != NULL' failed
(12:54:46) prpl-telegram: sending all pending recipes
(12:54:46) prpl-telegram: tgl_do_mark_read (101410790)
(12:54:46) prpl-telegram: Sent query #6252953923006081024 of size 20 to DC 2
(12:54:50) prpl-telegram: update 0x2f2f21bf (check=0)
(12:55:05) g_log: purple_find_conversation_with_account: assertion 'name != NULL' failed
(12:55:05) GLib: g_markup_escape_text: assertion 'text != NULL' failed
(12:55:05) GLib: g_markup_escape_text: assertion 'text != NULL' failed
(12:55:05) GLib: Source ID 45680 was not found when attempting to remove it
(12:55:05) gtkconv: setting active conversation on toolbar 0x99337e0f9c0
(12:55:05) prefs: /pidgin/conversations/toolbar/wide changed, scheduling save.
(12:55:05) prpl-telegram: tgprpl_chat_info_defaults()
(12:55:05) prpl-telegram: found chat...
(12:55:05) prpl-telegram: tgprpl_blist_node_menu()
(12:55:05) gtkconv: setting active conversation on toolbar 0x99337e0f9c0
(12:55:05) prpl-telegram: tgprpl_chat_join()
(12:55:05) prpl-telegram: Sent query #6252954003639780352 of size 28 to DC 2
(12:55:05) prpl-telegram: update_user_handler() flags: CREATED PHOTO NAME ACCESS_HASH
(12:55:05) prpl-telegram: update_user_handler() flags: CREATED NAME ACCESS_HASH
(12:55:05) prpl-telegram: update_user_handler() flags: CREATED NAME ACCESS_HASH
(12:55:05) prpl-telegram: update_user_handler() flags: CREATED PHOTO NAME ACCESS_HASH
(12:55:05) prpl-telegram: update_user_handler() flags: CREATED PHOTO NAME ACCESS_HASH
(12:55:05) prpl-telegram: update_user_handler() flags: CREATED PHOTO NAME ACCESS_HASH USERNAME
(12:55:05) prpl-telegram: update 0x4e90bfd6 (check=0)
(12:55:05) prpl-telegram: update 0x07761198 (check=0)
(12:55:05) prpl-telegram: update 0x1f2b0afd (check=0)
(12:55:05) prpl-telegram: tgp_chat_add_all_users()
(12:55:05) g_log: purple_conv_chat_add_users: assertion 'users != NULL' failed
(12:55:05) prpl-telegram: sending all pending recipes
(12:55:05) prpl-telegram: tgl_do_mark_read (101410790)
(12:55:05) prpl-telegram: Sent query #6252954003961696256 of size 20 to DC 2
(12:55:05) prpl-telegram: wrote state file: wpts=1667 wqts=544568301 wseq=18 wdate=1455879305
(12:55:05) prpl-telegram: wrote secret chat: ! Daniel Podolsky, state=3, in_seq_no=12, out_seq_no=9
(12:55:05) prpl-telegram: wrote secret chat file: 1 chats written.
(12:55:05) prpl-telegram: update 0x2f2f21bf (check=0)
(12:55:10) util: Writing file prefs.xml to directory /home/powerman/.purple
(12:55:10) util: Writing file /home/powerman/.purple/prefs.xml
(12:55:10) prpl-telegram: update 0x9a65ea1f (check=0)
(12:55:15) prpl-telegram: update 0x9a65ea1f (check=0)
(12:55:18) prpl-telegram: sending all pending recipes
(12:55:18) prpl-telegram: tgl_do_mark_read (101410790)
(12:55:18) prpl-telegram: Sent query #6252954058522992640 of size 20 to DC 2
(12:55:18) prpl-telegram: wrote state file: wpts=1669 wqts=544568301 wseq=18 wdate=1455879305
(12:55:18) prpl-telegram: wrote secret chat: ! Daniel Podolsky, state=3, in_seq_no=12, out_seq_no=9
(12:55:18) prpl-telegram: wrote secret chat file: 1 chats written.
powerman commented 8 years ago

BTW, I'm using latest git version (updated 5 hours ago).

BenWiederhake commented 8 years ago

Sorry for not asking earlier, but: Could the group be a so-called "super-group"? It usually never displays that term, but if the group has 200+ members, it's probably a super-group.

powerman commented 8 years ago

No, it's usual small group, about 10 people.