"Make Default" button doesn't do anything

NEW
Unassigned

Status

()

P3
normal
a year ago
9 months ago

People

(Reporter: imnotb, Unassigned)

Tracking

Trunk
Unspecified
Linux
Points:
---
Bug Flags:
qe-verify +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

a year ago
Created attachment 8905063 [details]
Default browser.webm

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20170906100107

Steps to reproduce:

Went into Preferences, clicked "Make Default" button. (Using today's Nightly build on Ubuntu GNOME 16.04.)


Actual results:

Nothing. See attachment.


Expected results:

Firefox should be set as default (or Ubuntu's dialog for setting the default browser should appear - not sure).
Component: Untriaged → Preferences
OS: Unspecified → Linux
Ricky, you recently worked on the Make Default button. Can you look in to this?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(rchien)
Priority: -- → P3
There is a similar issue on macOS. On Mac, the system native popup dialog of changing default browser will show behind the browser. However, this issue is happening on Linux. I'll take a look. Thanks
Flags: needinfo?(rchien)
Whiteboard: [photon-preference][triage]
Vincent,

I can't reproduce your issue on Ubuntu 16.04.

> Build ID: 20170906100107

According to your Build ID, you're using the build from last week. Could you try the latest one again? 

P.S. On Linux, Clicking "Make Default" button will set Nightly as default browser immediately without prompting any system dialog.
Flags: needinfo?(imnotb)
(Reporter)

Comment 4

a year ago
Ricky,

I regularly install the updates, and every time it restarts the dialog pops up again. It also still says "Nightly is not your default browser" even though I click "Make Default" every time: https://imgur.com/a/aKWQE

Could it have to do with this being regular GNOME, rather than Unity?
Flags: needinfo?(imnotb)
Jared,

It seems like a platform specific issue only happen on Ubuntu GNOME. I'm afraid I'm not the best person can handle platform issue. Do you know someone who can help us?
Flags: needinfo?(jaws)
@ricky, I think it was one of your patches that made this button show up on Linux? Can we just revert that part of your old patch?
Flags: needinfo?(jaws) → needinfo?(rchien)
Jared, my patch in bug 1389377 was aiming at introducing `Exponential backoff mechanism` for updating button status. The "Make Default" button always show up on Linux as it is. As a result, I suspect the issue might be platform relevant.
Flags: needinfo?(rchien)

Updated

a year ago
Whiteboard: [photon-preference][triage] → [photon-preference]

Updated

a year ago
Flags: qe-verify+
QA Contact: hani.yacoub
Unfortunately, I cannot reproduce your issue even thought running on Ubuntu 16.04 GNOME with using Nightly build 20170906100107.
I've tested that the Make Default still works properly on Ubuntu 16.04 Unity & KDE, and even work on GNOME (GNOME Shell 3.18.5).  

Make Default button is using `gconf` [1] to set default browser for user. It seems like this code hasn't been changed for a while. I've no clue why it only cause in your machine.

[1] http://searchfox.org/mozilla-central/source/browser/components/shell/nsGNOMEShellService.cpp#204-247

Jared, do you know someone from platform team who is familiar with Linux has time to take a look?
Flags: needinfo?(imnotb)
Flags: needinfo?(jaws)
(Reporter)

Comment 10

a year ago
Created attachment 8913160 [details]
dconf-editor focused on /org/gnome/desktop/applications

Thanks for checking Ricky. It sounds like a similar setup: I'm on Ubuntu 16.04 with gnome-shell 3.18.5 as well. A few more things I checked:

- I just tried to click a link from within LibreOffice and one from GNOME Maps, and both _did_ open in Nightly.
- Then again, when I closed Nightly and opened regular Firefox, the link opened there.
- Stable Firefox listed itself as not being default. After clicking the button to set it as default, it did. Then clicking that button in Nightly didn't change that.
- I'm not sure if gconf is still a thing, but in any case, in dconf editor I did not find a setting for default browser. I've attached a screenshot, which does show defaults for calendar, terminal and tasks.
Flags: needinfo?(imnotb)
Mike, do you know who can take a look at this issue? (see also comment 9)
Flags: needinfo?(mconley)
Hey karlt, are you still hacking on GTK stuff? Is this something we should point your way, or is there someone else we should forward this to?
Flags: needinfo?(mconley) → needinfo?(karlt)
karlt would be my choice too.
Flags: needinfo?(jaws)
based on comment 12, remove whiteboard tag
Whiteboard: [photon-preference]
I reset browser.shell.checkDefaultBrowser and wasn't able to reproduce with 57
beta.  I reset browser.shell.defaultBrowserCheckCount,
browser.shell.skipDefaultBrowserCheck, and wasn't able to reproduce with
Nightly.

Each time, choosing to make default changed, as expected, the output from
gconftool-2 --get /desktop/gnome/url-handlers/https/command
(In reply to Mike Conley (:mconley) (:⚙️) - Backlogged on reviews from comment #12)
> Hey karlt, are you still hacking on GTK stuff? Is this something we should
> point your way, or is there someone else we should forward this to?

I'm not really involved now.  I haven't seen significant changes in these
files for years now, and so I don't know who to suggest.  But it's hard to
analyse without being able to reproduce.

The code tries gconf before giovfs.  Perhaps that should be reordered, or
more likely gconf just removed, but I don't know that that is the cause of
this bug.
Component: Preferences → Shell Integration
Flags: needinfo?(karlt)
(In reply to Vincent from comment #10)
> Created attachment 8913160 [details]
> dconf-editor focused on /org/gnome/desktop/applications
> 
> Thanks for checking Ricky. It sounds like a similar setup: I'm on Ubuntu
> 16.04 with gnome-shell 3.18.5 as well. A few more things I checked:
> 
> - I just tried to click a link from within LibreOffice and one from GNOME
> Maps, and both _did_ open in Nightly.
> - Then again, when I closed Nightly and opened regular Firefox, the link
> opened there.

Yes, if there is a version of Firefox running, then it is difficult to tell
which version was actually taking the URL and passing it to the running
version.

> - Stable Firefox listed itself as not being default. After clicking the
> button to set it as default, it did. Then clicking that button in Nightly
> didn't change that.

Was the stable Firefox build from Mozilla or Ubuntu?
If from Mozilla, then this may be a regression.

> - I'm not sure if gconf is still a thing, but in any case, in dconf editor I
> did not find a setting for default browser. I've attached a screenshot,
> which does show defaults for calendar, terminal and tasks.

If gconftool-2 is installed then please check as above.
If not, then look for files in ~/.local/share/applications/
(Reporter)

Comment 18

a year ago
Ah, yes, the stable build was provided by Ubuntu. I've now tried Mozilla's 56 stable and, indeed, I still experience this problem. That makes this less worrisome, I guess - perhaps they've just added some patches to make this work.

Nevertheless, some more diagnosis. I just now noticed that, when I click the Make Default button, the following is output in the terminal:

    (firefox:17108): GLib-CRITICAL **: g_find_program_in_path: assertion 'program != NULL' failed

Also, I did get the expected output from gconftool-2 (I'm on Developer Edition now):

    $ gconftool-2 --get /desktop/gnome/url-handlers/https/command
    /home/vincent/Downloads/firefox 56 stable/firefox-bin %s

Furthermore, there are a lot of .desktop files for Firefox Developer Edition and Nightly in ~/.local/share/applications/, I presume for every time I pressed the Make Default button?

Comment 19

9 months ago
Currently (as far as i can tell) the 'Make Default' button:
> edits the necessary entries in ~/.config/mimeapps.list
> creates ~/.local/share/applications/userapp-Firefox-RANDOM.desktop

works successfully for firefox binaries from mozilla

 -----------------------------------

(In reply to Vincent from comment #18)
> Furthermore, there are a lot of .desktop files for Firefox Developer Edition
> and Nightly in ~/.local/share/applications/, I presume for every time I
> pressed the Make Default button?

yes and you can remove them, for the one that is actually currently set as default look in ~/.config/mimeapps.list

to complete desktop integration see:
https://bugzilla.mozilla.org/show_bug.cgi?id=1427383
https://support.mozilla.org/en-US/questions/1164411#answer-978198
You need to log in before you can comment on or make changes to this bug.