New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Fonts API returning multiple URLs that result in 404 errors #1679

Closed
onassar opened this Issue Sep 5, 2018 · 17 comments

Comments

Projects
None yet
4 participants
@onassar

onassar commented Sep 5, 2018

A number of fonts (possibly new ones) returned via the Google Fonts API are returning 404 errors when the URL is accessed. Example:

Name: Noto Sans KR
Weight: 100
Version: 6
https://fonts.gstatic.com/s/notosanskr/v6/Pby6FmXiEBPT4ITbgNA5CgmOsn7o.ttf

@sladen

This comment has been minimized.

Contributor

sladen commented Sep 5, 2018

How is the font actually being requested?

(Please copy and paste the exact code being used to load the font via the Google Fonts API).

@onassar

This comment has been minimized.

onassar commented Sep 5, 2018

@sladen

This comment has been minimized.

Contributor

sladen commented Sep 5, 2018

Yes, but where is the the URL coming from.

What code is being used, that results in the CSS, that references this URL.

@onassar

This comment has been minimized.

onassar commented Sep 5, 2018

I am requesting fonts via this URL:
https://www.googleapis.com/webfonts/v1/webfonts?key={accessKey}&sort=alpha

It returns all fonts, which I then cache on my side to prevent subsequent lookups, and perform text matching.

Here is the exact record match:

Notice that the URL for the 100 style points to this URL:
http://fonts.gstatic.com/s/notosanskr/v6/Pby6FmXiEBPT4ITbgNA5CgmOsn7o.ttf

Which then provides a 404. I also tried changing the protocol to https, but no luck.

@sladen

This comment has been minimized.

Contributor

sladen commented Sep 5, 2018

What is the contents of the Expires: HTTP header returned with this JSON result?

@onassar

This comment has been minimized.

onassar commented Sep 5, 2018

If I run a curl from CLI, I get this:
expires: Wed, 05 Sep 2018 15:36:00 GMT

Command: curl -i -H -D https://www.googleapis.com/webfonts/v1/webfonts?key={accessKey}&sort=alpha

@sladen

This comment has been minimized.

Contributor

sladen commented Sep 5, 2018

Invalid URLs being return for all results matching:
*"lastModified": "2018-09-04",

(ie. changed in the last 24 hours). Wonder if something failed preventing successful staging/deployment of the actual TTFs?

Thank you for spotting this!

@onassar

This comment has been minimized.

onassar commented Sep 5, 2018

Yeh of course; I regularly run tests of the endpoints to make sure everything is working properly, so I'll post here again in the future if I run into something similar.

Any idea on an eta for a fix? Happy to test + confirm.

@sladen

This comment has been minimized.

Contributor

sladen commented Sep 5, 2018

Note to self whilst investigating, 2x Sans in category: Sans-serif:

   "family": "Noto Sans JP",
   "category": "sans-serif",
…
   "family": "Noto Sans KR",
   "category": "sans-serif",
  • "Noto Serif JP"
  • "Noto Serif
@onassar

This comment has been minimized.

onassar commented Sep 5, 2018

Do you want a list of all the fonts I could reproduce this with?

@sladen

This comment has been minimized.

Contributor

sladen commented Sep 5, 2018

It appears to be four: `Noto {Sans,Serif} {JP,KR}". Are there others?

@nyshadhr9

This comment has been minimized.

Contributor

nyshadhr9 commented Sep 5, 2018

Hello, Thank you for spotting this.
I think this is a bug on our end, breaking the URLs on developer API for:
Noto Sans KR
Noto Sans JP
Noto Serif KR
Noto Serif JP

We are working on a fix; I'll be back with an ETA soon. Sorry for the inconvenience.

@onassar

This comment has been minimized.

onassar commented Sep 5, 2018

Yep that looks right.

@davelab6

This comment has been minimized.

Member

davelab6 commented Sep 5, 2018

@onassar thanks for reporting and @sladen thank you very much for helping to triage this! :)

@onassar

This comment has been minimized.

onassar commented Sep 5, 2018

Yes of course; I'll test once it's fixed.
FYI, the fonts are being used here: https://github.com/getstencil/GoogleWebFonts-FontFamilyPreviewImages

@nyshadhr9

This comment has been minimized.

Contributor

nyshadhr9 commented Sep 6, 2018

This issue has now been fixed. Thank you again @onassar and @sladen for reporting this :)

@nyshadhr9 nyshadhr9 closed this Sep 6, 2018

@onassar

This comment has been minimized.

onassar commented Sep 6, 2018

Great thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment