xdg-open <url> fails on wily with chrome

Bug #1510091 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xdg-utils (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Fresh install of Wily. Attempting to file a bug against Unity using ubuntu-bug.

ubuntu-bug prompts me with the expected prompts for a Unity/Gfx bug and then says it will open a new window to complete the bug process.

Normally, this would open a window to a launchpad bug in progress so I can update the bug with final details before completing the bug filing process.

Instead, it opens a new browser window with NOTHING in the address bar. Since Ubuntu-Bug does NOT give me the URL in the console where it was launched, I have NO way of completing any bugs using ubuntu-bug.

I attempted to file a bug twice with ubuntu-bug and failed both times as it does NOT actually open a window that opens the bug's page on launchpad:

bladernr@Rogue1:~/Downloads$ ubuntu-bug unity
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
bladernr@Rogue1:~/Downloads$ Created new window in existing browser session.

bladernr@Rogue1:~/Downloads$ ubuntu-bug unity
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
bladernr@Rogue1:~/Downloads$ Created new window in existing browser session.

Revision history for this message
Jeff Lane  (bladernr) wrote :

I attempted to gather logs for this with apport-collect, but it said "no further information collected."

Again, this is a fresh, fully updated Wily install.

Martin Pitt (pitti)
affects: apport → apport (Ubuntu)
Revision history for this message
Martin Pitt (pitti) wrote :

Can you please modify /usr/lib/python3/dist-packages/apport/ui.py after "def open_url(self, url):" to add this as the first command:

     print('XXXX opening URL: %s' % url)

then run ubuntu-bug again, and see which URL it tries to open?

If you run "xdg-open http://www.launchpad.net" in a terminal, does that work? Which browser do you use?

Changed in apport (Ubuntu):
status: New → Incomplete
Revision history for this message
Jeff Lane  (bladernr) wrote :

Thanks for the pointers... I think this is not an apport bug after all, but one in xdg?

I have Google Chrome set as the default browser. When I launch via xdg-open:

xdg-open http://bugs.launchpad.net

It returns the line "Created new window in existing browser session."

ANd it opens a new chrome window with an empty tab (no URL).

HOWEVER, when I switch the default back to FireFox, xdg-open DOES open a FF window and loads launchpad.net successfully.

Modifying ui.py as you suggested prints this:
XXXX opening URL: https://bugs.launchpad.net/ubuntu/+source/apport/+filebug/e639d1fe-7bf7-11e5-a6ad-002481e7f48a?

and again, this fails to open in google chrome (even using xdg-open which is what apport does, I just learned) but succeeds in opening in Firefox.

Maybe this is, instead, a bug in xdg-utils? in Trusty, apport had no problems opening bugs in new Google Chrome windows.

Revision history for this message
Jeff Lane  (bladernr) wrote :

Accidentally added the Ubuntu apport package... apparently xdg-utils doesn't track bugs here... now what?

no longer affects: apport (Ubuntu)
Revision history for this message
Jeff Lane  (bladernr) wrote :

Oh crap, maybe you added the Ubuntu Apport task... sorry Martin, I thought I did accidentally. Either way, I think the bits you asked me to check show that this is an xdg-utils issue, not Apport. I just don't know where to file bugs against xdg-utils.

Revision history for this message
Martin Pitt (pitti) wrote :

Reassigning to xdg-utils. Thanks for the info!

affects: apport → xdg-utils (Ubuntu)
summary: - ubuntu-bug in wily fails to open a bug page when reporting bugs
+ xdg-open <url> fails on wily with chrome
Revision history for this message
Sebastien Bacher (seb128) wrote :
Changed in xdg-utils (Ubuntu):
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xdg-utils (Ubuntu):
status: New → Confirmed
Revision history for this message
Alex A. D. (hinell) wrote (last edit ):

Have updated to Kubuntu 22.04 Jammy recently and it turns out that xdg-open fails to open <url> in Chrome both from terminal and applications that use.

I haven't checked whether it works with other browsers so far.

Versions:
- xdg-open 1.1.3
- xdg-mime 1.1.3

- KUbuntu 22.04 LTS
- KDE Plasma 5.24.4
- Google Chrome 103.0.5060.134

Revision history for this message
Alex A. D. (hinell) wrote :

I've resolved issue by fixing the
   ~/.local/share/applications/google-chrome.desktop
file by editing following entry:
   Exec=/usr/bin/google-chrome --enable-features=WebUIDarkMode --force-dark-mode %u

It turned out that I've missed the %u wildcard. Now it works!

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.