Intermittent browser_bug491431.js browser_privatebrowsing_windowtitle.js browser_bug565575.js browser_privatebrowsing_cookieacceptdialog.js browser_homeDrop.js browser_bug477014.js | NS_ERROR_FAILURE: Failure at chrome://browser/content/browser.js:6369

RESOLVED FIXED in Firefox 18

Status

()

Firefox
General
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: emorley, Assigned: Gavin)

Tracking

({intermittent-failure})

Trunk
Firefox 18
intermittent-failure
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox17 affected)

Details

Attachments

(1 attachment)

Rev3 Fedora 12 mozilla-inbound opt test mochitest-other on 2012-08-05 06:09:26 PDT for push b5b5fb7f05f2

slave: talos-r3-fed-025

https://tbpl.mozilla.org/php/getParsedLog.php?id=14143102&tree=Mozilla-Inbound

{
TEST-START | chrome://mochitests/content/browser/browser/base/content/test/browser_bug491431.js
TEST-PASS | chrome://mochitests/content/browser/browser/base/content/test/browser_bug491431.js | This was a normal tab close
TEST-INFO | chrome://mochitests/content/browser/browser/base/content/test/browser_bug491431.js | Console message: [JavaScript Error: "The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature." {file: "data:text/plain,test%20bug%20491431%20Page" line: 0}]
TEST-PASS | chrome://mochitests/content/browser/browser/base/content/test/browser_bug491431.js | This was a tab closed by moving
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/base/content/test/browser_bug491431.js | an unexpected uncaught JS exception reported through window.onerror - NS_ERROR_FAILURE: Failure arg 0 [nsIDOMPageTransitionEvent.originalTarget] at chrome://browser/content/browser.js:6341
Stack trace:
    JS frame :: chrome://mochikit/content/tests/SimpleTest/SimpleTest.js :: simpletestOnerror :: line 994
    native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
    native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0

TEST-INFO | chrome://mochitests/content/browser/browser/base/content/test/browser_bug491431.js | Console message: [JavaScript Error: "NS_ERROR_FAILURE: Failure arg 0 [nsIDOMPageTransitionEvent.originalTarget]" {file: "chrome://browser/content/browser.js" line: 6341}]
INFO TEST-END | chrome://mochitests/content/browser/browser/base/content/test/browser_bug491431.js | finished in 542ms
}
pageShowEventHandlers is called off of a timeout from a pageshow event handler. By the time that timeout runs, the document in question may have been closed, which might happen during browser_bug491431.js (which very quickly opens/closes a new tab). I imagine accessing event.originalTarget in that case is prevented by bug 695480.

I'm not sure what the best way to fix this is. The simplest solution may be to refactor browser_bugbug491431.js to only close the tab once its document's been loaded, or something, which might avoid this edge case entirely.
Thank you for taking an initial look at this so speedily :-)
Summary: Intermittent browser_bug491431.js | uncaught JS exception - NS_ERROR_FAILURE: Failure arg 0 [nsIDOMPageTransitionEvent.originalTarget] at chrome://browser/content/browser.js:6341 → Intermittent browser_bug491431.js or browser_privatebrowsing_windowtitle.js | uncaught JS exception - NS_ERROR_FAILURE: Failure arg 0 [nsIDOMPageTransitionEvent.originalTarget] at chrome://browser/content/browser.js:6341
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Summary: Intermittent browser_bug491431.js or browser_privatebrowsing_windowtitle.js | uncaught JS exception - NS_ERROR_FAILURE: Failure arg 0 [nsIDOMPageTransitionEvent.originalTarget] at chrome://browser/content/browser.js:6341 → Intermittent browser_bug491431.js or browser_privatebrowsing_windowtitle.js or browser_bug565575.js | uncaught JS exception - NS_ERROR_FAILURE: Failure arg 0 [nsIDOMPageTransitionEvent.originalTarget] at chrome://browser/content/browser.js:6341
Depends on: 782375
Duplicate of this bug: 778458
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #1)
> pageShowEventHandlers is called off of a timeout from a pageshow event
> handler. By the time that timeout runs, the document in question may have
> been closed, which might happen during browser_bug491431.js (which very
> quickly opens/closes a new tab). I imagine accessing event.originalTarget in
> that case is prevented by bug 695480.
> 
> I'm not sure what the best way to fix this is. The simplest solution may be
> to refactor browser_bugbug491431.js to only close the tab once its
> document's been loaded, or something, which might avoid this edge case
> entirely.

We could just catch the exception. It's an edge case, but it's not necessarily limited to tests.
Component: Tabbed Browser → General
Yeah, let's just do that.
Comment hidden (Treeherder Robot)

Updated

5 years ago
Assignee: nobody → dao
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86 → All
Comment hidden (Treeherder Robot)
I'm unable to reproduce this. I increased the timeout up to 10 seconds and closed the tab before it fired, but this didn't cause any trouble for pageShowEventHandlers... event.target kept pointing to the document.
Assignee: dao → nobody
Status: ASSIGNED → NEW
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)

Updated

5 years ago
Summary: Intermittent browser_bug491431.js or browser_privatebrowsing_windowtitle.js or browser_bug565575.js | uncaught JS exception - NS_ERROR_FAILURE: Failure arg 0 [nsIDOMPageTransitionEvent.originalTarget] at chrome://browser/content/browser.js:6341 → Intermittent browser_bug491431.js or browser_privatebrowsing_windowtitle.js or browser_bug565575.js or browser_privatebrowsing_cookieacceptdialog.js | uncaught JS exception - NS_ERROR_FAILURE: Failure at chrome://browser/content/browser.js:6369

Updated

5 years ago
Duplicate of this bug: 778116
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Blocks: 782673
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Depends on: 784792
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Created attachment 660352 [details] [diff] [review]
patch

See bug 784792 comment 12 and bug 786940 comment 3.
Attachment #660352 - Flags: review?(dao)

Updated

5 years ago
Attachment #660352 - Flags: review?(dao) → review+

Updated

5 years ago
Blocks: 786940
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb4045ed8776
Assignee: nobody → gavin.sharp
Target Milestone: --- → Firefox 18
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
https://hg.mozilla.org/mozilla-central/rev/cb4045ed8776
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)

Updated

5 years ago
Blocks: 742139
Could we take the patch to branches too, please.
It might fix Bug 786940.
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)

Updated

5 years ago
Summary: Intermittent browser_bug491431.js or browser_privatebrowsing_windowtitle.js or browser_bug565575.js or browser_privatebrowsing_cookieacceptdialog.js | uncaught JS exception - NS_ERROR_FAILURE: Failure at chrome://browser/content/browser.js:6369 → Intermittent browser_bug491431.js browser_privatebrowsing_windowtitle.js browser_bug565575.js browser_privatebrowsing_cookieacceptdialog.js browser_homeDrop.js browser_bug477014.js | NS_ERROR_FAILURE: Failure at chrome://browser/content/browser.js:6369

Updated

5 years ago
Duplicate of this bug: 777571
Comment hidden (Treeherder Robot)

Updated

5 years ago
Duplicate of this bug: 789915
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
https://hg.mozilla.org/releases/mozilla-beta/rev/100d3fb0ca0d
status-firefox17: --- → fixed
(In reply to Ed Morley [:edmorley UTC+1] from comment #193)
> https://hg.mozilla.org/releases/mozilla-beta/rev/100d3fb0ca0d

This isn't test-only. Please get this approved or backed out.
(In reply to Dão Gottwald [:dao] from comment #194)
> (In reply to Ed Morley [:edmorley UTC+1] from comment #193)
> > https://hg.mozilla.org/releases/mozilla-beta/rev/100d3fb0ca0d
> 
> This isn't test-only. Please get this approved or backed out.

Bah sorry I went through the patch queue vetting them all, missed that.
Backout:
https://hg.mozilla.org/releases/mozilla-beta/rev/560475ed1f92
status-firefox17: fixed → affected
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Keywords: intermittent-failure
Comment hidden (Treeherder Robot)
Whiteboard: [orange]
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Depends on: 847070
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
Comment hidden (Treeherder Robot)
You need to log in before you can comment on or make changes to this bug.