oakesja / elm-news

All elm news in one place
https://elm-news.com
59 stars 7 forks source link

Fetching from reddit isn't working anymore #10

Open mfeineis opened 6 years ago

mfeineis commented 6 years ago

Independent of network, browser and machine I am presented with a Failed to fetch content from reddit every single time I visit elm-news. Thanks for the site, I'd appreciate that working once again :-).

oakesja commented 6 years ago

@mfeineis Thank you for using the site. Unfortunately I am not able to reproduce the issue. I also checked my analytics on errors, and it has not happened very often over the past month. It would be very helpful if you could provide some additional information. The most hopeful would be a screenshot or a dump of the reddit response. This can be obtained in the debugger tools in chrome or firefox.

It should look something like this.

screen shot 2018-02-06 at 7 18 00 pm

If you need any help obtaining this information just let me know! Thanks again.

mfeineis commented 6 years ago

Hey there,

apparently I've been misremembering that I've tried it in Chrome, where the request succeeds - I'm sorry about that. The issue is that my Firefox's TrackingProtection feature blocks the request: The resource at “https://www.reddit.com/r/elm/new/.json” was blocked because tracking protection is enabled. . I wonder why it works with the other data sources... I think you might need to request the data differently?

Hope that helps, cheers!

OS: Windows 10 Browser: Firefox Quantum 58.0.1 (64-bit)

oakesja commented 6 years ago

Thanks for more info! Unfortunately there are no good options for requesting reddit data differently. The only options would be to use the reddit's API which requires Oauth which requires a client id and a secret key which would require a server side component for elm-news to keep the secret key secret.

At this moment, that is too much work to fix this issue. In the mean time, you can disable the tracking protection tracking protection for just elm-news.com as a workaround. I am sorry and realize that this is not ideal.

mfeineis commented 6 years ago

Thanks, will do :-)