Session not restored when Firefox is launched from an external program




9 years ago
9 years ago


(Reporter: graburn, Unassigned)


3.5 Branch
Windows Vista

Firefox Tracking Flags

(Not tracked)



(3 attachments)



9 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv: Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)

When Firefox has been exited and the Tabs have been saved, if Firefox is subsequently relaunched via a link in, say, an Outlook e-mail (possibly after a reboot), Firefox will open to the URL of the page clicked but all saved tabs will be lost.

Nor do they appear, I believe, in the Recently Closed Tabs list.

Reproducible: Sometimes

Steps to Reproduce:
1.Open several tabs in Firefox
2.Attempt Exit Firefox without closing the tabs.  Click "Save and Quit".
3.Reboot (not sure if this is required)
4.Click on a link in an e-mail (I use Outlook 2003 as an e-mail client) to launch Firefox
Actual Results:  
Firefox launches to the e-mail link's URL, but all supposedly "saved" tabs are gone.

Expected Results:  
Firefox should have behaved just as if it had been launched separately and _then_ an e-mail link selected.  That is:  "Saved" tabs should have been restored and the e-mail link URL should have opened in a separate tab.

I don't know if this is a new problem or whether it has been around for a long time, only that I'm noticing it more and more frequently.  It may be just that I'm getting more links in my e-mail these days.  

I love the Save Tab feature, but it's frustrating because I save the tabs because I'm not done with that page.  So when this happens, I have to look through my history and try to recall and recreate the tabs I had before I Saved them.


9 years ago
Does it also happen when you open an url shortcut from the desktop? In which folder Firefox is installed on your box?

I don't see this behavior. So can you please deactivate all installed extensions and try again? Eventually one of those could cause this behavior.
Version: unspecified → 3.5 Branch


9 years ago
Component: Tabbed Browser → Session Restore
QA Contact: tabbed.browser → session.restore
Summary: Saved tabs lost when selecting e-mail link → Saved session/tabs lost when Firefox is launched from an external program with a specific URL
Whiteboard: [worksforme?]

Comment 2

9 years ago
I have not figured out what is required to make this consistently reproducible.

I was able to reproduce it once today - but, like you, my other attempts did not reproduce the problem.

One thing I don't know whether has any relation to the problem:  In mornings and evenings I connect to the internet through AT&T DSL via my home D-Link wireless router, but during the day my laptop connects to the University of Georgia campus wireless network.  I will do some more experimentation tomorrow to see if maybe it has something to do with being unable to restore tabs which had been saved while I was on a different network.
Greg, please answer my questions and do the proposed steps from comment 1. Thanks.

Comment 4

9 years ago
Henrik, I do not know the answers to your questions without further testing.  As I said, as yet I cannot consistently reproduce the problem using strictly _my_own_ steps, let alone under the conditions you suggest:

a) I do not know if it happens when I open a URL from the desktop - because that is not a normal way I launch Firefox.  I suspect it will, but I do not know.  Therefore, I have created a URL on my desktop to test this and I will let you know as soon as I can make it occur with that method.

b) By "extensions," I asssume you mean "add-ons."  I only have 6 "add-ons" (Yahoo toolbar, Norton toolbar, Norton IPS, Microsoft Framework Assistant, Move Media Player, Image Viewer), but I have disabled them as you suggested.  That is what I will be testing today.  I will let you know what I discover.

Comment 5

9 years ago
After many attempts, I was able to make it occur again.  As all add-ons were disabled, I can confirm the add-ons are not responsible.  As I was connected to my home wireless network and have not rebooted, I can confirm that it is unrelated to rebooting or to different networks.  

As this time I reproduced it by clicking an e-mail link, I am still trying to confirm it occurs with a desktop link.

I still do not know what factors are required to make the issue consistently reproducible.  On this occasion, the laptop had been idle for a while before I clicked the link and Firefox was noticeably slow to launch; also, while it was launching, I also went and launched an instance of Internet Explorer in parallel.

Comment 6

9 years ago
And I see I overlooked another of your questions.  The folder in which Firefox is installed on my system is:

"C:\Program Files\Mozilla Firefox 3 Beta 4\firefox.exe"
If an instance of IE is opened in parallel too, something is wrong with your registry keys. That shouldn't happen. I would propose to re-set Firefox as your default browser.

Further please try to reproduce it with an URL located on the desktop.

Comment 8

9 years ago
No no, you misunderstand.  Firefox _is_ my default browser.  But occasionally I use both:  I manually launched IE in parallel while Firefox was loading.

Comment 9

9 years ago
... And I have not been able to reproduce it with a URL on the desktop.
No idea if this is eventually a DDE problem. Greg, do you have a chance to test the behavior with another application as Outlook? A non-Microsoft product would be fine. Like any chat client or Thunderbird as email client.

Comment 11

9 years ago
I will look into trying that.  Currently, Outlook is the only e-mail client installed.  

For what it's worth, every time I can recall reproducing the issue there has been some time pass since the previous time I launched Firefox (~20 min idle, hibernate, or reboot) and the exact URL link clicked has not been one I've ever visited before (because usually it appears in a new e-mail message which I select without thinking, before remembering, 'Oh no, I had tabs saved!'... and then they're gone).

(And Firefox usually takes a couple seconds longer launching, as though it's not in the frequently-used program cache any more.)

Comment 12

9 years ago
Are you sure the session store/tabs are lost?
What is the size of your sessionstore.js?

Comment 13

9 years ago
All I know is that when I Exit Firefox with multiple tabs open and it asks me, "Do you want Firefox to save your tabs for the next time that it starts?" and I click "Save and Quit," when Firefox is subsequently launched by clicking an e-mail link, it intermittently launches with only a _single_ tab (i.e., corresponding to the URL of the link clicked):  I.e., the saved tabs have been "forgotten."  At first I thought perhaps I was absently mistaking the "Close Tabs" popup with the "Save and Quit" popup, but I have satisfied myself that I have indeed been saving & quitting.

I did not even know of the existence of a sessionstore.js file, but I have looked it up and can report to you that the only file I've located thus far with a name like that is "nsSessionStore.js" and it is 104 KB.
(In reply to comment #13)
> I did not even know of the existence of a sessionstore.js file, but I have
> looked it up and can report to you that the only file I've located thus far
> with a name like that is "nsSessionStore.js" and it is 104 KB.

Please look in your profile folder for "sessionstore.js". as well as the link in comment #12 can help you locate the right folder. It should only take a minute and will help us diagnose the problem.

Comment 15

9 years ago
Oh, I see.  I found it:  sessionstore.js is currently 77 KB

Comment 16

9 years ago
Okay, it just occurred again!  I looked in the profile directory and:

sessionstore.bak = 99KB
sessionstore.js  = 2KB
The presence of sessionstore.bak implies that you crashed sometime recently. The difference in size implies that a new session was indeed started. Is there a significant difference in last modified time (eg, was sessionstore.bak modified 5 days ago--meaning you didn't crash recently--or was it today).

I can't reproduce this. Do you by chance have any extensions that might be contributing to the problem? (eg TabMixPlus)

Comment 18

9 years ago
That is interesting.  If any crashing is happening, it's doing so silently:  I am not getting a notification that any error or crash is going on.  

I've been watching those files the last couple of days and, while both sessionstore.bak and sessionstore.js are erased when I click "Close Tabs," it appears that _every_time_ I "Save and Quit" a new sessionstore.bak is created (but the size is usually identical to sessionstore.js). 

In fact, it just happened again:
sessionstore.bak 10/1/2009 6:31pm 86KB
sessionstore.js  10/1/2009 7:06pm 1KB

It could be I don't know what you mean by "extensions".  I like Firefox as it is, so I run it fairly clean.  If by "extensions" you mean what appear to be called "Add-ons" in my Tools menu, as I mentioned above, all I have installed are the following 6 things:  Yahoo Toolbar, Norton Toolbar, Norton IPS, Microsoft Framework Assistant, Move Media Player, and Image Viewer.  However, as I've also mentioned, I'm 90% certain that this issue has occurred even after disabling those add-ons.

Comment 19

9 years ago
After posting this, I did both a "Save and Quit" and "Close Tabs" to test and feel I should add a minor correction:

Minor correction - it appears sessionstore.bak is updated/created every time Firefox is _opened_ (versus closed) after a "Save and Quit".

But even so, I have never "lost" tabs from launching Firefox directly (which I typically do from the QuickLaunch menu); only when clicking on a link.
Yes, the .bak is always created to make sure we have a copy if your session gets lost. That way you can manually rename it from .bak to .js.

Greg, as you have said you weren't able to reproduce it by opening a link located on the desktop. Can you please test other applications except Outlook if those show the similar problem? You can take a messenger or check the about this program dialog in the help menu of most applications. There you should also find a link most of the times.

Comment 21

9 years ago
Okay, I will continue to try to reproduce the problem with non-email links.

But its funny you should say that about sessionstore.bak... last night I thought - Aha, this may be a way to restore my tabs, just by renaming the  sessionstore.bak.  You may find this interesting:

If I rename the .bak file to .js after a _successful_ "Save and Quit" - it does restore all the tabs (as expected).

But if I rename the .bak file to .js after my tabs have been lost - it again copies the .js file to .bak and loses all my tabs - even if I launch Firefox directly.  Thus, there is still no way to restore those tabs.

Sounds like sessionstore.js is getting corrupted?
It looks like. You could remove both files and start from scratch. Just open a couple of tabs with non-private data and close Firefox with saving the tabs. Backup the .js file before clicking a link in your email program. Now compare the .bak and the backuped .js. You can also attach both files on this bug if they show anomalies. Thanks.

Comment 23

9 years ago
I made a copy of sessionstore.js right before Saving & Exiting (I'll call it "BEFORE").
I made another copy after Saving & Exiting (I'll call it "AFTER").
When Firefox launched and the error occurred, I compared these files to sessionstore.bak.

sessionstore.bak is identical to "AFTER".
sessionstore.bak (and "AFTER") are different from "BEFORE."

I'll attach the Before & After files and you can study what the differences are (as they mean nothing to me).

Comment 24

9 years ago
Created attachment 404842 [details]
"BEFORE" (copy of sessionstore.js before Saving & Exiting)

Comment 25

9 years ago
Created attachment 404843 [details]
sessionstore.bak after the issue occurred

Comment 26

9 years ago
Created attachment 404844 [details]
"AFTER" (copy of sessionstore.js after Saving & Exiting)
(In reply to comment #23)
> sessionstore.bak is identical to "AFTER".

This is expected. The .bak is created at startup by copying sessionstore.js (I was wrong in comment #17)

> sessionstore.bak (and "AFTER") are different from "BEFORE."

This is expected. State & timestamp should be different.

> I'll attach the Before & After files and you can study what the differences are
> (as they mean nothing to me).

The only differences I'm seeing is that AFTER has updated the timestamp and set the state to stopped (expected), selectedWindow has changed, and a window has an updated title. Nothing that would indicate a problem.

Comment 28

9 years ago
And yet even though WinDiff tells me that "AFTER" and sessionstore.bak are identical, if I rename "sessionstore.bak" to "sessionstore.js" - the tabs will not be restored.  But with "AFTER" it works.

Comment 29

9 years ago
And yet if I rename "sessionstore.bak" to "sessionstore.js" - the tabs will
not be restored.

Comment 30

9 years ago
Argh, there's no way to delete comments?  Ignore comment #28 - it is incorrect.  Comment #29 is meant to replace it.

Comment 31

9 years ago
One more addendum:
Yes, I have confirmed it does also happen when opening an url shortcut from the desktop.  I just reproduced it.

As I alluded to above, a key to consistently (or at least frequently) reproducing the problem is that the URL must be one that has _never_ been visited before.  This is why it has been difficult to test:  I must wait until I receive a link in an e-mail I don't recognize as having visited.

Therefore, reproducing with a URL shortcut is even more difficult:  
I copy that e-mail URL and paste it into Internet Explorer (to avoid launching Firefox).  Then I drag the icon from IE to the desktop and then double-click it to launch Firefox (my default browser).  This is how I was able to reproduce the issue with a desktop shortcut.  Note that it is only a one-shot deal - now that the URL has been visited, it is unlikely to cause the issue if used again.
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.3a5pre) Gecko/20100412 Minefield/3.7a5pre

I cannot reproduce this on the latest nightly.  Resolving WORKSFORME.  Greg, if you can reproduce this on the latest nightly, please reopen with information about how you reproduced it.  Thanks.
Last Resolved: 9 years ago
Resolution: --- → WORKSFORME
Summary: Saved session/tabs lost when Firefox is launched from an external program with a specific URL → Session not restored when Firefox is launched from an external program
Whiteboard: [worksforme?]
You need to log in before you can comment on or make changes to this bug.