ubuntu-bug isn't opening firefox (snap) on jammy, instead gedit gets data

Bug #1951214 reported by Chris Guiver
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
apport (Ubuntu)
Fix Released
High
Brian Murray
Impish
Won't Fix
High
Unassigned
Jammy
Fix Released
High
Brian Murray

Bug Description

This has been reported before on Ubuntu Community Hub, but I want/need a bug report filed on launchpad to report/track on iso.qa.ubuntu.com

On a `ubuntu-bug` or apport opening up a bug report; a gedit window opens with

---
<html>
<head>
  <title>OpenID transaction in progress</title>
</head>
<body onload="document.forms[0].submit();">
<form action="https://login.launchpad.net/+openid" method="post" accept-charset="UTF-8" enctype="application/x-www-form-urlencoded"><input name="openid.mode" type="hidden" value="checkid_setup"/><input name="openid.ns.sreg" type="hidden" value="http://openid.net/extensions/sreg/1.1"/><input name="openid.assoc_handle" type="hidden" value="{HMAC-SHA256}{61827c6f}{OsRBYA==}"/><input name="openid.return_to" type="hidden" value="https://launchpad.net/+openid-callback?starting_url=https%3A%2F%2Fbugs.launchpad.net%2Fsubiquity%2F%2Bfilebug%2Ff55a6274-4767-11ec-a1ce-d485646cd9a4%3Ffield.title%3Dinstall%2Bfailed%2Bcrashed%2Bwith%2BCalledProcessError&amp;janrain_nonce=2021-11-17T05%3A34%3A05Zo24b46"/><input name="openid.realm" type="hidden" value="https://launchpad.net/"/><input name="openid.identity" type="hidden" value="http://specs.openid.net/auth/2.0/identifier_select"/><input name="openid.sreg.required" type="hidden" value="email,fullname"/><input name="openid.ns" type="hidden" value="http://specs.openid.net/auth/2.0"/><input name="openid.claimed_id" type="hidden" value="http://specs.openid.net/auth/2.0/identifier_select"/><input type="submit" value="Continue"/></form>
<script>
var elements = document.forms[0].elements;
for (var i = 0; i < elements.length; i++) {
  elements[i].style.display = "none";
}
</script>
</body>
</html>
---

this is detail that belongs in `firefox` and not `gedit` ... ie. bug.

This issue is NOT new.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: apport 2.20.11-0ubuntu73
ProcVersionSignature: Ubuntu 5.13.0-19.19-generic 5.13.14
Uname: Linux 5.13.0-19-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportLog:
 ERROR: apport (pid 2820) Wed Nov 17 16:33:33 2021: called for pid 2593, signal 11, core limit 0, dump mode 1
 ERROR: apport (pid 2820) Wed Nov 17 16:33:33 2021: executable: /snap/ubuntu-desktop-installer/171/bin/ubuntu_desktop_installer (command line "/snap/ubuntu-desktop-installer/171/bin/ubuntu_desktop_installer")
 ERROR: apport (pid 2820) Wed Nov 17 16:33:33 2021: executable does not belong to a package, ignoring
ApportVersion: 2.20.11-0ubuntu73
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.465+canary3.3
CrashReports:
 644:0:0:30:2021-11-17 16:33:08.496906043 +1100:2021-11-17 16:33:08.496906043 +1100:/var/crash/1637127188.494807005.install_fail.meta
 640:0:0:726809:2021-11-17 16:33:41.277731657 +1100:2021-11-17 16:33:42.277731657 +1100:/var/crash/1637127188.494807005.install_fail.crash
 644:0:0:0:2021-11-17 16:33:45.953817607 +1100:2021-11-17 16:33:45.953817607 +1100:/var/crash/1637127188.494807005.install_fail.upload
 600:116:123:5:2021-11-17 16:48:24.898416884 +1100:2021-11-17 16:33:45.953817607 +1100:/var/crash/1637127188.494807005.install_fail.uploaded
CurrentDesktop: ubuntu:GNOME
Date: Wed Nov 17 16:52:32 2021
LiveMediaBuild: Ubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20211116)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: apport
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Chris Guiver (guiverc) wrote :
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/1951214

tags: added: iso-testing
Revision history for this message
Sebastien Bacher (seb128) wrote :

I've debugged the issue and here is what is going on

* the report is a system one so ubuntu-bug is using sudo
* the environment is filtered which includes XDG_DATA_DIRS
* when XDG_DATA_DIRS is missing glib fallbacks to the standard path, /usr/share/applications
* there is no browser installed in this directory since we install firefox as a snap and the desktop is in /var/lib/snapd/desktop/applications
* gio fallbacks for some reason to use a text editor but could as well error out

The attached patch should fix the issue, I didn't confirm yet though

Changed in apport (Ubuntu):
status: New → Confirmed
importance: Undecided → High
tags: added: rls-jj-incoming
Revision history for this message
Sebastien Bacher (seb128) wrote :

confirmed now on a canary image that the fix works as expected

tags: added: patch
Revision history for this message
Sebastien Bacher (seb128) wrote :

One equivalent cmd to show the issue

$ sudo -H -u ubuntu --preserve-env=DBUS_SESSION_BUS_ADDRESS gio open https://www.ubuntu.com

adding XDG_DATA_DIRS leads to the right behaviour

Lukas Märdian (slyon)
tags: added: fr-1884
tags: removed: rls-jj-incoming
Revision history for this message
Brian Murray (brian-murray) wrote :

Using the test case from comment #5 I was also able to recreate this on a fresh Impish install so this should be SRU'ed there.

Changed in apport (Ubuntu Impish):
status: New → Triaged
importance: Undecided → High
Changed in apport (Ubuntu Jammy):
status: Confirmed → In Progress
assignee: nobody → Brian Murray (brian-murray)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apport - 2.20.11-0ubuntu74

---------------
apport (2.20.11-0ubuntu74) jammy; urgency=medium

  [ Sebastien Bacher ]
  * apport/ui.py: preserve XDG_DATA_DIRS for system reports, it's necessary
    to be able to find a webbrowser installed from a snap like firefox.
    (LP: #1951214)

 -- Brian Murray <email address hidden> Wed, 01 Dec 2021 14:12:32 -0800

Changed in apport (Ubuntu Jammy):
status: In Progress → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote :

Actually, this doesn't really need fixing in Impish because one would have to modify /etc/apport/crashdb.conf so that crashes could be reported to Launchpad and we don't really want crash reports from stable releases in Launchpad.

Changed in apport (Ubuntu Impish):
status: Triaged → Won't Fix
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.