Closed Bug 165563 Opened 23 years ago Closed 23 years ago

Cookies are not saved when exiting Mozilla - requires relogon Bugzilla every browser start

Categories

(Core :: Networking: Cookies, defect, P2)

x86
All
defect

Tracking

()

VERIFIED FIXED
mozilla1.2beta

People

(Reporter: devin, Assigned: morse)

References

Details

(Keywords: regression)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020828 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020828 I just downloaded the Red Hat RPMs for build 2002082818 from ftp.mozilla.org (under nightly -> latest -> Red_Hat_7x_RPMS). Cookies are not working properly. They work until I quit Mozilla. When I run Moz again the cookies are all gone, nothing is lised under Preferences > Privacy & Security > Cookies > Manage Stored Cookies. If I go to a site that uses cookies the cookie is stored correctly but it only works until I quit Moz. I'm using a fresh profile that I just created when I installed Moz. Reproducible: Always Steps to Reproduce: 1. Open Moz. Go to www.deskmod.com and login. 2. Go to Preferences > Privacy & Security > Cookies > Manage Stored Cookies. Notice that your desk mod login cookies are listed (these steps work for any site that uses cookies). 3. Exit Moz. Restart Moz. 4. Go back to Manage Stored Cookies. Notice that the list is completely empty; your cookies are gone. 5. Cuss under your breath as you have to re-login to www.deskmod.com. Actual Results: Cookies were all erased sometime between exiting and restarting Mozilla. Expected Results: Retained the stored cookies.
Confirming on Linux 2002-08-30-05 and changing summary. All my old cookies work ok, the new cookies are the problem. To reproduce: 1. Log out of Bugzilla 2. Exit browser 3. Start browser 4. Goto http://bugzilla.mozilla.org/query.cgi Actual results: You've been logged out of bugzilla Expected results: Still logged in Bugzilla I can reproduce this also on www.kuro5hin.org. After logging out, loggin in only is remembered for the browsing session.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
Summary: Cookies are erased every time I run Mozilla - Linux build 2002082818 → Non-session cookies are regarded as session cookies - requires relogon Bugzilla every browser start
Better steps to reproduce: 1. Log out of Bugzilla 2. Check with Cookie Manager that the login cookie is gone 3. Login Bugzilla 4. Look with Cookie Manager for the login cookie -- the logon cookie is there and the expire time is around 2029 -- 5. Exit Mozilla 6. Start Mozilla 7. Look with Cookie Manager for the login cookie Expected results: Cookie is there Actual results: Cookie is not there Same steps can be used for www.kuro5hin.org
The regression is between the following builds: 2002-08-27-08-trunk: works 2002-08-27-21-trunk: fails
This regression is caused by bug 158216. See steps from comment 2. If I delete a cookie before closing Mozilla, the cookie is still remembered after exiting & starting Mozilla. I exit Mozilla usually by pressing CTRL-Q.
Summary: Non-session cookies are regarded as session cookies - requires relogon Bugzilla every browser start → Cookies are not saved when exiting Mozilla - requires relogon Bugzilla every browser start
Also on WinXP 2002-09-02-08. OS->All.
OS: Linux → All
This bug blocks the release of Mozilla 1.2alpha. Steve, we either need a quick fix (today) or we need to back out the changes from bug 158216
Blocks: 1.2a
Keywords: mozilla1.2
Don't think I haven't been working on it -- I have. But I've been blocked all day by a crash that I keep encountering when I shutdown the browser. It's at browser shutdown time that the cookies should be saved. I figured I had a bad build so I pulled a fresh tree and rebuilt. Also created a new profile. Same problem. I'm crashing if I simply log into bugzilla and then close the browser. I haven't opened a bug on the crash yet -- I want to get more information first.
Status: NEW → ASSIGNED
Priority: -- → P2
Target Milestone: --- → mozilla1.2beta
OK, here's the problem. Cookies are supposed to be saved when the browser closes down. Specifically, in nsCookieService.cpp we have: nsCookieService::~nsCookieService(void) { COOKIE_Write(); COOKIE_RemoveAll(); } Problem is the COOKIE_Write calls results in a call to NS_GetSpecialDirectory and the call is failing. It looks like the cookie module is being closed down too late, after the modules that it needs in order to do the write.
Hi ... I've got the same problem here, running Mozilla on Win2k SP3. I found out, that the exiration time is stored wrong. If I store a cookie right now for example (It's 05.09.02 02:13:30 for ma right now) and look up, when is expires then in the cookie-manager it reads, that the cookie will expire at 02:13:30 on Sep., the 5th, which means expiration at save time and cookies that are expired won't be save at shutdown. Yours, Christian Stadler
btw: Shouldn't the target milestone be mozilla1.2alpha and the severity be blocker? Sorry for Spam, but I wanted to add this.
morse, time has run out. Please back out the regression causing fix from bug 158216.
Offending part of patch for bug 158216 has been backed out. Closing this bug report and reopening that one.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
May I suggest saving the cookies on imminent-shutdown instead of when the service is terminated. At that point the system is still up. See my patch in bug 149764.
verified - 11/06/02 builds - winNT4, mac OSx, linux rh6 - confirmed with cookie manager that mozilla cookies are saved to disk. Logged out, closed mozilla, restarted and login cookie still present.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.