Closed Bug 437280 Opened 16 years ago Closed 14 years ago

Cookies not reloaded after browser restart / Cookies lost on browser close

Categories

(Firefox :: General, defect)

3.0 Branch
x86
Windows Vista
defect
Not set
major

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: mattjewell, Unassigned)

Details

(Whiteboard: [CLOSEME 2010-10-01])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008051206 Firefox/3.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9) Gecko/2008051206 Firefox/3.0

My installation appears to loose cookies every time it is closed. I have the option to do this turned off (i.e. set to keep until expire) and cookies are begin accepted as demonstrated by the fact they appear in the show cookies dialogue before the browser is closed. After it is closed and then opened again the cookies are lost. This happens every time.

I have tried reinstalling the browser (three times), which has not worked. Reverting back to FF2 did however solve the problem but once FF3 was installed it begins again.

Reproducible: Always

Steps to Reproduce:
1. Open browser
2. Store cookie (e.g. log into a site)
3. Restart browser
4. Re-visit the site / go to show cookies.
Yeah, I'm seeing this, too, although not every time.  I haven't been able to isolate the circumstances, but FF3 on a Vista system is sometimes removing all my cookies when I close it.

I'm using the "keep until I close firefox" setting, with a lengthy exception list of sites whose cookies I want retained.  Several times now, I've had to relogin to sites on the exception list, and found that all cookies, including the exception sites, were apparently zapped on the last close.  My settings were working fine in FF2.
OK.  I have a specific case - you may want to consider this a separate bug.  It's removing all your cookies when you switch over to a proxy, such as enabling Tor.  FF2 didn't do this.  This means you can't maintain a cookie login to a place that you want to enter via an anonymous proxy which you activate on the fly.
I'm wondering if this is related to what I'm seeing.  Every now and then I lose cookies to many sites.  When I check the cookies after they are set, they are usually set to expire months from now, yet they seem to expire in days or weeks. I've even frequently lose my Google cookie which is set to expire years from now.

This isn't something that's reproducible and it doesn't happen after every browser close or restart, but it started happening periodically on a number of different machines after upgrading to Firefox 3.0.
I had the exact same problem on Windows XP, after closing and starting FF3+ it lost all cookies, so I had to constantly login to all websites/forums/boards...

Deleting the cookies.sqlite file from my profile did the job. Now everything works fine.

I guess after a crash the cookies.sqlite file got corrupted?
(In reply to comment #4)
> I had the exact same problem on Windows XP, after closing and starting FF3+ it
> lost all cookies, so I had to constantly login to all websites/forums/boards...
> 
> Deleting the cookies.sqlite file from my profile did the job. Now everything
> works fine.
> 
> I guess after a crash the cookies.sqlite file got corrupted?
(In reply to comment #5)
> (In reply to comment #4)
> > I had the exact same problem on Windows XP, after closing and starting FF3+ it
> > lost all cookies, so I had to constantly login to all websites/forums/boards...
> > 
> > Deleting the cookies.sqlite file from my profile did the job. Now everything
> > works fine.
> > 
> > I guess after a crash the cookies.sqlite file got corrupted?

sorry for the double where can u file that file at ?
cookies.sqlite is located in your profile directory which you can find at this location (Windows):

"C:\Documents and Settings\YOUR_WINDOWS_USER_NAME\Application Data\Mozilla\"

look for the profile directory and click through until you see the file.
The only case I'm seeing is the proxy thing I mentioned, and it has nothing to do with corruption of the cookies.sqlite file.  If you turn on a proxy, say by enabling Tor, all cookies are immediately gone from the Options -> Privacy -> Show Cookies listing.  Now that I know about it, my workaround, in fact, is to copy the cookies.sqlite file before tuning on Tor, so that I can restore them.

There's another cookie issue with it as well - when Tor is disabled again, it's resetting my "keep cookies until I exit Firefox" selection to "keep until they expire".  This means that I start accumulating all the garbage ad cookies permanently in cookies.sqlite, as well as the exception list of sites whose logins I want to keep.  Since changing that setting back again doesn't seem to remove all the useless cookies, I then have to either remove them all and relogin everywhere, or manually go through the list and remove unwanted cookies.

As I said, this may be a separate bug from these other cases.
(In reply to comment #4)
I don't use any proxies or this "Tor" add-on and experienced the problem.

I use the following add-ons:
DownloadHelper 3.2
Foxmarks Bookmark Synchronizer 2.1.0.12
Linky 2.7.1
NewsFox 1.0.3.1
Web Developer 1.1.6

I used them for quite a while I think it's HIGHLY unlikely that the add-ons are responsible for this problem with lost cookies.
I have the same problem.... anytime I restart the browser, the cookies are
deleted... and, no, I too did not set it up to delete the cookies upon browser
close.... I start the browser in  safe mode by checking all the boxes (disbling
all of them) and visit a few sites, close and I restart in safe mode again
disabling everything -- -the cookies are deleted..... the only thing that was
successful is uninstalling the firefox, deleting everything  and reinstalling
it... it works but I have to return to all addons and settings et as I have
relatively a large custumization and I do not want to set it up... I go back
and reinstall all settings by mozbacup..... and the cookies are deleted when
closing the browser.... How can I solve this and why safe mode does not work
while uninstalling and deleting works to solve this problem?... I disable all
addons reset all settings toolbars, everything else in the safe mode start, and
visit a few sites and close, then restart in safe mode again ---- then again
deletes all cookies.... how cn I solve this without deleting my addons ,
settings, all customization?
Same problem here with Firefox 3.0.2 on Fedora 5
Plug-ins -- Adblock, Noscript, SwitchProxy, Firebug, GreaseMonkey.

I double-checked my settings and exceptions.  My cookies, specifically google.com PREF, are gone upon restarting firefox.

Tried deleting the cookies.sqlite file, but upon restarting firefox, the cookies were gone and the cookies.sqlite file was back.
This problem can be caused by a number of things.  Some add-ons can corrupt the
cookies.sqlite file.  Certain, unnamed websites might send an intentional bug
that causes this problem.  I experienced this problem shortly after my last
FireFox update to 3.0.3.

Here is how you solve this problem:

1.  Win. XP:

Go to Start >>> Run A dialog box comes up.  Enter "C:\Program Files\Mozilla
Firefox\firefox.exe -P".  Make sure you have the "-P" option.

Vista:

Go to Start menu, and on the "Start Search" bar, type "Run" and press enter.  A
dialog box comes up.  Enter "C:\Program Files\Mozilla Firefox\firefox.exe -P". 
Make sure you have the "-P" option.

2.  Create a new profile, with a different name from "default user" or the one
you were using before.  Press OK.  You will no longer have any problems with
cookies.

3.  All of your preferences and add-ons/extensions will be lost, because you
are creating a new profile.  First go through and fix all your preferences.

4.  Add one extension or add-on at a time, checking your log-in saving ability
each time by closing and restarting FireFox and going to a log-in that normally
saves your computer, such as Yahoo! Mail.

5.  If the problem occurs again after installing one of the add-ons, go through
this process again and do not install that add-on.

6.  Be a good sport and report that add-on to Mozilla and the add-on company.

Good Luck.
I have seen this error, too, on XP2 with FF3.0.5.

This behaviour has persisted through various updates.  And I wonder if it is, by genesis, related to the removal of the ability to block a cookie when deleting it, an ability that used to exist in earlier versions of FF.  I also wonder if the state of the exit-behavior check and drop down boxes are misread?  Perhaps a search of all users of this state variable in the software is called for [wish I knew how, else I would do it.]

---

I notice this, while looking for the SQLite file identified:  There is another, huge file in the same directory, called Places.Sqlite, which is shown as 48,000kB.  This strikes me as odd, and I wonder if its size has anything to do with crashes I constantly get, lately, or this cookie issue.   What does this file do and why is it so big?

---

Before I delete the cookies.sqlite file, can someone tell me what it does?  will it impact any passwords I've saved on FF?  Before I delete it, I wold want to "recover" them all manually to paper...
I have this problem also.  It won't save cookies after closing, so websites I want to stay logged in at are gone. 

Something I noticed is I do not have the cookies.sqlite file at all.
I also lose cookies after a session, every time I close Firefox 3.0.9 running on Ubuntu Linux 8.10. This is on an Acer Aspire 5100 laptop. I have "keep until they expire" turned on. I am not sure what add-ons or plug-ins might cause this, but I only use the basic ones. Also, I cannot find any cookies.sqlite file on my system either.

My Dell desktop does not have this problem. When I close Firefox, the cookies are saved.
yes. too much time passed since this problem happened to me. I do not exactly remember how I solved this but as I remember found the cookies.sqlite solution here. First, just as you did, I was unable to find the cookies.sqlite file but then later I went to the settings of the windows explorer and selected "show hidden files and folders", searched it on the drive, found it and deleted. Thats how I guess I overcame it.
Firefox still will not save cookies in spite of having "keep until they expire" turned on.

This problem is on a Linux system. There are many sqlite files on this computer, but there is no "cookies.sqlite" file existing on the system.

Another computer I have, a Windows XP system, does store cookies from the same site. Only my Linux system does not store cookies after I exit Firefox. Since the Linux is the computer I use most often, I would really like to get it working. The cookies store some important data which tracks progress and so on through the educational site.

Is the file that causes trouble on the Linux (Ubuntu) system called something other than "cookies.sqlite"? Does anyone know?
Reporter, are you still seeing this issue with Firefox 3.6.9 or later in safe mode? If not, please close. These links can help you in your testing.
http://support.mozilla.com/kb/Safe+Mode
http://support.mozilla.com/kb/Managing+profiles
Whiteboard: [CLOSEME 2010-10-01]
Version: unspecified → 3.0 Branch
I haven't had trouble with this issue. -> can be closed.
No reply, INCOMPLETE. Please retest with Firefox 3.6.10 or later and a new profile (http://support.mozilla.com/kb/Managing+profiles). If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.