0

I was trying to fetch JSON data and parse it from another site when I got a error that said

Cross-Origin Read Blocking (CORB) blocked cross-origin response http://a-url with MIME type application/json. See https://www.chromestatus.com/feature/5629709824032768 for more details.

        function fetchdata() {
            // Replace ./data.json with your JSON feed
            fetch('[some-url-with-CORB]').then(response => {
                return response.json();
            }).then(data => {
                // Work with JSON data here
                console.log(data);
            }).catch(err => {
                // Do something for an error here
            });
        }

I intended to get a JSON response and then parse it from there, but CORB prevented me from doing so.

Mads Hansen
  • 63,927
  • 12
  • 112
  • 147
  • Possible duplicate of https://stackoverflow.com/questions/50873764/cross-origin-read-blocking-corb – SakoBu Dec 22 '18 at 19:10

1 Answers1

0

Yes this is new with Chrome. You need to move your Ajax Query to the background script.

You will find how to do that in this topic: How to stop CORB from blocking requests to data resources that respond with CORS headers?