Bug 226837 - www/firefox: removing mimeTypes.rdf, handlers.json has no effect; reset core dumps
Summary: www/firefox: removing mimeTypes.rdf, handlers.json has no effect; reset core...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gecko mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-21 23:27 UTC by freebsd
Modified: 2018-03-22 05:04 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (gecko)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description freebsd 2018-03-21 23:27:42 UTC
Clicking a link to load a pdf file can bring up a dialog asking whether to save the file or open it with a particular program.

The last option under the "Open With" dropdown is "Other...".  If you click on "Other...", the "Choose Helper Application" dialog shows recommended programs with an option to "View all Applications".

If the list of applications is hosed, the recommended procedure is to remove / rename mimeTypes.rdb (some mention is also made about removing handlers.json) and then restarting.  Removing both of these files had no effect.

Upon restart, no new mimeTypes.rdf was created.  A new handlers.json was created with many fewer entries, but the "View all Applications" dialog still had the same trash in it.

In my case, not all applications were shown (in particular, xpdf was missing), and some are shown multiple times with differing labels or the same label.  Many applications are shown which are not listed in the set of helper applications shown in Preferences/General and are not even on this machine.

I have no idea where the list of applications is coming from; clearly not the applications in the firefox preferences.  It looks / feels like it is being retrieved from a firefox database or some other process.

When all else fails, the recommended procedure is to "Reset Firefox".
  https://support.mozilla.org/en-US/kb/refresh-firefox-reset-add-ons-and-settings

Attempting to do a reset caused firefox to crash and then start again; there was a .core file with the right timestamp in the home directory. The profile had been moved to a newly created ~/Desktop directory under the name "Old Firefox Data".

When firefox restarted, it had a new profile with restored user data.
There was no mimeTypes.rdf file; there was a new handlers.json.
The set of helper applications in preferences was minimal:
 rc, ircs, mailto, Podcast, PDF, Video Podcast, Web Feed, and webcal
I don't know if this is the proper set or not.
In any case, going to a site with a pdf and trying to choose a different application still shows the old set of garbled stuff.

A web site which worked to trigger this for me was:
  http://www.abbottinvestor.com/phoenix.zhtml?c=94004&p=irol-proxy
Go to the bottom of the page and click on "2018 PROXY STATEMENT"
but any pdf load will probably work if preferences say to ask.

I am running Xfce4; the dialog contains things like:
  "A Wine application"  (don't have wine anymore, did long ago)
  "Audacity"
  "Create Launcher on the panel"
  "File Manager"
  "Firefox"
  "Firefox Web Browser"
  "gimp"
  "GLiv Image Viewer" (twice)
  "hh"
...
  "Microsoft Access for Windows"  (a boatload of them; not on this machine)
  "Microsoft Excel for Windows"   (a boatload of them; not on this machine)
etc

My ports were completely rebuilt in a consistent manner about a week ago.

10.3-RELEASE-p24 FreeBSD 10.3-RELEASE-p24 #0: Wed Nov 15 04:57:40 UTC 2017     root@amd64-builder.daemonology.net:/usr/obj/usr/src/s
ys/GENERIC  amd64
Comment 1 freebsd 2018-03-22 00:46:56 UTC
The garbage in the Application Menu is apparently retrieved from some desktop information; editing 
  ~/.local/share/applications/mimeapps.list
and removing bogus entries gets rid of *some* of them.
However, there's nothing I've found that says that's what's supposed to happen or how to disable it.
The entries are also coming from someplace else, as I see two entries for gliv and it is not in mimeapps.list or handlers.json

BTW this is on ff 59.0
Comment 2 freebsd 2018-03-22 05:04:59 UTC
The remaining trash in the menu was due to global /usr/local/share/applications having some problems -- a duplicate entry installed by gliv (gliv.desktop and gnome-gliv.desktop); can't remember what else.

So fundamentally what's broken is:

1. The notion that you can mess with files in the firefox profile to clear
   up the application menu.
2. The set of potential applications displayed when editing preferences is not the full set used when downloading a file.
3. It crashed when trying to reset.