file:/// urls won't load

Bug reports and enhancement requests
Post Reply
d_a
Posts: 4
Joined: Mon May 14, 2012 7:01 pm

file:/// urls won't load

Post by d_a »

SInce the nightly of January 5th I've been unable to load file:/// urls. Disabling NoScript makes loading of file:/// urls possible again. Only error I get in the console is the following: Component returned failure code: 0x805e0007 [nsIWebNavigation.loadURIWithOptions]. Searching the error on Google turned up the following result: https://translate.google.com/translate? ... edit-text=. Seems to be the same issue I have.

Stack trace from that user, I haven't been able to get one myself:

Code: Select all

_loadURIWithFlags chrome://browser/content/browser.js: 807: 7
LoadURIWithFlags chrome://browser/content/tabbrowser.xml: 7064: 13
LoadURIWithFlags chrome://browser/content/tabbrowser.xml: 4181: 20
NoscriptBM.init / noscriptBM.handleURLBarCommandOriginal chrome://noscript/content/noscriptBM.js: 95: 60
NoscriptBM.loadURIWithFlags chrome://noscript/content/noscriptBM.js: 59: 12
OpenLinkIn chrome://browser/content/utilityOverlay.js: 360: 5
OpenUILinkIn chrome://browser/content/utilityOverlay.js: 197: 3
FpCallback_done chrome://browser/content/browser.js: 2004: 9
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/20100101 Firefox/54.0
undefined
Posts: 5
Joined: Fri Apr 21, 2017 3:16 pm

Re: file:/// urls won't load

Post by undefined »

firefox 53
noscript 5.0.2
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0

unexpected behavior: if noscript is installed with "Allow local links" enabled (ie No Options -> Advanced -> Trusted -> Additional permissions for trusted sites -> Allow local links), then file:// urls do not load, or better phrased, won't even register a response from firefox. if you type "file:///" into the address bar, then upon pressing enter or clicking the "->" icon at the end of the address bar the address bar immediate reverts to "Search or enter address" and the web page remains unchanged (ie displays whatever was displayed previously, whether an actual web page or the start page). the behavior is the same for dragging-and-dropping html files from another application to the browser.

expected behavior: firefox acknowledges and loads web pages stored on the system's filesystem (ie file://).

the behavior changed upon installing the firefox 53 ubuntu security update yesterday. i can correlate it to this event because my email application uses firefox to render html emails, which i receive and view throughout the day, and upon upgrading to firefox 53 that stopped working (because the email application saves the html mime attachments to a temporary file and calls firefox against that using "file://...").

i traced it down to the "Allow local links" option by creating a new firefox profile, installing noscript from addons.mozilla.org, and manually recreating my noscript configuration until it broke with "Allow local links" enabled. I verified that the problem is only "Allow local links" (at least with the default noscript configuration, not in conjunction with my custom noscript configuration) by creating a new firefox profile, installing noscript, and recreating the issue by only changing the default noscript configuration by enabling "Allow local links".

i'm confused why enabling "Allow local links", which is an "Additional permission for trusted sites", would cause "file://" urls to not load. i would expect the issue to be the opposite: "file://" urls only load if "Allow local links" is enabled (not that that behavior is correct either, as user-originated "file://" references are not "links" though maybe they are now treated similarly due to internal firefox changes, but at least closer to the expected behavior).
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
undefined
Posts: 5
Joined: Fri Apr 21, 2017 3:16 pm

Re: file:/// urls won't load

Post by undefined »

i just verified the problem i describe is also present with NoScript 5.0.3rc5.

i'm not sure how to provide any more information as the firefox browser console shows nothing upon entering "file:///" (unless i enable css reflows logging, but that only displays "function _loadURL, urlbarBindings.xml line 578", which doesn't look associated with noscript), nor do any of the developer tools (eg webconsole, javascript debugger).

the problem is easy for me to recreate (as documented in my comment), so if there's anything more i can do, then please just ask. for now i've disabled "Allow local links" for trusted sites (so as to be able to load "file://" urls, ie view html email) as it was only required for a self-hosted app or two that i haven't used in years (if i remember correctly).
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
undefined
Posts: 5
Joined: Fri Apr 21, 2017 3:16 pm

Re: file:/// urls won't load

Post by undefined »

so the problem is caused by the "Ubuntu Modifications" extension (whatever that does).

after disabling the "Ubuntu Modifications" extension (and restarting firefox), then enabling "Allow local links" in noscript does not prevent "file://" urls to be recognized and loaded.

i'm not sure what the "Ubuntu Modifications" extension does nor why it is conflicting with noscript, but the expected behavior returns when disabling it.

hopefully this will help others who encounter this problem (as ubuntu's firefox 53 package is installed by users).

the next logical step is reporting this bug to ubuntu (ie launchpad), but this issue has taken enough of my time, so i'll defer that privilege to someone else.
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:53.0) Gecko/20100101 Firefox/53.0
barbaz
Senior Member
Posts: 10834
Joined: Sat Aug 03, 2013 5:45 pm

Re: file:/// urls won't load

Post by barbaz »

@undefined: Nice troubleshooting, but I doubt this issue is specific to Ubuntu Modifications. Some Windows users have the same problem - viewtopic.php?f=7&t=22761
*Always* check the changelogs BEFORE updating that important software!
-
steve2001
Posts: 1
Joined: Sun Apr 30, 2017 3:45 am

Re: file:/// urls won't load

Post by steve2001 »

It appears that the functionality of the NoScript Options -> Advanced -> Trusted -> Checkbox for 'Allow Local Links' is inverted.

Selection the checkbox to ON does not in fact perform that. The checkbox must be selected to OFF to allow the listed functionality.

This is likely the result of a fat finger error when typing the appropriate line of code. (At least this is how it often happens to me.) ;)

I hope that this observation helps.

.../Steve
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Post Reply