Bug 760644 - Thunderbird won't open http links in firefox — https works
Summary: Thunderbird won't open http links in firefox — https works
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: thunderbird
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-06 17:16 UTC by Skippy
Modified: 2012-08-12 10:25 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-12 10:25:29 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Last update (9.47 KB, application/octet-stream)
2012-03-27 14:49 UTC, Skippy
no flags Details
Application info test script (821 bytes, text/x-python)
2012-08-10 07:41 UTC, Jan Horak
no flags Details

Description Skippy 2011-12-06 17:16:43 UTC
Description of problem:
Since an upgrade from F14 to F15 then F16, thunderbird won't open http links in firefox, although it will open https links, although firefox is selected as preferred application to handle websites in gnome-shell (used in fallback mode).  This applies to F16 and I remember it applied to F15 as well.


Version-Release number of selected component (if applicable):
thunderbird-8.0-2.fc16.i686
firefox-8.0-3.fc16.i686
gnome-shell-3.2.1-2.fc16.i686


How reproducible:
allways.


Steps to Reproduce:
1.Open thunderbird & firefox.
2.Click on a http link on an email.
  

Actual results:
Nothing happens.


Expected results:
The link should be opened in firefox if firefox is set to handle websites.

Comment 1 Jan Horak 2011-12-07 10:07:14 UTC
Does command 'xdg-open http://fedoraproject.org' from terminal works? Please attach also output of 'rpm -q xdg-utils'.

Comment 2 Martin Stransky 2011-12-07 12:45:40 UTC
I can reproduce it although https is broken too.

Comment 3 Skippy 2011-12-08 11:20:53 UTC
(In reply to comment #1)
> Does command 'xdg-open http://fedoraproject.org' from terminal works?

Yes, it does correctly open the link in firefox.


> Please attach also output of 'rpm -q xdg-utils'.

xdg-utils-1.1.0-0.9.20110714.fc16.noarch

Comment 4 Martin Stransky 2011-12-08 16:11:31 UTC
For me it dies in gnome_vfs_url_show_with_env(). I guess we may switch to GIO for F15 and newer.

Comment 5 Martin Stransky 2011-12-08 16:50:00 UTC
The app launcher works fine with GIO.

Comment 6 William D. McCoy 2012-01-04 18:11:17 UTC
I have this same issue with my new and updated installation of Fedora 16.  I did not have the problem in Fedora 15.  I have the problem with both http: and https: links.  

'xdg-open http://fedoraproject.org' does work fine in a terminal

Here is my version of xdg-utils:

$ rpm -qf `which xdg-open`                                   
xdg-utils-1.1.0-0.10.20111207.fc16.noarch

Comment 7 William D. McCoy 2012-02-18 21:52:34 UTC
I have discovered that the issue I described above (2012-01-04) seems to have been related to a previous installation of Google Chrome browser.  I had installed Chrome when I was running Fedora 15.  When I upgraded to Fedora 16, I had to reformat parts of my disk to make room for the new grub-2 bootloader, but I did not disturb the partition that held my /home directory.  When I then installed Fedora 16, I did not reinstall Chrome.  I later wondered why I had the above-described problem on this computer, but did not have the same problem on two other computers on which I had managed to successfully use yum preupgrade for my upgrade to Fedora 16.

So to try to solve my problem, today I used yum install to install google-chrome-stable and then used yum remove to remove chrome.  After doing that, my links in Thunderbird will now open directly in Firefox  -- the problem is solved for me!

So the install and uninstall scripts apparently changed some settings that had remained in my home directory from the Fedora 15 installation (although Firefox was always my default browser, even in Fedora 15).  Furthermore, xdg-settings and gconftools2 had both indicated that firefox was the default browser and should be called on active links.  So I think the issue was with something other than the xdg and gconf settings.  By the way, I generally use KDE, but I did have the same Thunderbird issue in Gnome after I had installed Fedora 16.

Comment 8 Martin Stransky 2012-03-27 14:19:13 UTC
I see, thanks for the info.

Skippy, do you still see this bug on Fedora 16?

Comment 9 Skippy 2012-03-27 14:49:47 UTC
Created attachment 573088 [details]
Last update

Yes, I still see this bug with Fedora 16, Thunderbird 11.0 (https works, http doesn't).  Note that before to test I updated Fedora and did not reboot, so you might want to check in the attached list of upgrades whether some related packages require a restart.

Comment 10 Jan Horak 2012-03-28 15:51:48 UTC
Please send us values of your /desktop/gnome/url-handlers/http/ and /desktop/gnome/url-handlers/https/ keys (command and if enabled). See:
https://wiki.archlinux.org/index.php/Default_Applications#Web_browser
for directions how to obtain these values. Thanks.

Comment 11 Skippy 2012-03-28 16:04:11 UTC
Same for both :

command         "gvfs-open %s"
enabled         [X]
needs_terminal  [ ]

The "gvfs-open" command works from a terminal.

Comment 12 Jan Horak 2012-04-11 08:43:59 UTC
I've made a little more research how Thunderbird is handling http and https handlers. It uses libgio to launch browser which looks to:
$HOME/.local/share/applications/mimeapps.list
for http and https uri handlers and if handler is not found to:
/usr/share/applications/defaults.list

Could you look into $HOME/.local/share/applications/mimeapps.list which handlers are used? In my case it's:
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop

You may also check /usr/share/applications/defaults.list but there shouldn't be  big surprise (this file is owned by shared-mime-info-0.91-5.fc16.x86_64 package)

Comment 13 Skippy 2012-04-11 10:36:54 UTC
Indeed this could explain why we are so few to encounter this problem, and may be consistent with hints in comment 7.

In $HOME/.local/share/applications/mimeapps.list I have

[Default Applications]
x-scheme-handler/http=mozilla-firefox.desktop

(which is the same as in /usr/share/applications/defaults.list, and I checked it does exist, and is the same as for https in defaults.list), but also 

[Added Associations]
x-scheme-handler/http=epiphany.desktop;

I have deleted the later then both, and restarted thunderbird, but there is no improvement.  Is there anything to restart in order to take these changes into account ?

Comment 14 Jan Horak 2012-04-12 08:28:30 UTC
Restart of Gnome sounds like a good idea. It may cache it somehow. Btw there is also $HOME/.local/share/applications/mimeinfo.cache, you may check this file too. Unfortunately I'm not sure what does this file are supposed to do.

Default application for specific protocol can be test by: 
xdg-open http://www.google.com

Comment 15 Skippy 2012-04-12 09:32:51 UTC
Well, as mentioned in comment 3, xdg-open does work…

I'll try again as soon as I have the chance to restart gnome.  For now removing mimeinfo.cache does not seem to help either.

Comment 16 Jan Horak 2012-08-09 13:55:37 UTC
Do you still see this problem?

Comment 17 Skippy 2012-08-09 17:28:50 UTC
Indeed, no improvement (using firefox 14.0.1-1.fc16 & thunderbird 14.0-1.fc16).

Comment 18 Jan Horak 2012-08-10 07:41:10 UTC
Created attachment 603441 [details]
Application info test script

Okay, I've made a simple python script which should check your application info used for showing URIs.
Please install pygobject2 package, download an attachment and run it by 
python gio-test.py
in terminal and attach output produced by this script.

Comment 19 Skippy 2012-08-10 09:17:51 UTC
$ python ~/download/gio-test.py 
Command for launching  https://fedoraproject.org : firefox %u
Command for launching  http://fedoraproject.org : firefox %u

Note that "firefox http://fedoraproject.org" actually works.

Comment 20 Jan Horak 2012-08-10 14:15:04 UTC
Hm, strange. If you can handle it (it could be a bit complicated if you haven't seen gdb yet), install debuginfo for thunderbird:
  debuginfo-install thunderbird
and run thunderbird in gdb (in terminal) by:
  /usr/lib64/thunderbird/run-mozilla.sh -g /usr/lib64/thunderbird/thunderbird
then set breakpoint to nsGIOService::ShowURI:
  break nsGIOService::ShowURI
and run application by:
  run

Click on http link and application should stop. It it doesn't let me know and also set breakpoint to (after ctrl-C in debugger terminal to stop application):
  break nsExternalHelperAppService::LoadURI
and continue running application by:
  continue
Click on http link again and if it doesn't break also for nsExternalHelperAppService::LoadURI also let me know.

You may try to go thru code lines to figure out what happened when calling g_app_info_launch_default_for_uri but try to do so only if you know what I'm talking about.

To be honest it looks like problem with your setup (you might changed some about:config parameters of thunderbird or some addon did that instead of you). You might try to test thunderbird with fresh profile.

Comment 21 Skippy 2012-08-10 16:05:45 UTC
(In reply to comment #20)
> and run thunderbird in gdb (in terminal) by:
>   /usr/lib64/thunderbird/run-mozilla.sh -g /usr/lib64/thunderbird/thunderbird

I'm running a 32 bit version.


> then set breakpoint to nsGIOService::ShowURI:
>   break nsGIOService::ShowURI

Actually :

(gdb)   break nsGIOService::ShowURI
Function "nsGIOService::ShowURI" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (nsGIOService::ShowURI) pending.

Then it does not stop when I click on a link so I guess it does not find this breakpoint later either.


> and also set breakpoint to (after ctrl-C in debugger terminal to stop
> application):
>   break nsExternalHelperAppService::LoadURI

Here it does break.


> You may try to go thru code lines to figure out what happened when calling
> g_app_info_launch_default_for_uri but try to do so only if you know what I'm
> talking about.

I don't know what you're talking about.  I would have had a look anyway but I'm running out of time nowadays.


> To be honest it looks like problem with your setup (you might changed some
> about:config parameters of thunderbird or some addon did that instead of
> you). 

I agree on that.  The bug here is that it is not straightforward to figure it out why it behaves so while it should be straightforward.


> You might try to test thunderbird with fresh profile.

Thanks for the suggestion (how did I not think about it myself earlier ?).  It does work with a fresh profile indeed.  I'll try to compare both setups when I find some time in the next days, I'll keep this report updated.

Comment 22 Skippy 2012-08-12 10:25:29 UTC
Ok, got it.  For some really strange reason (I don't remember having edited this file) I had this in the mimeTypes.rdf file :

  <RDF:Description RDF:about="urn:scheme:externalApplication:http"
                   NC:prettyName="firefox"
                   NC:path="/home/skippy/ /usr/bin/firefox" />

So removing the /home/skippy part of the path solves this issue.

I really don't understand how it happened : I don't remember having ever edited this file, but as there is no evidence other people experience the very same issue I guess it does not come from the Fedora upgrade — Martin's and William's observations seem to be different issues.

I thus close as NOTABUG, but maybe this indicates there is room for more transparency on the way thunderbird handles external applications.


Note You need to log in before you can comment on or make changes to this bug.