FS#71525 - [code][regression] Extensions marketplace doesn't work with Code OSS 1.58.0-1

Attached to Project: Community Packages
Opened by Vasily Khoruzhick (anarsoul) - Friday, 16 July 2021, 17:18 GMT
Last edited by Toolybird (Toolybird) - Saturday, 27 May 2023, 22:11 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Massimiliano Torromeo (mtorromeo)
Filipe Laíns (FFY00)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 13
Private No

Details

Description:

Extensions marketplace doesn't work after upgrading code to 1.58.0-1, it complains "We cannot connect to Extensions Marketplace at this time, please try again later". Downgrading code to 1.56.2-3 fixes the issue.

In developer tools (Help->Toggle Developer Tools) you can see:

Access to XMLHttpRequest at ‘https://open-vsx.org/vscode/gallery/extensionquery 1’ from origin ‘vscode-file://vscode-app’ has been blocked by CORS policy: Request header field x-market-user-id is not allowed by Access-Control-Allow-Headers in preflight response.

Additional info:
* package version(s)
1.58.0-1
* config and/or log files etc.
N/A
* link to upstream bug report, if any
Not upstream issue, visual-studio-code-bin 1.58.2 from AUR works just fine.

Steps to reproduce:

Open code, click on extensions button, type something in search box.
This task depends upon

Closed by  Toolybird (Toolybird)
Saturday, 27 May 2023, 22:11 GMT
Reason for closing:  No response
Comment by Topo Lino (opotonil) - Saturday, 17 July 2021, 11:45 GMT Comment by mephinet (mephinet) - Wednesday, 04 August 2021, 10:41 GMT
For those unaware of the context: why this package uses open-vsx.org: https://github.com/VSCodium/vscodium#extensions-and-the-marketplace
Comment by jason (bostonvaulter) - Wednesday, 11 August 2021, 19:42 GMT Comment by Taiki Sugawara (buzztaiki) - Friday, 13 August 2021, 10:04 GMT
In vscodium 1.59, it is supported by the following patch:
https://github.com/VSCodium/vscodium/pull/774

I think it is not possible to use open-vsx.org without adding a similar patch.
Comment by Taiki Sugawara (buzztaiki) - Friday, 13 August 2021, 10:06 GMT Comment by Brian Wiborg (baccenfutter) - Monday, 06 September 2021, 21:19 GMT
I can confirm.

```
# code --version
1.58.0
2d23c42a936db1c7b3b06f918cde29561cc47cd6
x64
```

```
Access to XMLHttpRequest at 'https://open-vsx.org/vscode/gallery/extensionquery' from origin 'vscode-file://vscode-app' 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.
```
Comment by Topo Lino (opotonil) - Monday, 13 September 2021, 18:18 GMT Comment by Taiki Sugawara (buzztaiki) - Wednesday, 15 September 2021, 06:11 GMT
It seems to be worked well.

version:
```
$ code --version
1.58.0
2d23c42a936db1c7b3b06f918cde29561cc47cd6
x64
```

request:
```
POST /vscode/gallery/extensionquery HTTP/1.1
...
Origin: vscode-file://vscode-app
...
```

resonse:
```
HTTP/1.1 200
...
Access-control-allow-origin: vscode-file://vscode-app
...
```
Comment by Toolybird (Toolybird) - Friday, 28 April 2023, 06:05 GMT
Is this still an issue with latest pkgs?

Loading...