Last Comment Bug 733651 - Snippet fails to load on about:home due to XMLHttpRequest.open error
: Snippet fails to load on about:home due to XMLHttpRequest.open error
Status: RESOLVED FIXED
[about-home][qa-]
:
Product: Firefox
Classification: Client Software
Component: General (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Firefox 14
Assigned To: Frank Yan (:fryn)
:
Mentors:
about:home
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-06 19:01 PST by Frank Yan (:fryn)
Modified: 2012-05-30 02:58 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed


Attachments
workaround to ensure that at least the default snippets load (1.50 KB, patch)
2012-03-06 19:14 PST, Frank Yan (:fryn)
mak77: review+
Details | Diff | Splinter Review

Description Frank Yan (:fryn) 2012-03-06 19:01:03 PST
Steps to reproduce:

1. Open Firefox so that about:home is the page immediately loaded and the update branch is taken in the function loadSnippets(). (This can artificially be induced by setting window.localStorage["snippets-last-update"] to 0 and then restarting Firefox without session restore enabled.)
2. No snippet appears, because the following exception is thrown:

Error: uncaught exception: [Exception... "Component returned failure code: 0x805e0006 [nsIXMLHttpRequest.open]"  nsresult: "0x805e0006 (<unknown>)"  location: "JS frame :: chrome://browser/content/abouthome/aboutHome.js :: loadSnippets :: line 223"  data: no]

I'm not exactly sure why this happens, but since it corrects itself upon a reload, my guess is that the XMLHttpRequest cannot be properly initialized.

This happens already on about:home in Firefox stable and is not due to the new visual refresh code.
Comment 1 Frank Yan (:fryn) 2012-03-06 19:14:49 PST
Created attachment 603582 [details] [diff] [review]
workaround to ensure that at least the default snippets load

Here's a workaround to ensure that at least the default snippets load.

We should still investigate why XMLHttpRequest.open throws.
Comment 2 Marco Bonardo [::mak] 2012-03-14 15:23:37 PDT
Comment on attachment 603582 [details] [diff] [review]
workaround to ensure that at least the default snippets load

please file a follow-up to investigate reasons for the exception and add a comment there pointing to that bug.
Comment 3 Frank Yan (:fryn) 2012-03-14 16:31:11 PDT
Pushed to fx-team:
https://hg.mozilla.org/integration/fx-team/rev/63612df32193

Filing followup next.
Comment 4 Marco Bonardo [::mak] 2012-03-16 02:52:50 PDT
https://hg.mozilla.org/mozilla-central/rev/63612df32193

backported with bug 711157
Comment 5 Ioana (away) 2012-05-30 02:40:46 PDT
Mozilla/5.0 (Windows NT 6.1; rv:13.0) Gecko/20100101 Firefox/13.0
BuildID: 20120528154913

I evaluated window.localStorage["snippets-last-update"]=0; in the Error Console and restarted Firefox. I didn't get the error from comment 0, but I got:

Error: self._interfaceBuilder is undefined
Source File: resource://testpilot/modules/setup.js
Line: 260 

Frank, is that ok or should I set window.localStorage["snippets-last-update"] to 0 some other way?
Comment 6 Ioana (away) 2012-05-30 02:48:12 PDT
Regarding my previous message, when evaluating window.localStorage["snippets-last-update"]=0; in the Error Console, I get the following error:

Error: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMWindow.localStorage]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: javascript:%20window.localStorage["snippets-last-update"]=0; :: <TOP_LEVEL> :: line 1"  data: no]
Comment 7 Frank Yan (:fryn) 2012-05-30 02:58:28 PDT
(In reply to Ioana Budnar [QA] from comment #6)

This bug doesn't need further verification.
Thanks.

Note You need to log in before you can comment on or make changes to this bug.