thom4parisot / webextension-fip

Minimalistic WebExtension to listen to FIP Radio, the best eclectic radio station (for Firefox, Chrome, Opera and Edge)
https://chrome.google.com/webstore/detail/fnhlecpfnocgmmmghkjcipmhdpmpddii
MIT License
34 stars 10 forks source link

There seem to be a problem with the access to the metadata #79

Closed bertrandgorge closed 6 years ago

bertrandgorge commented 6 years ago

In the dev console, URLs in http://www.fipradio.fr/livemeta/7?_=1517925869555 seem to fail (they redirect to https).

When loaded in HTTPS there's an error in the console :

_generated_backgroundpage.html:1 Failed to load https://www.fip.fr/livemeta/7?=1517925757860: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'chrome-extension://fnhlecpfnocgmmmghkjcipmhdpmpddii' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

bundle.js:15973 TypeError: Failed to fetch exports.default.err @ bundle.js:15973 Promise.catch (async) requestBroadcasts @ bundle.js:15710 _webextensionPolyfill2.default.alarms.getAll.then.alarms @ bundle.js:15747 Promise.then (async) enableBroadcastUpdates @ bundle.js:15740 bootstrap @ bundle.js:15646 init @ bundle.js:15624 13.../lastfm/controller @ bundle.js:15537 s @ bundle.js:1 e @ bundle.js:1 (anonymous) @ bundle.js:1

bertrandgorge commented 6 years ago

I'm afraid that this comes from fip.fr moving to https only, so they need to add the header Access-Control-Allow-Origin (no-cors will prevent from looking into the json)

thom4parisot commented 6 years ago

Thanks for reporting the issue :-)

I just released a new update. It should be available in the Chrome and Firefox web store soon enough to enjoy a rainy week-end.