SRU: Update Telegram Desktop to 3.1.1

Bug #1942699 reported by Nicholas Guriev
50
This bug affects 13 people
Affects Status Importance Assigned to Milestone
libtgowt (Ubuntu)
Fix Released
Undecided
Nicholas Guriev
Focal
Fix Released
Undecided
Nicholas Guriev
Hirsute
Won't Fix
Undecided
Nicholas Guriev
Impish
Fix Released
Undecided
Nicholas Guriev
telegram-desktop (Ubuntu)
Fix Released
Undecided
Nicholas Guriev
Focal
Fix Released
High
Nicholas Guriev
Hirsute
Won't Fix
Undecided
Nicholas Guriev
Impish
Fix Released
Undecided
Nicholas Guriev

Bug Description

[Impact]

The newer version of Telegram Desktop, 3.1.1, which is currently in Ubuntu 21.10 (Impish Indri), provides an important support for 64-bit user identifiers. In the next few weeks will register users with UID more than 2 ³¹ - 1 (maximal 32-bit signed number). These users will be unseen in ancient versions.

This version also brings many new features including video calls, voice chats, streaming platform, several pinned messages, multiple accounts, comments in channels, auto-deleting messages, simple image editor. Unfortunately, it is huge task to extract an isolated patch which is responsible for 32-bit to 64-bit migration. I suggest, on an upstream author's advice, to do full update of the package.

Given the nature of the project, it make sense to do regular updates in
order to adjust changes of Telegram service and its server protocol.

[Test Plan]

- Bug fix verification:

1. Login as a new user with ID over the bound on a test server.
   * Provided that you are not logged in, start the app, go to Settings,
     type blindly `testmode`.
   * Use any number matching the next format: +999661XXXX, where X means
     any digit.
   * Provide auth code 11111.
   * Choose random account name if needed, then click the "Sign Up"
     button.
2. Make sure you have gotten a long UID.
   * Look into an mtp_*.txt debug log.
3. Login as an old user in another application instance.
   * Use phone +9996611111 and the same auth code.
4. The new user writes messages to the old user. The second one receives
   them regardless of ancient version.
5. The old user writes messages to the new user. The second one receives
   none of them until the old user updates their application.

- Regression checking:

As this is a new upstream version of the package, please perform as many usual everyday tasks on it as possible, looking for regressions. There is a difference in Qt versions between impish and focal so there might be some things that are broken by that.

Be sure to provide as many everyday usage examples during the testing period.

[Regression Potential]

Leaf package. Most potential issues are occasional crashes of the
application. The new version also offers OpenGL acceleration, but I am
going to disable it by default to reduce hardware related problems.

Qt5 version in focal is 5.12 while in impish is 5.15. telegram-desktop upstream mentions switching to 5.15, so this difference can be a potential source of regressions.

[Other Info]

The libtgowt source package need to be backported before. It caries a
static library for support Telegram calls. Changes in the library do not
apply immediately and require recompiling of the telegram-desktop
package to be in effect.

Changed in telegram-desktop (Ubuntu):
assignee: nobody → Nicholas Guriev (mymedia)
Changed in libtgowt (Ubuntu):
assignee: nobody → Nicholas Guriev (mymedia)
Revision history for this message
Nicholas Guriev (mymedia) wrote :
Revision history for this message
Nicholas Guriev (mymedia) wrote :
Revision history for this message
Nicholas Guriev (mymedia) wrote :
Revision history for this message
Nicholas Guriev (mymedia) wrote :
Mattia Rizzolo (mapreri)
Changed in telegram-desktop (Ubuntu Impish):
status: New → Fix Released
Changed in libtgowt (Ubuntu Impish):
status: New → Fix Released
Changed in telegram-desktop (Ubuntu Hirsute):
assignee: nobody → Nicholas Guriev (mymedia)
Changed in telegram-desktop (Ubuntu Focal):
assignee: nobody → Nicholas Guriev (mymedia)
Changed in libtgowt (Ubuntu Hirsute):
assignee: nobody → Nicholas Guriev (mymedia)
Changed in libtgowt (Ubuntu Focal):
assignee: nobody → Nicholas Guriev (mymedia)
Changed in telegram-desktop (Ubuntu Hirsute):
status: New → In Progress
Changed in telegram-desktop (Ubuntu Focal):
status: New → In Progress
Changed in libtgowt (Ubuntu Hirsute):
status: New → In Progress
Changed in libtgowt (Ubuntu Focal):
status: New → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Nicholas, or anyone else affected,

Accepted libtgowt into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libtgowt/0~git20210627.91d836d+dfsg-3ubuntu1~21.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libtgowt (Ubuntu Hirsute):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Revision history for this message
Brian Murray (brian-murray) wrote : Re: SRU: Update Telegram Desktop to 2.9.2

I mistakenly accepted libtgowt and asked to have it removed from the archive. I'm sorry for the inconvenience, but could you please reupload the package for review? Thanks.

Changed in libtgowt (Ubuntu Hirsute):
status: Fix Committed → In Progress
tags: removed: verification-needed verification-needed-hirsute
Revision history for this message
Mattia Rizzolo (mapreri) wrote :

reuploaded, sorry for the delay.

Revision history for this message
Robie Basak (racb) wrote :

The SRU team discussed this between themselves on 9 September. We don't think that "new features" are appropriate in telegram-desktop in stable Ubuntu releases, and so this is not sufficient justification for an SRU in itself. Users generally don't expect new features to appear in stable Ubuntu releases, and we don't think an exception is appropriate here.

If you want to continuously ship the latest telegram-desktop features to Ubuntu users, we think that snaps would be a more appropriate solution. If you don't want to use snaps, then you might consider the backports pocket - subject to requirements from the backporters team as they get their process refined and restarted.

If, however, there are specific bugs that need fixing in telegram-desktop in a stable release, or a specific change in the Telegram protocol that results in regressed functionality for users, then we can consider an SRU to fix that. If this is the case then such an SRU needs to be justified on those merits.

I'm therefore going to set the stable tasks to Won't Fix and reject the uploads. Feel free however to repurpose this bug to fix some specific issue that is SRU-able - in which case please provide that justification and then reopen the bug.

Changed in libtgowt (Ubuntu Focal):
status: In Progress → Won't Fix
Changed in libtgowt (Ubuntu Hirsute):
status: In Progress → Won't Fix
Changed in telegram-desktop (Ubuntu Focal):
status: In Progress → Won't Fix
Changed in telegram-desktop (Ubuntu Hirsute):
status: In Progress → Won't Fix
Revision history for this message
Nicholas Guriev (mymedia) wrote :

Hello!

In the next few weeks, Telegram will migrate from 32-bit user identifiers to 64-bit ones. Version 3.1 is the minimal that supports UIDs over 2 ³¹ - 1. Older version may stop working for new registered users. I think it is worth to have this version in Ubuntu. At least, SRU policy admits such updates.

But for now, we should sync version 3.1.1-ds-1 from Debian sid. And then we get a chance to update the LTS release.

Revision history for this message
Mattia Rizzolo (mapreri) wrote :

(moving back to "triaged" while we wait on the SRU team's answer on this new point)

Changed in telegram-desktop (Ubuntu Focal):
status: Won't Fix → Triaged
Changed in libtgowt (Ubuntu Focal):
status: Won't Fix → Triaged
Revision history for this message
Robie Basak (racb) wrote : Re: [Bug 1942699] Re: SRU: Update Telegram Desktop to 2.9.2

Thank you for looking after this package in Ubuntu!

On Sun, Oct 10, 2021 at 01:57:45PM -0000, Nicholas Guriev wrote:
> In the next few weeks, Telegram will migrate from 32-bit user
> identifiers to 64-bit ones. Version 3.1 is the minimal that supports
> UIDs over 2 ³¹ - 1. Older version may stop working for new registered
> users. I think it is worth to have this version in Ubuntu. At least, SRU
> policy admits such updates.

"May" stop working? Will it, or won't it? I don't think it's appropriate
to speculatively update the package in a stable release unless you're
actually sure. If you do the necessary analysis and confirm that it will
actually break users in practice, that such breakage is to an
unacceptable level (eg. the package won't work at all for newly
registered users) _and_ that it's impractical to backport a fix, then I
think an SRU to a new version with the fix would be acceptable.

However, I don't think vague speculation about what _might_ break is
enough. Please figure out the detail and post a comment explaining the
detail. *If* my conditions above are clearly met from such an analysis,
then +1 for a major version update. However if a backport or patch is
practical, then that is preferable and I expect that instead. I don't
think it's acceptable to ignore that preference and jump straight to a
major version update without even looking. For example, why would a
trivial patch switching the type to a 64-bit one not be practical? I
will expect that to be explained first.

I'd also like to pre-empt the usual argument I see in this kind of
situation, which is "I prefer to maintain it this way because that's
easier/more tested upstream/whatever". While that may be true, the cost
is that users get disrupted as we break their expectations of a stable
release. We have made a choice as a project to ship and then patch
stable releases, and with that choice comes the acceptance of that
patching risk. Users who prefer the other side of the trade-off already
have that choice via the telegram-desktop snap.

Revision history for this message
Nicholas Guriev (mymedia) wrote :

Alexey Klimenko and I checked it out on a test server and found that:

 * A new 64-bit user is unable to login with Telegram Desktop before
   v3.0.2 (beta version, was not packaged).
 * A 32-bit user with the old app do not see a new user, instead the one
   of them sees @UnsupportedUser64Bot, not real account.
 * An old user is unable to write to a new user, but a new one can. This
   is like simplex communication.
 * An old user can't distinguish different new users. They all write in
   the same dialog.
 * New users do not appear on contact list in the old app.

There may be other issues. But as for "stop working", I overestimated.
Existing installations will continue to work but with degraded
operability. There are two rather big commits which introduce 133 scheme
layer with a fix for 64-bit UIDs.

https://github.com/telegramdesktop/tdesktop/commit/a6c98f4bb44c8a5f55f86ea80f932a5d0a8be1e3
https://github.com/telegramdesktop/tdesktop/commit/e4e5c4a1d23a271dd2b38d6925917b50932191ad

Unfortunately, they do not apply cleanly against versions currently in
Ubuntu, 2.1.7 or 2.6.1. Adapting the patches will be a pretty difficult
task with unreliable result. John Preston, an upstream author, suggested
to do a full update of the package.

I know Ubuntu has backports pocket for so huge updates. But it seems the
backporting process is not started yet.

On Вс, 2021-10-10 at 16:46 +0000, Robie Basak wrote:
> Users who prefer the other side of the trade-off already
> have that choice via the telegram-desktop snap.

Sorry, I do not use snapd.

description: updated
summary: - SRU: Update Telegram Desktop to 2.9.2
+ SRU: Update Telegram Desktop to 3.1.1
Revision history for this message
Mattia Rizzolo (mapreri) wrote :

I've uploaded telegram-desktop/3.1.1+ds-1~ubuntu20.04.1 to focal. libtgowt (in NEW) wasn't rejected and it's still good, so I'm not touching it, but please remember it's a dependency.

Changed in telegram-desktop (Ubuntu Focal):
status: Triaged → In Progress
Changed in libtgowt (Ubuntu Focal):
status: Triaged → In Progress
Revision history for this message
Mikhail Novosyolov (mikhailnov) wrote :

Is this update on its way to 20.04 (focal) or not? I think it is a very important update. A newer version in a stable release is much better than a not working version.

Revision history for this message
Niklas Sombert (ytvwld) wrote :

The messages in the popup in the app are getting more aggressive. Also, new messages are sometimes not received until I restart the application. Is there anything happening here or do I need to switch to a flatpak or snap or something?

Mattia Rizzolo (mapreri)
Changed in telegram-desktop (Ubuntu Focal):
importance: Undecided → High
Revision history for this message
Rolf Leggewie (r0lf) wrote :

I can confirm that the package in focal is starting to behave very poorly, messages being dropped without any indication to the user, frequent nag screens, etc.

Rolf Leggewie (r0lf)
tags: added: patch
Revision history for this message
bizdelnick (bizdelnick) wrote :

Hi! Any chances for update? I cannot log into my telegram account with telegram-desktop 2.1.7+ds-2~ubuntu20.04.1, it says this version is outdated and no longer supported.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote (last edit ):

I built the libtgowt package on my laptop, all seemed fine.

Given that server side changes are breaking the stable client, this SRU seems appropriate, per the guideline at https://wiki.ubuntu.com/StableReleaseUpdates :

| • Updates that need to be applied to Ubuntu packages to adjust to changes in the environment, server protocols, web services, and similar, i. e. where the current
| version just ceases to work.

Revision history for this message
Mattia Rizzolo (mapreri) wrote :

@serge-hallyn: we can all agree, but to date I only failed to grab the attention of any SRU member; even pinging on IRC resulted useless apparently.

All the packages have been in the queue for months, but ignored.

I'll thank you in advance if you manage to get anybody to look at them and provide useful feedback, that we didn't get since Sep 9th when the SRU team reached decisions without even fully understanding the situation AND without asking for more details, and then just went into silence.

/me not particularly amused.

Revision history for this message
Robie Basak (racb) wrote :

There's nothing I know of stopping this from landing except for a proper review. But since you've chosen to wholesale bump the version instead of backporting a minimal fix, that review is much more complicated than it needed to be (including a new dependency package that I don't have powers myself to accept so I need to coordinate with an AA, etc). From my perspective you've thrown a new version at the queue in the hope that it sticks, transferring the work it would have taken to do a minimal backport to the SRU team to review a much larger change instead. Or, at least, I perceive the required SRU review here to be longer than it needs to be.

So reviewing this has tended to fall to the bottom of my priority list, especially because I understand that a snap exists that solves these problems for users, so this is really only impacting users who are taking an opinionated stance contrary to one that Ubuntu has already taken. In my recent SRU review shifts I've just not gotten there yet, sorry.

To be clear, I have no objection to reviewing and landing this fix; it's just not a high priority when I have other SRU review work to do. At some point I expect someone will sit down and sort it out. I've seen rumblings of that being discussed within the SRU team, but most of us have just had our extended annual vacation/shutdown which hasn't helped.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello everyone! Sorry I didn't get to this sooner. I'll perform reviews of both the new telegram-desktop and libtgowt. Looking at Robie's initial assessment, the main problems were:
a) Robie was looking for certainty and analysis that users will *certainly* be broken, and
b) If a cherry-pick fix approach is, for some reason, not feasible

Seeing comments since that time, I feel that both these points have now been cleared out so I will proceed with the usual review steps. It's really hard for me to say why this did not get attention after such a long time. We usually leave SRU reviews to those that already have context, so maybe the reason was that everyone was waiting for Robie to get back to it, but clearly others (like me) should have stepped in earlier.

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Nicholas, or anyone else affected,

Accepted libtgowt into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/libtgowt/0~git20210627.91d836d+dfsg-3ubuntu1~20.04 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in libtgowt (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-focal
description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hello Nicholas, or anyone else affected,

Accepted telegram-desktop into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/telegram-desktop/3.1.1+ds-1~ubuntu20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in telegram-desktop (Ubuntu Focal):
status: In Progress → Fix Committed
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Ok, telegram-desktop should be now building in focal-proposed and soon should be available for testing and verification!

One thing to note though. I already modified the bug description, the test case and regression sections, since during review I noticed that with one of the upstream versions of telegram-desktop (2.4.8 beta) I saw mention of "Upgrade Qt to version 5.15.1". It's worth noting that focal only has 5.12 while impish is 5.15. Even though the debian/control dependency has never been bumped to 5.15, I would still like everyone to make sure the app is still working as expected on the older Qt.

Please do as much testing as possible. Not only verification of the bug mention in the test case, but general dogfooding as well.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Thank you everyone for tackling this issue.

I updated and gave it a quick spin and it seems the package is working fine in general. I'll keep an eye on it and do more testing in focal.

Revision history for this message
Mathias Weyland (launchpad-weyland) wrote :

I used telegram-desktop 3.1.1+ds-1~ubuntu20.04.1 on focal for two days now and the package is back into a functional state for me. No issues observed whatsoever. I cannot say anything about libtgowt but it is my understanding that this is "just" a build dependency for audio/video call that is statically linked into telegram at build time. I don't use that feature though.

In any case, Łukasz, thank you so much for taking care of that!

Revision history for this message
Niklas Sombert (ytvwld) wrote :

I used the new version on Focal for about a day now and everything seems to work fine. I can see the new users that I haven't seen before and messages are received immediately.

I didn't try chatting with any new user or creating a call though.

Thanks!

Revision history for this message
Nicholas Guriev (mymedia) wrote : Re: [Bug 1942699] Re: SRU: Update Telegram Desktop to 3.1.1

Hi1 Thank you everyone for participating!

I can confirm that version 3.1.1+ds-1~ubuntu20.04.1 of the
telegram-desktop package in focal-proposed works okay. I successfully
ran the test from the bug description. To verify update of the libtgowt
package with the static library, I did two peer-to-peer calls, incoming
and outcoming, and I also checked group video chats. They all work as
expected. No glitches with UI were noticed, which might appear due to a
lower Qt version.

tags: added: verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Excellent! Thank you for testing! Since this is an upstream version bump, if you don't mind I'd like to keep it around for a few days still. In the meantime please do as much exploratory testing on the focal-proposed version as possible. If there are no regressions reported till my next SRU shift (Thursday on the 27th), let's release it to focal-updates \o/

Revision history for this message
Rolf Leggewie (r0lf) wrote :

Awesome! Thanks, Łukasz.

Just another data point, I've been using the new telegram-desktop package without a hitch on two desktops since the 18th. I'll be sure to report any problem if I come across any.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package libtgowt - 0~git20210627.91d836d+dfsg-3ubuntu1~20.04

---------------
libtgowt (0~git20210627.91d836d+dfsg-3ubuntu1~20.04) focal; urgency=medium

  * Backport from impish to focal (LP: #1942699).
  * Downgrade Debhelper compatibility level to 12.

 -- Nicholas Guriev <email address hidden> Sun, 05 Sep 2021 12:02:05 +0300

Changed in libtgowt (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for libtgowt has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package telegram-desktop - 3.1.1+ds-1~ubuntu20.04.1

---------------
telegram-desktop (3.1.1+ds-1~ubuntu20.04.1) focal; urgency=medium

  * Backport from impish to focal (LP: #1942699).
    - Support 64-bit user identifiers.
  * Remaining change:
    - Revert "Switch to Hunspell spellchecker from Enchant".
      + Preserves current behaviour and leaves untouched user settings in
        existing installations.
  * Add Keep-old-settings.patch disabling OpenGL acceleration by default.
    - A user can still try it from Advanced Settings page.
  * Completely disable non-backported Wayland integration. It requires private
    headers which are not in LTS. Please use XWayland for now.

 -- Nicholas Guriev <email address hidden> Mon, 11 Oct 2021 16:26:12 +0300

Changed in telegram-desktop (Ubuntu Focal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.