JavaScript exception (NS_ERROR_FAILURE) [nsIDOMScreen.width] due to blocking/hiding ads

RESOLVED WORKSFORME

Status

()

Core
DOM: Core & HTML
RESOLVED WORKSFORME
13 years ago
10 years ago

People

(Reporter: IU, Unassigned)

Tracking

1.8 Branch
x86
Windows XP
Points:
---
Bug Flags:
blocking1.8.1 -

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5

At www.betanews.com, the following exception gets thrown for the attached JavaScript file (taken from their website):

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMScreen.width]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: http://a.as-us.falkag.net/dat/dlv/aslmain.js :: QQgD :: line 31"  data: no]


Reproducible: Always

Steps to Reproduce:
1. You may or may not be able to reproduce it when you visit the Betanews site, as context is subject to change.
2.
3.

Actual Results:  
Exception is thrown

Expected Results:  
No exception is thrown, I suppose.
(Reporter)

Comment 1

13 years ago
Created attachment 210092 [details]
JavaScript file that causes the exception

Comment 2

13 years ago
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060126 Firefox/1.6a1

I'm not seeing this in trunk.
Sure you weren't blocking ads, either with an extension or the user-content.css changes?
(Reporter)

Comment 4

13 years ago
Thanks, Steve.  I can confirm that this also happens on the latest Trunk with Adblock Plus 0.5.11.2 installed and its ad blocking mode set to hide ads, by going to Adblock Options -> Support Websites... and making sure that both "Enable ad hiding" and "...for all sites" is checked.

Not sure where to go from here.  Does this at all expose a bug in Firefox, or is this just a case of an extension being used to break something?
Not sure. I use the adblocking usercontent.css from http://www.gozer.org/mozilla/ad_blocking/ and I see the same kind of message when it removes ads (eg: at www.shacknews.com) and have been seeing the msg for as long as I can remember.

Don't know if it is a bug / feature / expected behaviour though.

Comment 6

13 years ago
I guess a testcase would be welcome (esp. one that doesn't require adblock), even though this might turn out to be invalid. Note also bug 147488.
Assignee: nobody → general
Component: General → DOM: Level 0
Product: Firefox → Core
QA Contact: general → ian
Summary: JavaScript exception at www.betanews.com → JavaScript exception (NS_ERROR_FAILURE) [nsIDOMScreen.width] due to blocking/hiding ads
Version: unspecified → Trunk
(Reporter)

Comment 7

13 years ago
(In reply to comment #6)
> I guess a testcase would be welcome (esp. one that doesn't require adblock),
> even though this might turn out to be invalid. Note also bug 147488.
> 
I have absolutely no idea how to create a testcase for this.  Any help?

Comment 8

13 years ago
General advise available here: http://www.mozilla.org/newlayout/bugathon.html#testcase

In this case, I'd try to figure out what needs to be put in userContent.css so that the exception is caused on that page first (i.e. what needs to be blocked). Then reduce the page causing the exception to a minimum size following the steps at the above URL. Then try to move the CSS rules from userContent.css to a <style> tag in the testcase. At least that's what I'd try to do.

Thanks for trying to work on this.
The best I can do is

1. New profile
2. Create a userContent.css file in your new profile's ..\chrome\ directory containing:
     *[src*="advert"] { display: none !important }
3. Start firefox and surf to www.shacknews.com (ctrl-f5 if required)
4. Observe in the Javascript Console

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMScreen.width]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: http://a.as-us.falkag.net/dat/dlv/aslmain.js :: QQgD :: line 31"  data: no]

The javascript at http://a.as-us.falkag.net/dat/dlv/aslmain.js has been obfuscated so I have no idea what it's doing. The line in question (apparently) being:

{QQz[0]+='&scx='+screen.width+'&scy='+screen.height+'&scc='+screen.colorDepth;QQz[1]+='&scx='+screen.width+'&scy='+screen.height+'&scc='+screen.colorDepth;QQZb+=',,,'+(navigator.javaEnabled()?'1':'0');if(navigator.javaEnabled())
Created attachment 210891 [details]
Precusor to shacknews testcase.
(Reporter)

Comment 11

13 years ago
Steve, thanks so much for creating the testcase.
I'm _trying_ for a testcase, but it's a bit out of my league i think. Maybe I'll get lucky :)
I'm seeing this on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b1) Gecko/20060802 BonEcho/2.0b1 ID:2006080203, too.

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMScreen.width]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: http://www.google-analytics.com/urchin.js :: _uBInfo :: line 278"  data: no]
Flags: blocking1.8.1?
Version: Trunk → 1.8 Branch
Would take patch, not gonna block on this for the release at this point. Also, let's get a confirmation, yo ;)
Flags: blocking1.8.1? → blocking1.8.1-

Updated

12 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 15

11 years ago
Does this work on trunk now that bug 377539 is fixed?
Depends on: 377539
I believe this is now fixed for me. Do you still see the issue reed?
(Reporter)

Comment 17

10 years ago
Thanks everyone.  Resolving
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.