Open Group of Bookmarks in tabs partially fails if local file missing




Bookmarks & History
13 years ago
9 years ago


(Reporter: greg crichton, Assigned: Martijn Wargers (zombie))


Firefox Tracking Flags

(Not tracked)



(1 attachment, 2 obsolete attachments)



13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+

When opening a group of bookmarks in tabs (from Bookmarks-> Open in Tabs) it
will fail to open any bookmarks in the list if they are after a missing local file.
No tab or bookmark extensions are installed.

Reproducible: Always

Steps to Reproduce:
1. Make a group of bookmarks, which includes at least one local file (e.g.
file:///C:/test.html) which is inbetween normal external url tabs.
2. close browser and move/rename local file.
3. restart browser, select bookmark group from menu and then Open in Tabs

Actual Results:  
Tabs are opened as expected, in order, up to the missing local file. A tab is
opened with "File Not Found Error" as expected.
However, no subsequent tabs from the group are then opened.

I.E. A group consisting of links to:

where file.html is removed and the browser restarted.
will open the first three tabs, giving an not found error for file.html, will
not open the forth tab (or any after it)

Expected Results:  
Opened all tabs, displaying errors for missing pages, including subsequent ones
in the group.

Comment 1

13 years ago
confirmed with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4)
Gecko/20050715 Firefox/1.0+
Ever confirmed: true

Comment 2

13 years ago
I'm getting an error message in the js console:
Error: uncaught exception: [Exception... "Component returned failure code:
0x80520012 (NS_ERROR_FILE_NOT_FOUND) [nsIWebNavigation.loadURI]"  nsresult:
"0x80520012 (NS_ERROR_FILE_NOT_FOUND)"  location: "JS frame ::
chrome://global/content/bindings/browser.xml :: loadURIWithFlags :: line 170" 
data: no]
Probably putting it in a try..catch would solve the bug, but I'm not sure if
that's allowed there.

Comment 3

13 years ago
Created attachment 189474 [details] [diff] [review]

Like this, this fixes it, but there is a comment in this function in
<!-- throws exception for unknown schemes -->

So it could be perhaps it should raise an exception here for a reason?
Attachment #189474 - Flags: review?(
Right, that comment is there because this was done on purpose. This should be
put in a try/catch block where it's called from bookmarks code (something like
in bug 245588), not changed globally for the bindings themselves.

So if I'm not mistaken, this should probably go at


13 years ago
Attachment #189474 - Flags: review?(

Comment 5

13 years ago
Created attachment 189486 [details] [diff] [review]

Thanks for the info, Gavin.
This seems to make it work. This is a Firefox only patch.
I'll attach a Seamonkey patch (I haven't testest the Seamonkey patch).
Attachment #189474 - Attachment is obsolete: true
Attachment #189486 - Flags: review?(mconnor)

Comment 6

13 years ago
Created attachment 189487 [details] [diff] [review]
seamonkey patch

So I guess this is what has to be done for Seamonkey (I haven't tested this).

Comment 7

13 years ago
(In reply to comment #6)
>Created an attachment (id=189487)
>seamonkey patch
>So I guess this is what has to be done for Seamonkey (I haven't tested this).
No, that won't work at all, it seems that each caller of addTab (except for
trivial cases such as about:blank) needs to have try/catch guards. I wondered
about this when the open links in new tab code was written and at the time DanM
said he didn't want to change the behaviour of addTab so he worked around it.


13 years ago
Attachment #189487 - Attachment is obsolete: true

Comment 8

13 years ago
this patch not fix the bug if user open one bookmark with invalid link to a local file.(if the file not exist) 
you need to patch openOneBookmark function or openUILinkIn....

but i thing it's better to check if url start with "file:/" and then test if the file exist befor we try to load it. if the file not exist show the message "File not Found"

Comment 9

13 years ago
I can reproduce with recent Linux trunk build.

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20051204 Firefox/1.6a1
OS: Windows XP → All


12 years ago
Assignee: nobody → martijn.martijn

Comment 10

12 years ago
I find that it doesn't matter where the local file is positioned.  After failing to load, if I try to load the group of tabs again, they will all load successfully (except the bad local file link).  This loading twice behavior was reproduced with the local file in diff places as well as with several different tab groupings.


11 years ago
Attachment #189486 - Flags: review?(mconnor)
i doubt this is valid for 3.x, moreover bug 356571 has fixed the invalid uri case
i'm solving this as WFM, if you can still reproduce please post updated STRs for current trunk/branch.
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.