Bug 27308 - purple-telegram plugin disconnects with RPC_CALL_FAIL 401 USER DEACTIVATED
Summary: purple-telegram plugin disconnects with RPC_CALL_FAIL 401 USER DEACTIVATED
Status: RESOLVED INVALID
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Jani Välimaa
QA Contact:
URL:
Whiteboard:
Keywords: Triaged
Depends on:
Blocks:
 
Reported: 2020-09-22 21:56 CEST by aguador
Modified: 2021-03-28 13:54 CEST (History)
0 users

See Also:
Source RPM: purple-telegram-1.4.3-1.mga8.src.rpm
CVE:
Status comment:


Attachments
Error building latest telegram-purple (1.73 KB, text/plain)
2021-01-02 13:16 CET, aguador
Details

Description aguador 2020-09-22 21:56:40 CEST
I have not used the plugin for a couple of years when it was working perfectly. Now with the account enabled any attempt to connect produces the error shown in the Summary.

This MAY be related to a translation request I received earlier this month. Quoting from it:

"So, telegram-purple depends on the unmaintained, buggy, and very incomplete library libtgl.

"That's why tdlib-purple started: It is based on the official "td" library by the Telegram people. Therefore, tdlib-purple won't suffer the same fate as telegram-purple! :D

"However, tdlib-purple is not yet complete. It needs translations! If you feel like contributing translations in your language (or a language that you know very well), please join the respective translation "team", or request a new language. I would be glad to see tdlib-purple support just as many languages as the old telegram-purple!

"Also, yes, this means that it's getting less and less likely that telegram-purple will ever see any updates or bugfixes. I'm sorry, especially if you run into some feature that's still missing from tdlib-purple. But that list is getting ever shorter – for example, in the next days/weeks we'll get one step closer to catching up: Translations ;)"

So if "unfixable", purple-telegram may need to be replaced with the new plugin: https://github.com/ars3niy/tdlib-purple
Comment 1 Aurelien Oudelet 2020-09-23 06:02:21 CEST
Hi,
Thanks reporting this.
Assigning to current maintainer for forensic this.

(Packager: Please set to "Assigned" if you work on this).

Keywords: (none) => Triaged
Assignee: bugsquad => jani.valimaa

Comment 2 aguador 2020-10-17 12:41:42 CEST
Telegram with the purple-telegram plugin is not working in Mageia 7 either.

I just tried one of the fedora rpms for purple-telegram-tdlib-0.7.1-1.1.x86_64.rpm, and the same problem appears. So either there may be a deeper problem or I have screwed up configuration or something. Is anyone else using this plugin?

(I do have Telegram desktop installed at the moment as a workaround, but really see no reason for it if I can unify everything in Pidgin which is properly packaged for Mageia.)
Comment 3 aguador 2021-01-02 13:16:12 CET
Created attachment 12172 [details]
Error building latest telegram-purple

I don't know if upgrading to the latest release (1.4.6) of he plugin will solve this bug, but the attached is the rpmbuild error of my attempt to build it using the current Mageia SPEC. This may be easy to fix, but since I am not a packager . . . .

Would be great to fix this bug for Mageia 8 and/or to move to the tdlib package. The following comes from the telegram-purple github page [and I can confirm that tdlib works well on a deb system, with history missing as noted]:

If people send PRs or make suggestions, I'm very willing to merge them into telegram-purple. However, the list of issues is getting longer and longer, and tdlib-purple gets closer and closer to becoming a drop-in replacement.

Note that only the following features are missing:

- Retrieving history on first login
- Ignoring certain groups (But why use a messenger if you don't want to ever see those messages?)
- Not sending read receipts https://github.com/ars3niy/tdlib-purple/issues/22

So it's a good replacement in many cases already. For more details, see https://github.com/ars3niy/tdlib-purple/milestone/1

I don't intend to abandon telegram-purple before tdlib-purple is a full replacement, so this project is still maintained (read: on life support).
Comment 4 aguador 2021-01-02 13:22:00 CET
Oops, the terminal information is more important:

+ /usr/bin/tar -xof -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ cd telegram-purple
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ /usr/bin/cat /home/aguador/rpmbuild/SOURCES/telegram-purple-fix-libdir.patch
+ /usr/bin/patch -p1 -s --fuzz=0 --no-backup-if-mismatch
2 out of 2 hunks FAILED -- saving rejects to file m4_ax_check_zlib.m4.rej
2 out of 2 hunks FAILED -- saving rejects to file tgl/m4_ax_check_zlib.m4.rej
error: Estado de salida erróneo de /var/tmp/rpm-tmp.mOdS1S (%prep)
Comment 5 aguador 2021-01-02 18:07:36 CET
Thank you for the update, but . . . Telegram now connects and the Buddy List can be seen momentarily before the connection is lost. Subsequent attempts to reconnect alternate between "connection lost" and the message at the head of this bug.

Here is the section of the debug log showing the Telegram disconnect on startup (with account no. XX'd out):

(17:56:04) prpl-telegram: fail_connection: write_error Tubería rota
(17:56:04) prpl-telegram: Lost connection to server ... 149.154.167.91:80
(17:56:04) connection: Connection error on 0x2806870 (reason: 0 description: Se perdió la conexión con el servidor...)
(17:56:04) GLib: Source ID 4294967295 was not found when attempting to remove it
(17:56:04) account: Disconnecting account +XXXXXXX (0x1d3a2c0)
(17:56:04) connection: Disconnecting connection 0x2806870
(17:56:04) prpl-telegram: tgprpl_close()

(First: "write error Broken pipe"; third line: "the connection to the server was lost...")

There are a couple of upstream bug reports about disconnects, but I am not sure any quite fit:

https://github.com/majn/telegram-purple/issues?q=is:issue+is:open+connect
Comment 6 aguador 2021-03-28 13:54:52 CEST
Finally figured this out after poking around looking at other issues reported on GitHub. I had not used Telegram for a couple of years and the problem was the old ~/.purple/telegram-purple folder. By renaming the folder, the plugin rebuilt it and allowed me to log in the account.

The plugin seems to have downloaded the history, but it does not show from Pigin for some reason. Not a big deal as I have access on other devices.

Resolution: (none) => INVALID
Status: NEW => RESOLVED


Note You need to log in before you can comment on or make changes to this bug.