Closed Bug 649513 Opened 13 years ago Closed 13 years ago

Failing to load stats_worker.js

Categories

(addons.mozilla.org Graveyard :: Statistics, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: clouserw, Assigned: oremj)

References

Details

When I try to view a stats page, eg. https://addons.mozilla.org/z/en-US/firefox/addon/status-watch/statistics/ The bottom three graphs never stop spinning.  My error console says:

Error: Failed to load script: https://static.addons.mozilla.net/media/js/zamboni/stats/stats_worker.js (nsresult = 0x805303f4)
Priority: -- → P5
Target Milestone: Q2 2011 → 6.0.8
The script is failing to load because workers must be loaded from same-origin. I've moved stats_worker.js to media/js/workers/. Possible solutions here are setting up the headers so the CDN is treated as same-origin (might not be wise) or exempting media/js/workers from a CDN rewrite (might be kludgey). Wil, what do you think?
I don't like either of those! :)

It sounds like a special case either way, not rewriting the script is probably the best.  If you give me the new URL, I'll get that added
The script is at /media/js/workers/stats_worker.js

I made the workers directory, so we can actually exempt all future workers with a slightly more general rule if we so wish.
That's a good idea.  We can just use this bug.  Oremj, can you add this to the exclusions so it doesn't hit the CDN?

  ^/media/js/workers/.*

A similar rule was added in bug 649789
Assignee: thepotch → jeremy.orem+bugs
Target Milestone: 6.0.8 → 6.0.9
Priority: P5 → P2
Added this to preview: 

   RewriteCond %{ENV:REQ_URI} ^/media/js/workers/.*$
    RewriteRule . - [E=IS_CDN_REQ:false]
Cool, I'm getting a different error now, so I think this is fixed.  Thanks.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Filed bug 655833 for the new JS error.

I don't see the error anymore @ https://addons.allizom.org/z/en-US/firefox/addon/status-watch/statistics/?last=90

Marking this as verified.
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.