question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cross-Origin Request Blocked with spotify search in Firefox

See original GitHub issue

Describe the bug When I search in Firefox for something in spotify, it fails to load and gives CORS errors.

To Reproduce Steps to reproduce the behavior:

  1. Activate Mopidy and Spotify
  2. Go to Iris in a new version of firefox and search on spotify
  3. Check the web developer console
  4. See error
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.spotify.com/v1/search?

Expected behavior It should just search spotify as usual and return results.

Screenshots If applicable, add screenshots to help explain your problem. image

Environment details:

  • OS: Ubuntu Linux 20.04
  • Browser: Firefox 80.0.1 (64-bit)
  • Iris version: 3.51.0

Additional context The mopidy http server allows setting allowed_origins and I have this set to:

[http]
hostname = ::
allowed_origins = api.spotify.com:443,

Have tried various versions of this but none seem to work.

Works on Chrome. I think Firefox is just more serious about enforcing this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
BlackLightcommented, Apr 2, 2022

I have lots of privacy add-ons and though I tried disabling them for this site and still saw the issue, disabling them all completely fixes it.

For those who also bumped into this issue, even after explicitly adding api.spotify.com to: allowed_origins: the culprit in my case was the Privacy Badger extension. It interprets the cross-domain call to api.spotify.com like a tracker, so it blocks it regardless of the CORS configuration. Adding a domain exception for the Iris server fixed the issue for me.

1reaction
partofthethingcommented, Sep 18, 2020

I tried various urls and kept seeing the same issue. Finally I tried with add-ons disabled and it worked. I have lots of privacy add-ons and though I tried disabling them for this site and still saw the issue, disabling them all completely fixes it. So it’s not Iris, it’s me.

Closing as invalid. Thanks for your help!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firefox appears to be blocking Cross Origins Requests so ...
Firefox appears to be blocking Cross Origins Requests so cannot actually successfully sign-in: Cross-Origin Request Blocked: The Same Origin ...
Read more >
Firefox 'Cross-Origin Request Blocked' despite headers [closed]
I came across this question having found requests in Firefox were being blocked with the message: Reason: CORS request did not succeed.
Read more >
Certain websites won't load at all in Firefox, but work fine in ...
Hello,. since the recent update to version 90.0 I noticed that certain websites (youtube, facebook, spotify) won't load at all.
Read more >
Cross-Origin Request Blocked with spotify API
Cross-Origin Request Blocked : The Same Origin Policy disallows reading the remote resource at https://accounts.spotify.com/authorize?
Read more >
Thanks, IE. - ayulin.net
Screenshot of Firefox Aurora JS Console showing a Cross-Origin Request Blocked error. The good old Cross-Origin Request Blocked.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found