Skip to content
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

JSON Proxy is returning 404s for /latest #255

Closed
snowyfox opened this issue Nov 10, 2020 · 10 comments
Closed

JSON Proxy is returning 404s for /latest #255

snowyfox opened this issue Nov 10, 2020 · 10 comments

Comments

@snowyfox
Copy link

The extension has been unable to load new data for the last couple of months due to the JSON proxy (https://himawari-8.appspot.com/latest) returning a 404. I bypassed the proxy in a local copy of the extension code in the getLatestHimawariDate function to use https://himawari8-dl.nict.go.jp/himawari8/img/D531106/latest.json instead, and I'm now able to get images to load again.

Original Error thrown in the extension:
Unexpected token < in JSON at position 0

Response received from the JSON Proxy:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /himawari8/img/D531106/latest.json was not found on this server.</p>
</body></html>
@domoritz
Copy link
Owner

Hmm. That may be because the server returned a 404. Let me clear the caches so we refetch.

The issue is that https://himawari8-dl.nict.go.jp/ doesn't allow cross origin requests so we need the proxy.

@domoritz
Copy link
Owner

Ahh, the http endpoint return 404 now. Need to switch to https.

@snowyfox
Copy link
Author

You beat me to it! I was writing up a comment already to say exactly that! Sounds like an easy fix at least.

domoritz added a commit that referenced this issue Nov 10, 2020
@domoritz
Copy link
Owner

The hardest part is getting google cloud deployment working again since I haven't deployed in a while.

@domoritz
Copy link
Owner

Works again at https://himawari-8.appspot.com/latest. Thanks for the issue report @snowyfox!

@domoritz
Copy link
Owner

Fixed in 5b2c069

@snowyfox
Copy link
Author

Glad I could help you solve the issue :)

I'm not sure if its an artifact of running the extension locally in chrome as an Unpacked Extension, but I'm not getting any CORS warnings or errors at all when fetching the latest.json data directly from the source. May be worth looking into whether CORS is still an issue now or not sometime.

@snowyfox
Copy link
Author

I just re-enabled the original extension that was installed via the web store, and it just updated itself with new images. Issue definitely looks resolved now :)

@domoritz
Copy link
Owner

Hmm, they may have fixed things over the last years. It would be nice to remove the need for the proxy. Besides the extension, I also want to make sure that the web page itself works.

Would you want to send a pull request? I can review and make a release.

@snowyfox
Copy link
Author

I may be able to put something together later, but don't have the time right now, so feel free to try it yourself if you've got the time to play around with it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants