Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Invalid cookie hosts causes sessionstore to stop updating

VERIFIED FIXED in Firefox 7

Status

()

Firefox
Session Restore
VERIFIED FIXED
6 years ago
2 years ago

People

(Reporter: zpao, Assigned: zpao)

Tracking

({verified-aurora, verified-beta})

unspecified
Firefox 8
verified-aurora, verified-beta
Points:
---

Firefox Tracking Flags

(firefox7 fixed)

Details

(Whiteboard: [qa!])

Attachments

(1 attachment)

This is possibly the same cause as bug 601739, but it's a different error, so filing it separately.

Error: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsICookieManager2.getCookiesFromHost]"  nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: resource:///components/nsSessionStore.js :: <TOP_LEVEL> :: line 2205"  data: no]
Source File: resource:///components/nsSessionStore.js
Line: 2205

STR:
1. Go to www..emacs (this happened to be how I repro'd)
2. Go anywhere

2 might not even be necessary.

I guess www..emacs is in session history and somehow being used to get hosts. That's not a real host, so cookie svc says no.

So I'm putting this up to 2 choices:
1. Fix our host regex
2. Just try-catch getCookiesFromHost, discarding bad hosts
Created attachment 543272 [details] [diff] [review]
Patch v0.1

Took approach 2
Assignee: nobody → paul
Status: NEW → ASSIGNED
Attachment #543272 - Flags: review?(dietrich)
I looked at replacing the regexp with getting the scheme & host from the nsIURI, but that doesn't actually help. uri.host will still give www..emacs and we'd need to try-catch anyway.

(I'm thinking it might be good to use nsIURI in _serializeHistoryEntry and grabbing scheme & host there instead of execing regexps a lot and then creating an nsIURI for most of those anyway... filed bug 668865)
Comment on attachment 543272 [details] [diff] [review]
Patch v0.1

Review of attachment 543272 [details] [diff] [review]:
-----------------------------------------------------------------

if possible, would like to move the try/catch down closer to the bit that you know throws. r=me either way though.
Attachment #543272 - Flags: review?(dietrich) → review+
Moved the try-catch closer to failure.

http://hg.mozilla.org/integration/fx-team/rev/10044a48f896
Whiteboard: [fixed-in-fx-team]
http://hg.mozilla.org/mozilla-central/rev/10044a48f896
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 8

Updated

6 years ago
Blocks: 671520
Duplicate of this bug: 661481
Is there any way this could make it into the beta branch (Firefox 7)?
Comment on attachment 543272 [details] [diff] [review]
Patch v0.1

approval-beta? Safe patch that just wraps a potential error that causes session restore to stop saving state.
Attachment #543272 - Flags: approval-mozilla-beta?
Keywords: regressionwindow-wanted

Updated

6 years ago
Attachment #543272 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
http://hg.mozilla.org/releases/mozilla-beta/rev/4d360d0794dc
status-firefox7: --- → fixed
qa+ for verification in Firefox 7
Whiteboard: [qa+]
WINDOWS:
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:9.0a1) Gecko/20110922 Firefox/9.0a1
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a2) Gecko/20110914 Firefox/8.0a2
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0) Gecko/20100101 Firefox/7.0

LINUX:
Mozilla/5.0 (X11; Linux x86_64; rv:9.0a1) Gecko/20110922 Firefox/9.0a1
Mozilla/5.0 (X11; Linux x86_64; rv:8.0a2) Gecko/20110916 Firefox/8.0a2
Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20100101 Firefox/7.0

MAC:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:9.0a1) Gecko/20110922 Firefox/9.0a1
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0a2) Gecko/20110921 Firefox/8.0a2
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0) Gecko/20100101 Firefox/7.0

Verified on Win7/64bit, Ubuntu/64bit, Mac 10.6
Steps:
1. Go to emacs.com
2. Go to www..emacs
3. Open Error Console
Result: Error not displayed in error console.
Status: RESOLVED → VERIFIED
Keywords: verified-aurora, verified-beta
Whiteboard: [qa+] → [qa!]
Verified as fixed also on XP:
Mozilla/5.0 (Windows NT 5.1; rv:7.0) Gecko/20100101 Firefox/7.0
Keywords: regressionwindow-wanted
You need to log in before you can comment on or make changes to this bug.