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.

error: CORS request did not succeed

See original GitHub issue

Hi,

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:closed
  • Created 2 years ago
  • Reactions:46
  • Comments:90 (10 by maintainers)

github_iconTop GitHub Comments

12reactions
daiyamcommented, Jul 11, 2021

@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 to 1.58.0:

  • Chromium: same 89.0.4389.128
  • Electron: 12.0.7 -> 12.0.13
  • Node: same 14.16.0
8reactions
briankingcommented, Sep 6, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

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