rubenmv / extension-goodreads-ratings-for-amazon

Shows Goodreads ratings in Amazon book pages.
Apache License 2.0
35 stars 7 forks source link

'Cross-Origin Request Blocked' error #5

Closed ditek closed 5 years ago

ditek commented 5 years ago

I haven't used the extension before, but when I installed it today I couldn't get it to work.

After some debugging I found out that calling fetch(urlGoodreads) in retrieveBookInfo() fails and throws this error:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.goodreads.com/book/isbn?isbn=XXXXXXXXX. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

I'm using Firefox 64.0

rubenmv commented 5 years ago

Hi! Well I don't know why it is throwing that error now, but I just uploaded a new version that partially supports Audible.com pages. It seems like the new version is already published and working fine. Check it out and let me know if you keep getting the same error.

Thanks!

ditek commented 5 years ago

It might not be specific to the extension. If I just try
fetch("https://www.goodreads.com/book/isbn?isbn=B01MZI77C0")
in Firefox Developer Console I get the same error.

Can you try that? Maybe they introduced some weird security feature, or maybe it's just my setup.

rubenmv commented 5 years ago

I'm using Firefox 64 on Windows 10 and the fetch command returns me an "OK" response, no cross origin error. Maybe some other extension is blocking those requests?

ditek commented 5 years ago

That might be the case. I'll try disabling other extensions and see if that helps

ditek commented 5 years ago

I tried the extension today again and it worked. The fetch call still fails with the same error message however. I can't explain that, but at least now I can close the ticket. Thanks.