Apple’s Worldwide Developers Conference to kick off June 10 at 10 a.m. PDT with Keynote address

The Keynote will be available to stream on apple.com, the Apple Developer app, the Apple TV app, and the Apple YouTube channel. On-demand playback will be available after the conclusion of the stream.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Safari losing cookies, forgetting logins

Suddenly Safari is losing all the logins for sites. Even though these sites have the 'remember me' boxes checked, every day I have to re-login to dozens of sites and forums. When this happens, before I start logging in, I check the cookies in prefs and there are zero cookies stored.

What's up with that?

15" MacBook Pro, Mac OS X (10.5.5)

Posted on Oct 14, 2008 4:12 AM

Reply
109 replies

Jan 29, 2009 2:23 AM in response to Christopher S.

I can confirm the problem is with DashboardClient. I used dtrace (and Instruments) to verify that the only processes that replace the file ~/Library/Cookies/Cookies.plist are DashboardClient and Safari.

I logged out (killing Dashboardclient), logged back in, cookies were ok (in Safari). Then started Dashboard, cookies gone. The trace indicates two instances of DashboardClient replacing Cookies.plist in that recent timeframe (I had two webclips).

Here is a sample of raw log file extracts (dtrace generated by Instruments Directory I/O instrument):

<e> -1 3 56001448 1233222301560891
rename
DashboardClient
/Users/michaelr/Library/Cookies/Cookies.plist tmp_23410.dat
/Users/michaelr/Library/Cookies/Cookies.plist
</e>
<s>

libSystem.B.dylib`rename+0xc
0x1001f80
CFNetwork`DiskCookieStorage::writeFileCompletely(__CFData const*)+0x14c
CFNetwork`DiskCookieStorage::syncStorageLocked(unsigned char)+0x2ac
CFNetwork`DiskCookieStorage::copyDomainCookiesLocked(__CFString const*, unsigned char)+0x34
CFNetwork`PrivateHTTPCookieStorage::copyDomainCookies(__CFString const*, unsigned char)+0x44
CFNetwork`HTTPCookieStorage::lookupAndCopyCookies(__CFString const*, __CFString const*, unsigned char, __CFArray*)+0x40
CFNetwork`HTTPCookieStorage::copyCookiesForURL(__CFURL const*, unsigned char)+0x104
CFNetwork`_CFHTTPCookieStorageCopyRequestHeaderFieldsForURL+0x7c
CFNetwork`HTTPProtocol::addCookies(__CFHTTPMessage*, _CFURLRequest const*)+0xcc
CFNetwork`HTTPProtocol::createStream()+0x27c
CFNetwork`HTTPProtocol::createAndOpenStream()+0x2a0
CFNetwork`URLConnectionLoader::loaderScheduleOriginLoad(_CFURLRequest const*)+0x15c
CFNetwork`URLConnectionLoader::LoaderConnectionEventQueue::processAllEventsAndCo nsumePayload(XConnectionEventInfo<XLoaderEvent, XLoaderEventParams>*, long)+0x13c
CFNetwork`URLConnectionLoader::processEvents()+0x64
CFNetwork`MultiplexerSource::perform()+0xac
CoreFoundation`CFRunLoopRunSpecific+0x454
Foundation`+[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]+0x11c
Foundation` _NSThread__main_+0x3f0
libSystem.B.dylib` pthreadstart+0x140
</s>

...snip...


<e> -1 3 56001448 1233222335418744
rename
DashboardClient
/Users/michaelr/Library/Cookies/Cookies.plist tmp_23410.dat
/Users/michaelr/Library/Cookies/Cookies.plist
</e>
<s>

libSystem.B.dylib`rename+0xc
0x1001f80
CFNetwork`DiskCookieStorage::writeFileCompletely(__CFData const*)+0x14c
CFNetwork`DiskCookieStorage::syncStorageLocked(unsigned char)+0x2ac
CFNetwork`PrivateHTTPCookieStorage::syncStorage()+0x38
CoreFoundation`CFRunLoopRunSpecific+0xb9c
Foundation`+[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]+0x11c
Foundation` _NSThread__main_+0x3f0
libSystem.B.dylib` pthreadstart+0x140
</s>

Jan 29, 2009 11:01 AM in response to David Bourne

Yes I had two webclips. I removed them both and the issue did not reoccur.

Again using Instruments Directory I/O I can confirm that DashboardClient does not touch ~/Libraries/Cookies/Cookies.plist unless there is at least one webclip in the Dashboard.

By killing the Dock I can confirm the replacement of Cookies.plist seems to only occur on startup of the Dock.

Jan 29, 2009 4:37 PM in response to bab

Here's what I did that has fixed it so far for me:
This is at 10.5.6 with Safari 3.2 (NOT 3.2.1)
1) Removed all webclips that could tamper with the cookies.plist file
- I had 1 webclip
2) Disabled my dashboard
3) Removed all chat applications (like Facebook chat ones) that could edit the cookies.plist file
4) Removed all third party addons from Safari
- Removed GreaseKit, SIMBL, etc.
5) Deleted the cookies.plist file and com.apple.safari.plist

Feb 3, 2009 7:12 PM in response to David Turley1

Along with everyone else, I keep losing my cookies, too. I upgraded to 10.5.6 about a week ago, which is when the obnoxious logging out started. As others have mentioned, it seems to be Safari only, Firefox is carrying on as normal, but I need both browsers on a daily basis. The disappearing cookies only happen after I use my Dashboard, though I do not have any web clips in use. Perplexing.

Safari losing cookies, forgetting logins

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.