Open Bug 614182 Opened 14 years ago Updated 2 years ago

Firefox does not keep persistent cookies, it treats persistent cookies as a temporary. No other browsers have this issue. Newest build of Firefox treating all cookies as temporary.

Categories

(Firefox :: General, defect)

3.6 Branch
x86
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: cdkeers, Unassigned)

References

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12

In my case PHP was used to set a persistent cookie that lasts three to six months; Javascript could be used as well. Firefox does not keep this persistent cookie, it treats it as a temporary regardless of how Firefox's settings are configured. No other browsers or systems are having this issue, PHP (or Javascript) is not faulty, the cookie is being created right. The newest build of Firefox (3.6 through 3.6.12) seems to be treating all cookies as temporary and deleting them on session close.

Reproducible: Always

Steps to Reproduce:
[ Use newest build of Firefox - Issue noticed in 3.6.12 ]
1. Create two PHP pages in the same directory or site (cookie.php and test.php)
2. Use PHP to set a persistent cookie with a 3 month or longer expiration date and a simple value like "Hi!". Make sure the cookies path is set right, mine was in a site so its path was "/" to be effective for the whole site. Save this as cookie.php
3. Use PHP to echo or print out the the value of the cookie on the other page, test.php.
4. When the pages loads (Its PHP so it needs to be on a server) it should echo out the result.
5. Now exit your current session of Firefox, do not backup its files with any ad-ons.
6. Start a new Firefox session and ONLY open test.php, you will notice that the cookie was not saved as persistent and was treated as a temporary cookie. No message (The cookie value) will me seen since its been deleted.
Actual Results:  
Step 6 happened. Firefox removed/ deleted the persistent cookie like it was only a temporary, losing the data that was supposed to be stored when the user returned later in a new session.

Expected Results:  
Like all other browsers (IE, Opera, and Safari were used in this test) Firefox should have kept the persistent cookie and its data until is expiration date.
wfm with FF3.6.12 and SM trunk.
Do you use the private browsing mode or do you set to clear the cookies on exit ?

We would get millions of bug reports from people that are losing their logins if this would be a general problem.
You have something special on your system (addons/settings) or a special cookie.
There is not enough information in this report to find a reason.

I'm tempted to mark this report worksforme
(In reply to comment #1)
> wfm with FF3.6.12 and SM trunk.
> Do you use the private browsing mode or do you set to clear the cookies on exit
> ?
> 
> We would get millions of bug reports from people that are losing their logins
> if this would be a general problem.
> You have something special on your system (addons/settings) or a special
> cookie.
> There is not enough information in this report to find a reason.
> 
> I'm tempted to mark this report worksforme

No private browsing is not on and I've made sure that Firefox is not configured to clear cookies on exit. I have run into forums and blogs of other people having this issue and what I can come up with is this:

A) Since the latest update (3.6.12) Firefox is running into a cookie issue where every so often its corrupts the cookie or the cookie itself is mis-configured due to an unexpected shut down or browser close for example. Once this happens all cookies start being treated as temporary and the only given solution is to manually clear Firefox's cookie folder and .txt document. (Kind of annoying to have to keep doing that)

HERE are a few sites that the issue has been flagged in (Sorry I don't have time to add more right now):

1) http://forums.mozillazine.org/viewtopic.php?f=38&t=908625
2) http://mwolk.com/blog/firefox-not-saving-cookies/
(In reply to comment #1)
> wfm with FF3.6.12 and SM trunk.
> Do you use the private browsing mode or do you set to clear the cookies on exit
> ?
> 
> We would get millions of bug reports from people that are losing their logins
> if this would be a general problem.
> You have something special on your system (addons/settings) or a special
> cookie.
> There is not enough information in this report to find a reason.
> 
> I'm tempted to mark this report worksforme

Ok I've done some more researching (See my other comment on the bug report for the other half). It looks like its more of a case by case issue. I don't know if you could call it a bug. For some reason when a cookie becomes corrupted, either by Firefox or the users system it triggers this problem (Treating all cookies as temporary). So far from what I've seen you can not use Firefox's built in solutions such as "Clear Recent History" (And cookies)or ad-ons such as Web Developer to delete all cookies.

Once there is a corrupted cookie it seems that you have to manually go in and clear out Firefox's cookies. This is where my current issue now lies. Why is Firefox not removing these damaged cookies and fixing itself?

NOTE: It seems if you are using a backup system or ad-ons that backs up your Firefox, irregardless if your system is having this issue, the back up will fix the problem since it saves everything anyways. Meaning if you backup Firefox you won't notice this issue when you encounter a corrupt cookie.
Severity: major → normal
This can happen if the cookies sqlite database file is either write protected or damaged.
Many third party tools are offering to delete some cookies from Firefox database file. Those tools are known to break our database file sometimes.

> Why is Firefox not removing these damaged cookies and fixing itself?

The developer would need the cookie file to see how it's damaged and why that isn't detected or a cookie log. I assume that you have "fixed" the issue now which would mean that we can't find the reason ?
(In reply to comment #4)
> This can happen if the cookies sqlite database file is either write protected
> or damaged.
> Many third party tools are offering to delete some cookies from Firefox
> database file. Those tools are known to break our database file sometimes.
> 
> > Why is Firefox not removing these damaged cookies and fixing itself?
> 
> The developer would need the cookie file to see how it's damaged and why that
> isn't detected or a cookie log. I assume that you have "fixed" the issue now
> which would mean that we can't find the reason ?

Yes I followed the instructions on this site [ http://mwolk.com/blog/firefox-not-saving-cookies/ ] and it fixed the issue for me. Why specifically did Firefox not resolve the issue on its own, for example removing it if it wasn't working properly/ damaged (even third party tools seemed to miss it?) I don't know.

How the error happened I know completely. I crashed Firefox testing out a e-commerce site I'm developing. It was a messed up loop that caused the crash and during or previously to the loop I had created a cookie, hence the reason the "bug" happened to me. Why this seems to be popping up every so often in other cases i don't know (See the links in comment 2).
See Also: → 495792
Version: unspecified → 3.6 Branch
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.