/usr/bin/update-manager:AttributeError:<lambda>:available:start_available:refresh_cache:_get_ua_security_status

Bug #2064211 reported by errors.ubuntu.com bug bridge
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
Fix Released
High
Nathan Teodosio
Xenial
Fix Committed
Undecided
Nathan Teodosio
Bionic
Fix Committed
Undecided
Nathan Teodosio
Focal
Fix Committed
Undecided
Nathan Teodosio
Jammy
Fix Committed
High
Nathan Teodosio
Noble
Triaged
High
Nathan Teodosio

Bug Description

Impact
------

This bug was is a regression of the bug fix LP:2058133; It held back the phasing of the package.

The symptom is that update-manager crashes right at start, doesn't launch.

The ua.updates() and current_news() end-points are documented to throw no exceptions, but actually they might, in which case this bug is encountered. As such, the proposed fix tries the API but ignores exceptions raised by it, causing update-manager to still work, even if the Pro packages end up being classified as normal packages or if Pro news aren't displayed.

Test plan
---------

Run 'UA_CONFIG_FILE=/ update-manager --no-update', update-manager should launch, not crash.

Where problems could occur
--------------------------

If the API end-points are working, ensure that classifying Pro packages as such and displaying possible Pro news continues to work.

Original report
---------------

Looks like ua.updates() can actually throw an exception. Only that would explain this crash.

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/UpdateManager/Dialogs.py", line 118, in <lambda>
    button.connect("clicked", lambda x: callback())
  File "/usr/lib/python3/dist-packages/UpdateManager/Dialogs.py", line 371, in available
    self.window_main.start_available(error_occurred=True)
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 242, in start_available
    self.refresh_cache()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 461, in refresh_cache
    self._get_ua_security_status()
  File "/usr/lib/python3/dist-packages/UpdateManager/UpdateManager.py", line 285, in _get_ua_security_status
    for package in self.ua_updates:
AttributeError: 'UpdateManager' object has no attribute 'ua_updates'

The Ubuntu Error Tracker has been receiving reports about a problem regarding update-manager. This problem was most recently seen with package version 1:22.04.20, the problem page at https://errors.ubuntu.com/problem/ed0e9f0ed8bc4002d808a11e37e4ee9d870e32c1 contains more details, including versions of packages affected, stacktrace or traceback, and individual crash reports.
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://forms.canonical.com/reports/.

Related branches

Changed in update-manager (Ubuntu):
assignee: nobody → Nathan Teodosio (nteodosio)
status: New → In Progress
importance: Undecided → High
description: updated
Changed in update-manager (Ubuntu Noble):
importance: Undecided → High
Changed in update-manager (Ubuntu Jammy):
importance: Undecided → Critical
importance: Critical → High
assignee: nobody → Nathan Teodosio (nteodosio)
Changed in update-manager (Ubuntu Noble):
assignee: nobody → Nathan Teodosio (nteodosio)
Changed in update-manager (Ubuntu Jammy):
status: New → In Progress
Changed in update-manager (Ubuntu Noble):
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:24.10.1

---------------
update-manager (1:24.10.1) oracular; urgency=medium

  [ Nathan Pratta Teodosio ]
  * Don't crash if the updates() end-point of the Pro API fails (LP: #2064211).

  [ Himadri Sekhar Basu ]
  * Fix scroll window on update downloading page
    - Currently the download progress box does not
      expand vertically when in fullscreen, however
      the expansion in vertical direction with
      increasing window height is the proper
      behaviour. This fix provides this desired
      behaviour.
    - Fixes LP: #1772486, LP: #1856404

 -- Graham Inggs <email address hidden> Wed, 22 May 2024 15:21:09 +0000

Changed in update-manager (Ubuntu):
status: In Progress → Fix Released
description: updated
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Fix was insufficient as per test case, current_news() also hits the same problem. Reverting to triaged and proposing a new merge request for that remaining part.

Changed in update-manager (Ubuntu):
status: Fix Released → Triaged
Changed in update-manager (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:24.10.2

---------------
update-manager (1:24.10.2) oracular; urgency=medium

  * Don't crash if the current_news() end-point of the Pro API fails
    (LP: #2064211).

 -- Nathan Pratta Teodosio <email address hidden> Fri, 24 May 2024 16:08:50 +0200

Changed in update-manager (Ubuntu):
status: Fix Committed → Fix Released
Changed in update-manager (Ubuntu Focal):
status: New → In Progress
Changed in update-manager (Ubuntu Bionic):
status: New → In Progress
Changed in update-manager (Ubuntu Xenial):
status: New → In Progress
Changed in update-manager (Ubuntu Focal):
assignee: nobody → Nathan Teodosio (nteodosio)
Changed in update-manager (Ubuntu Bionic):
assignee: nobody → Nathan Teodosio (nteodosio)
Changed in update-manager (Ubuntu Xenial):
assignee: nobody → Nathan Teodosio (nteodosio)
status: In Progress → New
Changed in update-manager (Ubuntu Bionic):
status: In Progress → Triaged
Changed in update-manager (Ubuntu Focal):
status: In Progress → Triaged
Changed in update-manager (Ubuntu Jammy):
status: In Progress → Triaged
Changed in update-manager (Ubuntu Xenial):
status: New → Triaged
Revision history for this message
Nathan Teodosio (nteodosio) wrote :
Changed in update-manager (Ubuntu Noble):
status: In Progress → Triaged
Revision history for this message
Benjamin Drung (bdrung) wrote :
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted update-manager into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:22.04.21 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-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. 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 update-manager (Ubuntu Jammy):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-jammy
Changed in update-manager (Ubuntu Focal):
status: Triaged → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello errors.ubuntu.com, or anyone else affected,

Accepted update-manager into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:20.04.10.22 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.

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Proposed package upload rejected

An upload of update-manager to noble-proposed has been rejected from the upload queue for the following reason: "fix the version".

Changed in update-manager (Ubuntu Bionic):
status: Triaged → Fix Committed
tags: added: verification-needed-bionic
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello errors.ubuntu.com, or anyone else affected,

Accepted update-manager into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:18.04.13 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-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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 update-manager (Ubuntu Xenial):
status: Triaged → Fix Committed
tags: added: verification-needed-xenial
Revision history for this message
Timo Aaltonen (tjaalton) wrote :

Hello errors.ubuntu.com, or anyone else affected,

Accepted update-manager into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/update-manager/1:16.04.23 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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. 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.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

In Xenial virtual machine, installed 1:16.04.23 and ran

  UA_CONFIG_FILE=/ update-manager --no-update', update-manager

The program started normally and did not crash.

tags: added: verification-done-xenial
removed: verification-needed-xenial
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

In Focal virtual machine, installed 20.04.22 and ran

  UA_CONFIG_FILE=/ update-manager --no-update

The program started normally and did not crash.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

In Bionic virtual machine, installed 18.04.13 and ran

  UA_CONFIG_FILE=/ update-manager --no-update

The program started normally and did not crash.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

In Jammy virtual machine, installed 22.04.21 and ran

  UA_CONFIG_FILE=/ update-manager --no-update

The program started normally and did not crash.

tags: added: verification-done-jammy
removed: verification-needed-jammy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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