If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Error: downloadable font: download failed (font-family...): bad URI or cross-site access not allowed

REOPENED
Unassigned

Status

Mozilla Developer Network
General
REOPENED
4 years ago
a year ago

People

(Reporter: alex_mayorga, Unassigned)

Tracking

Details

(Whiteboard: [specification][type:bug])

(Reporter)

Description

4 years ago
What did you do?
================
1. Load https://developer.mozilla.org/en-US/
2. 
3. 

What happened?
==============
These errors appear in "Error Console" on Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:24.0) Gecko/20130522 Firefox/24.0 ID:20130522031027 CSet: c21ef3664c67:

Timestamp: 5/22/2013 5:04:44 PM
Error: downloadable font: download failed (font-family: "League Gothic" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed
source: https://developer.cdn.mozilla.net/media/fonts/League_Gothic-webfont.woff
Source File: https://developer.cdn.mozilla.net/media/css/mdn-min.css?build=0880ee7
Line: 0
Source Code:
@font-face {   font-family: "League Gothic";   font-style: normal;   font-weight: normal;   src: url("../fonts/League_Gothic-webfont.eot?") format("eot"), url("../fonts/League_Gothic-webfont.woff") format("woff"), url("../fonts/League_Gothic-webfont.ttf") format("truetype"); }

Timestamp: 5/22/2013 5:04:44 PM
Error: downloadable font: download failed (font-family: "Bebas Neue" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed
source: https://developer.cdn.mozilla.net/media/fonts/BebasNeue-webfont.woff
Source File: https://developer.cdn.mozilla.net/media/css/mdn-min.css?build=0880ee7
Line: 0
Source Code:
@font-face {   font-family: "Bebas Neue";   font-style: normal;   font-weight: normal;   src: url("../fonts/BebasNeue-webfont.eot?") format("eot"), url("../fonts/BebasNeue-webfont.woff") format("woff"), url("../fonts/BebasNeue-webfont.ttf") format("truetype"); }

Timestamp: 5/22/2013 5:04:48 PM
Error: downloadable font: download failed (font-family: "Bebas Neue" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed
source: https://developer.cdn.mozilla.net/media/fonts/BebasNeue-webfont.woff
Source File: https://developer.cdn.mozilla.net/media/css/mdn-min.css?build=0880ee7
Line: 0
Source Code:
@font-face {   font-family: "Bebas Neue";   font-style: normal;   font-weight: normal;   src: url("../fonts/BebasNeue-webfont.eot?") format("eot"), url("../fonts/BebasNeue-webfont.woff") format("woff"), url("../fonts/BebasNeue-webfont.ttf") format("truetype"); }

Timestamp: 5/22/2013 5:04:48 PM
Error: downloadable font: download failed (font-family: "League Gothic" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed
source: https://developer.cdn.mozilla.net/media/fonts/League_Gothic-webfont.woff
Source File: https://developer.cdn.mozilla.net/media/css/mdn-min.css?build=0880ee7
Line: 0
Source Code:
@font-face {   font-family: "League Gothic";   font-style: normal;   font-weight: normal;   src: url("../fonts/League_Gothic-webfont.eot?") format("eot"), url("../fonts/League_Gothic-webfont.woff") format("woff"), url("../fonts/League_Gothic-webfont.ttf") format("truetype"); }

What should have happened?
==========================
No errors should appear and the fonts should load.

Is there anything else we should know?
======================================
Initially reported on mozillaZine's Nightly thread[1] where Brian J Polidoro confirmed and pointed to "Solution: Firefox Font-Face Cross Domain Problem"[2].

1 http://forums.mozillazine.org/viewtopic.php?p=12875693#p12875693
2 http://www.unseenrevolution.com/solution-firefox-font-face-cross-domain-problem/

Comment 1

4 years ago
David, could you verify?
Assignee: nobody → dwalsh
I just checked, the extraneous font is gone when we got rid of the old theme. This is fixed.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WORKSFORME

Comment 3

3 years ago
I'm still having this problem,tried every solution.

Comment 4

3 years ago
I am having this problem at the moment, but with "FontAwesome":

For some weeks/months (I cannot tell exactly) I have the following error
in the web console with the symptom of missing images/glyphs/font
characters on all the MDN pages.

downloadable font: download failed (font-family: "FontAwesome"
style:normal weight:normal stretch:normal src index:1): bad URI or
cross-site access not allowed
source:
https://developer.cdn.mozilla.net/media/css/libs/font-awesome/fonts/fontawesome-webfont.woff?v=4.1.0
mdn-min.css
GET
https://developer.cdn.mozilla.net/media/css/libs/font-awesome/fonts/fontawesome-webfont.ttf
[HTTP/1.1 403 Forbidden 80ms]

The error appears whenever I'm logged in or not.

The trigger factor seems to be the configuration of
network.http.sendRefererHeader=0. I browse the web with
network.http.sendRefererHeader=0 all the time, except when I want to
contribute to MDN, where the authentication and page edition presently
still require network.http.sendRefererHeader=2. But I need and read MDN
many times a day and the missing characters makes it less pleasant to
read. I'm not the only one browsing this way, so some more users like me
may be hindered, and while I can understand the use of referer for
authentication and protection against robots I'm doubtful about the
relevance of the referer wrt to web fonts.

Context: I'm using Firefox (latest stable, 34.0 at the moment) +
NoScript (latest stable) with only Mozilla domains allowed (mozilla.org,
mozilla.net, persona.org).
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
Assignee: dwalsh → nobody
Duplicate of this bug: 1143829
The error message reported in bug 1143829 suggests we could fix this by enabling CORS, is that an option?
Not really.

We enable CORS for the entire site **except** the fonts directory, because some fonts have licenses that explicitly forbid hot-linking across domains. So, the CORS logic requires that the browser send the referrer header so we can verify that the request originates from a Mozilla site and is not hot-linked from somewhere else.

https://github.com/mozilla/kuma/blob/master/etc/apache/all-servers.conf

Comment 8

3 years ago
Understood. Too bad still, that referer protection it's getting more and more annoying.

So you can close this ticket as far as I'm concerned. Thank you.
Duplicate of this bug: 1122870

Comment 10

a year ago
I'm experiencing this bug as well, but with the file protocol. The fonts are located in a parent directory of the HTML document.
Steve - is this a bug on developer.mozilla.org? What URL?
Flags: needinfo?(prometh)

Comment 12

a year ago
John, no, it's occurring in the documentation for an app I'm working on.

docs/index.html
docs/docs.css
fonts/font.woff

Comment 13

a year ago
As I'd said, it's using the file:// protocol
OK, then that is unrelated to this bug, which is specific to MDN, and your problem won't be solved by adding it here. You may want to open a new bug, if you believe this is a Firefox bug (Firefox -> Untriaged), read the CORS specification to find a solution, or ask on a site like StackOverflow.com
Flags: needinfo?(prometh)

Comment 15

a year ago
Oops. Thank you.

To close my comments, this answers it: https://developer.mozilla.org/en-US/docs/Same-origin_policy_for_file:_URIs

Unfortunately, it is unlike Chrome and WebKit.
You need to log in before you can comment on or make changes to this bug.