Firefox icon missing from panel following Kubuntu upgrade 20.04->22.04

Bug #1964036 reported by Brent Gervais
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Invalid
Undecided
Unassigned
Jammy
Invalid
Undecided
Unassigned
ubuntu-release-upgrader (Ubuntu)
Fix Released
High
Nick Rosbrook
Jammy
Fix Released
High
Nick Rosbrook

Bug Description

[Impact]

By removing the firefox deb and installing the snap instead, ubuntu-release-upgrader is subverting the logic of the firefox transitional deb.

[Test Case]

Perform an upgrade from focal to jammy:

$ do-release-upgrade

On an affected system, the firefox deb will be removed by the upgrade, and the snap will be installed instead. On a fixed system, ubuntu-release-upgrader will not remove the firefox deb, and the deb will handle the transition to the snap.

[Where problems could occur]

If the patch was wrong, e.g. JSON syntax error or similar, it could mess up the remaining deb2snap entries.

[Original Description]

1) lsb_release -rd

Description: Ubuntu Jammy Jellyfish (development branch)
Release: 22.04
(Kubuntu Jammy live session in QEMU VM)

2) apt-cache policy ubuntu-release-upgrader-core
ubuntu-release-upgrader-core:
  Installed: 1:22.04.6

3) expected

(upgrade from Kubuntu 20.04.3 -> 22.04. Reboot.)

* Firefox icon on panel to be intact.
* Clicked icon launches browser.
* Icon tooltip/mouse hover to describe application.

4) happened instead

* Icon is missing/replaced with a generic icon
* Icon click produces error notification "Plasma Workspace - preferred://browser"
* Icon tooltip/mouse hover appears, though is blank.

Additional info:
* firefox is still installed, works as expected.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu78
Architecture: amd64
CasperMD5CheckResult: unknown
CrashDB: ubuntu
CurrentDesktop: KDE
DistroRelease: Ubuntu 22.04
InstallationDate: Installed on 2022-03-07 (2 days ago)
InstallationMedia: Kubuntu 20.04.3 LTS "Focal Fossa" - Release amd64 (20210819.1)
Package: ubuntu-release-upgrader (not installed)
ProcVersionSignature: Ubuntu 5.15.0-18.18-generic 5.15.12
Tags: jammy dist-upgrade
Uname: Linux 5.15.0-18-generic x86_64
UpgradeStatus: Upgraded to jammy on 2022-03-07 (2 days ago)
UserGroups: adm cdrom dip lpadmin lxd plugdev sambashare sudo
VarLogDistupgradeXorgFixuplog:
 INFO:root:/usr/bin/do-release-upgrade running
 INFO:root:No xorg.conf, exiting
_MarkForUpload: True

Related branches

Revision history for this message
Brent Gervais (gerbrent) wrote :
Revision history for this message
Brent Gervais (gerbrent) wrote :

screenshot showing:
* Icon is missing/replaced with a generic icon
* Icon tooltip/mouse hover appears, though is blank.

Revision history for this message
Brent Gervais (gerbrent) wrote :

screenshot showing:

* Icon click produces error notification "Plasma Workspace - preferred://browser"

Revision history for this message
Brent Gervais (gerbrent) wrote :
description: updated
tags: added: rls-jj-incoming
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1964036

tags: added: iso-testing
Revision history for this message
Brent Gervais (gerbrent) wrote : CurrentDmesg.txt.txt

apport information

tags: added: apport-collected dist-upgrade
description: updated
Revision history for this message
Brent Gervais (gerbrent) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Brent Gervais (gerbrent) wrote : ProcEnviron.txt

apport information

Revision history for this message
Brent Gervais (gerbrent) wrote : VarLogDistupgradeAptHistorylog.txt

apport information

Revision history for this message
Brent Gervais (gerbrent) wrote : VarLogDistupgradeAptclonesystemstate.tar.gz

apport information

Revision history for this message
Brent Gervais (gerbrent) wrote : VarLogDistupgradeAptlog.txt

apport information

Revision history for this message
Brent Gervais (gerbrent) wrote : VarLogDistupgradeApttermlog.txt

apport information

Revision history for this message
Brent Gervais (gerbrent) wrote : VarLogDistupgradeLspcitxt.txt

apport information

Revision history for this message
Brent Gervais (gerbrent) wrote : VarLogDistupgradeMainlog.txt

apport information

Brent Gervais (gerbrent)
tags: added: kubuntu
Brent Gervais (gerbrent)
summary: - Firefox icon missing from panel following Kubuntu LTS upgrade
- 20.04->22.04
+ Firefox icon missing from panel following Kubuntu upgrade
+ 20.04/21.10->22.04
description: updated
Brent Gervais (gerbrent)
summary: - Firefox icon missing from panel following Kubuntu upgrade
- 20.04/21.10->22.04
+ Firefox icon missing from panel following Kubuntu upgrade 20.04->22.04
description: updated
affects: ubuntu-release-upgrader (Ubuntu) → firefox (Ubuntu)
Changed in firefox (Ubuntu):
assignee: nobody → Olivier Tilloy (osomon)
Revision history for this message
Szymon Świerkosz (szymek) wrote :

It happens to me after snap updates firefox and removes the old version the icon was created from. I had a look at desktop file and while Exec property is not version specific:
Exec=env BAMF_DESKTOP_FILE_HINT=/var/lib/snapd/desktop/applications/firefox_firefox.desktop /snap/bin/firefox %u
The Icon is:
Icon=/snap/firefox/1406/default256.png

Maybe use current symlink?

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Having the revision in the path doesn't seem optimal indeed and it should probably rather use the 'current' variant

Revision history for this message
Mossroy (mossroy) wrote (last edit ):

I see the same issue after upgrading from Ubuntu 20.04 to 22.04.1, on 2 different computers. It's very frightening for end-users to see Firefox icon disappear.

I also have to set Firefox as the default browser again (in Firefox parameters)

Revision history for this message
Olivier Tilloy (osomon) wrote :

I added a snapd task to the bug following Sébastien's comment. I wonder if there's a good technical reason not to use the 'current' symlink in the path to the icon for the generated desktop file.

Revision history for this message
Olivier Tilloy (osomon) wrote :

The code that replaces "${SNAP}" by e.g. "/snap/firefox/1826" when installing the desktop file is there: https://github.com/snapcore/snapd/blob/master/wrappers/desktop.go#L208

 // do variable substitution
 bline = bytes.Replace(bline, []byte("${SNAP}"), mountDir, -1)

I have submitted a pull request to use the "current" symlink (https://github.com/snapcore/snapd/pull/12132), let's see what snapd developers think about it.

Olivier Tilloy (osomon)
Changed in snapd:
status: New → In Progress
assignee: nobody → Olivier Tilloy (osomon)
Revision history for this message
Olivier Tilloy (osomon) wrote :

Ok, I know what happened in this specific case (just tested in a Kubuntu 20.04 VM that I upgraded to 22.04): during the upgrade, the firefox deb package was uninstalled, resulting in the firefox.desktop file being removed from the system.

I'm attaching /var/log/dist-upgrade/main.log.

no longer affects: snapd
Revision history for this message
Olivier Tilloy (osomon) wrote :

Relevant excerpts from the above:

2022-09-19 12:16:55,064 DEBUG install of snap firefox succeeded
2022-09-19 12:17:00,921 DEBUG forced_obsoletes: ['firefox', 'ivman', 'gtk-qt-engine']
2022-09-19 12:17:01,116 DEBUG remove_candidates: '{'ca-certificates-java', …, 'firefox', …, 'default-jre-headless'}'
2022-09-19 12:18:33,328 DEBUG The following packages are marked for removal: ca-certificates-java … firefox-locale-en firefox-locale-fr … firefox …

Revision history for this message
Olivier Tilloy (osomon) wrote :

'firefox' being in the forced_obsoletes list is of course suspicious. I think this is caused by https://git.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/tree/DistUpgrade/DistUpgradeQuirks.py?h=ubuntu/jammy#n694 (last line of the _replaceDebsAndSnaps() function).

Revision history for this message
Olivier Tilloy (osomon) wrote :

I just tested a focal->jammy upgrade in a regular Ubuntu VM, and this resulted in the same problem: the firefox deb being removed, seemingly because the snap was installed.

As a result, the firefox favourite icon disappeared entirely from the gnome shell dock. This is definitely unwanted behaviour.

Revision history for this message
Brian Murray (brian-murray) wrote :

IIRC the dist upgrade quirk is designed to replace a deb with a snap and so the deb then gets marked for removal. It sounds like this is the incorrect behavior for the firefox deb.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Yes, indeed. How can we address this?

tags: added: foundations-triage-discuss
tags: added: foundations-todo
removed: foundations-triage-discuss
tags: added: foundations-triage-discuss
removed: rls-jj-incoming
tags: removed: foundations-triage-discuss
Changed in ubuntu-release-upgrader (Ubuntu):
importance: Undecided → High
Dan Bungert (dbungert)
Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Revision history for this message
Nick Rosbrook (enr0n) wrote (last edit ):

I just rebuilt ubuntu-release-upgrader to omit the firefox entry in deb2snap.json, i.e. so that the upgrade would not manually install the firefox snap or remove the firefox deb. I used this version to test an upgrade from focal to jammy in a regular Ubuntu VM, and it did not resolve the issue. I still did not have a firefox icon on my dock after the upgrade. I have attached the main.log from that upgrade.

I do agree that ideally ubuntu-release-upgrader should let the firefox deb handle the snap transition, but this deb2snap behavior does not appear to be the cause of this issue.

Revision history for this message
Richard Dawson (rcdawson) wrote :

I have seen this problem on several different computers. The problem occurred on at least one computer on which I installed kubuntu 2024 from "scratch", not as an upgrade to an existing installation. In that case, I believe the icon was there through several reboots of the machine. I am guessing that it disappeared as a consequence of one of the subsequent updates.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Richard, if this is the same problem being investigated here, then what would explain the icon disappearing is the firefox deb being uninstalled. You can check /var/log/apt/history.log* for info on when and why that happened. Note that this shouldn't/wouldn't have happened if you launched firefox at least once, because the launcher script from the transitional deb has some logic to rewrite the target of the favourite to point to the snap instead of the deb.

Revision history for this message
Olivier Tilloy (osomon) wrote :

Sorry for the incorrect status change, I misread Nick's comment. This obviously requires further investigation.

Changed in ubuntu-release-upgrader (Ubuntu):
status: Confirmed → Fix Committed
assignee: nobody → Nick Rosbrook (enr0n)
status: Fix Committed → Confirmed
Revision history for this message
Olivier Tilloy (osomon) wrote :

I still think the change to not uninstall the firefox deb on dist-upgrade should be SRUed to jammy.

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

This bug was fixed in the package ubuntu-release-upgrader - 1:22.10.8

---------------
ubuntu-release-upgrader (1:22.10.8) kinetic; urgency=medium

  * DistUpgrade: Cast to int when calling QProgressBar.setValue() (LP: #1991096)
  * DistUpgrade: Just pass filename to apport report (LP: #1985964)
  * DistUpgrade: Remove firefox from deb2snap.json (LP: #1964036)
  * Run pre-build.sh: updating mirrors, demotions, and translations.

 -- Nick Rosbrook <email address hidden> Thu, 29 Sep 2022 15:13:49 -0400

Changed in ubuntu-release-upgrader (Ubuntu):
status: Confirmed → Fix Released
Changed in ubuntu-release-upgrader (Ubuntu Jammy):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Brian Murray (brian-murray) wrote :

I've opened a new bug report about the Firefox deb not being installed in Ubuntu 22.04 in bug 1992688.

Nick Rosbrook (enr0n)
description: updated
Changed in ubuntu-release-upgrader (Ubuntu Jammy):
status: Triaged → In Progress
assignee: nobody → Nick Rosbrook (enr0n)
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Brent, or anyone else affected,

Accepted ubuntu-release-upgrader into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/ubuntu-release-upgrader/1:22.04.15 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 ubuntu-release-upgrader (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (ubuntu-release-upgrader/1:22.04.15)

All autopkgtests for the newly accepted ubuntu-release-upgrader (1:22.04.15) for jammy have finished running.
The following regressions have been reported in tests triggered by the package:

ubuntu-release-upgrader/1:22.04.15 (armhf)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/jammy/update_excuses.html#ubuntu-release-upgrader

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Nick Rosbrook (enr0n) wrote :

The autopkgtest failure was resolved with a retry.

I used ubuntu-release-upgrader 1:22.04.15 from jammy-proposed to verify this fix:

nr@clean-focal-amd64:~$ apt-cache policy firefox
firefox:
  Installed: 107.0+build2-0ubuntu0.20.04.1
  Candidate: 107.0+build2-0ubuntu0.20.04.1
  Version table:
 *** 107.0+build2-0ubuntu0.20.04.1 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status
     75.0+build3-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
nr@clean-focal-amd64:~$ do-release-upgrade --proposed
[ ... ]
nr@clean-focal-amd64:~$ cat /tmp/ubuntu-release-upgrader-u4hfm_j_/DistUpgradeVersion.py
VERSION = '22.04.15'
nr@clean-focal-amd64:~$ apt-cache policy firefox
firefox:
  Installed: 1:1snap1-0ubuntu2
  Candidate: 1:1snap1-0ubuntu2
  Version table:
 *** 1:1snap1-0ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
        100 /var/lib/dpkg/status

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-release-upgrader - 1:22.04.15

---------------
ubuntu-release-upgrader (1:22.04.15) jammy; urgency=medium

  * DistUpgrade: Remove firefox from deb2snap.json (LP: #1964036)
  * DistUpgrade: Just pass filename to apport report (LP: #1985964)
  * Run pre-build.sh: updating mirrors and translations.

 -- Nick Rosbrook <email address hidden> Fri, 14 Oct 2022 10:29:36 -0400

Changed in ubuntu-release-upgrader (Ubuntu Jammy):
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 ubuntu-release-upgrader 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.

Olivier Tilloy (osomon)
Changed in firefox (Ubuntu):
assignee: Olivier Tilloy (osomon) → nobody
Changed in firefox (Ubuntu):
status: Confirmed → Invalid
Changed in firefox (Ubuntu Jammy):
status: New → Invalid
Benjamin Drung (bdrung)
tags: removed: foundations-todo
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.