error: CORS request did not succeed
See original GitHub issueHi,
VSCodium-1.58.0
is getting an error message when loading the list of extensions from open-vsx.org.
After debugging, I’ve reduced the code used to its minimal form so we can test it in the browser(Firefox is consistent unlike Chrome):
(function() {
const xhr = new XMLHttpRequest();
xhr.open('POST', 'https://open-vsx.org/vscode/gallery/extensionquery', true);
xhr.setRequestHeader('X-Market-Client-Id', 'VSCode 1.58.0');
xhr.setRequestHeader('X-Market-User-Id', '27ea627c-eac1-4ae6-92fd-d093b80d1ba5');
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('Accept', 'application/json;api-version=3.0-preview.1');
xhr.onload = (e) => {
console.log(xhr.response);
};
xhr.send('{"filters":[{"criteria":[{"filterType":8,"value":"Microsoft.VisualStudio.Code"},{"filterType":12,"value":"4096"}],"pageNumber":1,"pageSize":50,"sortBy":4,"sortOrder":0}],"assetTypes":[],"flags":950}');
})();
I’m getting:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://open-vsx.org/vscode/gallery/extensionquery. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://open-vsx.org/vscode/gallery/extensionquery. (Reason: CORS request did not succeed).
If you change the url to https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery
, there is no more errors.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:46
- Comments:90 (10 by maintainers)
Top Results From Across the Web
laravel - CORS request did not succeed - Stack Overflow
For me this error was caused by a self-signed certificate. If you open developer tools, select the network tab, click the call that...
Read more >CORS did not succeed - WordPress.org
Hey Alex,. I'm getting the following message: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at {key here}.
Read more >Troubleshoot CORS errors from API Gateway - Amazon AWS
Cross-Origin Resource Sharing (CORS) errors occur when a server doesn't return the HTTP headers required by the CORS standard. To resolve a CORS...
Read more >YouTube embedded player causes CORS errors - Issue Tracker
(Reason: CORS request did not succeed). Status code: (null). Error messages displayed by Google Chrome: Access to XMLHttpRequest at ' https://play.google ...
Read more >1599259 – Getting CORS error while creating quotas via ...
(Reason: CORS request did not succeed). Version-Release number of selected component (if applicable): cfme-5.9.2 How reproducible: Always Steps to ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@SpacingBat3 thanks for the feedback
For the
--disable-web-security
flag, since to disable the security for the whole IDE (including the extensions) is a little over the top, I’m against to make it the default.It’s a server’s configuration issue and from the client standpoint, the main components haven’t much changed from
1.57.1
to1.58.0
:Some unforeseen circumstances have delayed us from fixing this, but please be aware that it is the number 1 priority for us with Open VSX now and will proceed from there.