Firefox URL handler does nothing

Hi.

Clicking on download links attempts to open the file with “Url Handler Script”, but this does nothing and provides no feedback; not even an error message.

I get the following message in my system log:

May 8 22:17:16 localhost firefox_firefox.desktop[26395]: user-open error: no such file or directory

Any ideas what it is trying to do so I can diagnose this further? There seem to be two bugs, that “Url Handler Script” is failing to do anything useful, and that the failure is not being reported back to Firefox or is being ignored.

1 Like

Can you elaborate on what you are trying to do exactly, and which versions of the core snap and firefox snap you are running, on which distribution?

I am able to download files from web pages and open them from the firefox snap (59.0.2-1 from the stable channel, on Ubuntu 18.04).

I am running both core and firefox from stable. Yes, I know it normally works as it should, as I can create a clean user, login, and things work fine. It is something to do with my primary account’s setup. But I don’t know what, as I have no idea what firefox is doing when it hands something off to “Url Handler Script”. I assume this is some helper somewhere that sneaks the URL out of containment via DBUS or some interface, but I can’t find any useful info to help me diagnose where things are failing or why Firefox is unaware that things are failing. The only feedback is the message in system.log, which is only helpful at pointing me to something inside the snap (so some setting in my Firefox profile, which I pulled in from from the non-snap install).

If it is unclear, this is any time Firefox needs to hand things off to an external process, such as clicking a PDF link. Firefox gives me the choice to save it, or hand it off to something else, and that something else is “Url Handler Script”.

Ah, I see what you mean now. Note that a link to a PDF should open and render the PDF directly in firefox, so that’s probably not a good example (if it doesn’t, it’s a separate issue).

I am able to reproduce the issue if I click on a link to e.g. a doc file. Opening the file with the default “Url Handler Script” results in “user-open error: no such file or directory”.

If I select a different application (e.g. libreoffice writer, I think this requires the libreoffice snap to be installed), the file doesn’t open either, but the error is different: “/usr/bin/env: ‘/tmp/mozilla_osomon0/sample-1.doc’: Permission denied”. This is a different issue that is being discussed in another thread.

I filed bug 1461759 to track the issue upstream.

The main problem of Firefox installed using snap is that you can make Firefox interact with other apps in Ubuntu. When opening a special extension a contextual window ask What should Firefox do with this file?
With snap installation of Firefox only one option is possible Url File Handler. You can say to snap Firefox to open another application to execute the file.

Example 1: in case I download a .zip file into FF contextual menu should propose as an option for open with archive Manager (built-in app)

Example 2: in case I download a .doc file into FF contextual menu should propose as an option for open with OpenOffice or default editor (2 differents app)

As a demonstration I removed snap installation of Firefox and installed it with apt-get: I have no longer the problem.

By the way, If you look at the report bug, the Mozilla teal report seems to close this issue saying that this is a snap problem: snap should be able to run other snap package inside.

Just to keep this issue fresh and clearer, has I had the same problem and try to figure out…

It’s possible that setting TMPDIR in snapcraft.yaml or inside desktop-launcher to something other than /tmp like TMPDIR=$SNAP_USER_DATA would fix this issue.