ceceradio / twitter-block-chain

Chrome extension to block all users on a followers/following page.
MIT License
247 stars 50 forks source link

The application is blocked by CORS policy #61

Open CyanMatter opened 4 years ago

CyanMatter commented 4 years ago

Following the instructions I ran it on someone's followers page on Chrome. After finding zero accounts it displays this error message:

There was an error retrieving more accounts. Please refresh the page and try again.

I went into Chrome's dev tools, enabled 'collect errors' on this extension, reproduced the error and got this log.

Access to fetch at 'https://api.twitter.com/1.1/followers/ids.json?screen_name=Starnews_nl&count=5000&stringify_ids=true' from origin 'chrome-extension://dkkfampndkdnjffkleokegfnibnnjfah' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. Context _generated_background_page.html Stack Trace _generated_background_page.html:0 (anonymous function)

This is all Greek to me. But it seems like Twitter's API no longer gives away some info the application relies on by blocking it with its CORS policy.