Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connections to marketplace #418

Closed
1 of 2 tasks
daniel-molina opened this issue Jun 12, 2020 · 91 comments
Closed
1 of 2 tasks

Connections to marketplace #418

daniel-molina opened this issue Jun 12, 2020 · 91 comments

Comments

@daniel-molina
Copy link

Describe the bug
I went to Network and I saw that vscodium is connecting to

https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery

Reading Docs page I learned about product.json which is said to be set to open-vsx.org. I checked /usr/share/codium/resources/app/product.json and I found that

"extensionsGallery": {
"serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
"cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
"itemUrl": "https://marketplace.visualstudio.com/items"
},

It does not seem that way.

Please confirm that this problem is VSCodium-specific

  • This bug doesn't happen if I use Microsoft's Visual Studio Code. It only happens in VSCodium.

I do not use vscode, so i do not know.

Please confirm that the issue/resolution isn't already documented

To Reproduce
Steps to reproduce the behavior:

Browsing or installing extensions.

Expected behavior
No connections to Microsoft MarketPlace.

Desktop (please complete the following information):

  • OS: Debian-based.
  • Architecture: x64
  • Version: 1.45.1
@daniel-molina daniel-molina added the bug Something isn't working label Jun 12, 2020
@stripedpajamas
Copy link
Member

Open VSX marketplace is available in v1.46.0 and higher.

@stripedpajamas stripedpajamas removed the bug Something isn't working label Jun 12, 2020
@GammaGames
Copy link

I'm not sure if this issue is related to codium or openvsx or if I should open a new issue, but I can't find any extensions when I search.
image

I looked at the request that's being sent, the payload is:

{
  "filters": [
    {
      "criteria": [
        {
          "filterType": 8,
          "value": "Microsoft.VisualStudio.Code"
        },
        {
          "filterType": 10,
          "value": "test"
        },
        {
          "filterType": 12,
          "value": "4096"
        }
      ],
      "pageNumber": 1,
      "pageSize": 50,
      "sortBy": 0,
      "sortOrder": 0
    }
  ],
  "assetTypes": [],
  "flags": 946
}

And I get a 500 response of:

{
  "timestamp": "2020-06-12T15:33:26.792+0000",
  "status": 500,
  "error": "Internal Server Error",
  "message": "sortOrder parameter must be either 'asc' or 'desc'.",
  "path": "/vscode/gallery/extensionquery"
}

@stripedpajamas
Copy link
Member

That looks like an open vsx bug to me. Can you open an issue at https://github.com/eclipse/openvsx/issues and link it to this one?

@stripedpajamas
Copy link
Member

I will reopen this in case anyone else is having the same issue connecting to open vsx.

@stripedpajamas
Copy link
Member

cc @spoenemann

@aniketbarik
Copy link

I'm facing this same issue.

VSCodium details -

Version: 1.46.0
Commit: a5d1cc28bb5da32ec67e86cc50f84c67cc690321
Date: 2020-06-11T18:31:22.701Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.6.16-300.fc32.x86_64

@lion24
Copy link

lion24 commented Jun 12, 2020

Hi all,

I'm also impacted by this issue.

codium build:

Version: 1.46.0
Commit: a5d1cc28bb5da32ec67e86cc50f84c67cc690321
Date: 2020-06-11T18:31:22.701Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.5.15-200.fc31.x86_64

@rickytower
Copy link

rickytower commented Jun 12, 2020

Hi!
I'm having the same issue:
immagine

Version: 1.46.0
Commit: a5d1cc28bb5da32ec67e86cc50f84c67cc690321
Date: 2020-06-11T18:31:22.701Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.4.0-7634-generic

@ghost
Copy link

ghost commented Jun 12, 2020

I tried to delete config files for a full reset and the problem still persists.

@GammaGames
Copy link

FYI since this was a comment on #415, the docs have a method to revert back to the VS Code Marketplace. I have done this temporarily until the issue (eclipse/openvsx/issues/126) is addressed.

@VadinV
Copy link

VadinV commented Jun 13, 2020

Hi, i'm having the same issue:

Versión: 1.46.0 (user setup)
Confirmación: a5d1cc28bb5da32ec67e86cc50f84c67cc690321
Fecha: 2020-06-12T10:32:02.515Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
Sistema Operativo: Windows_NT x64 10.0.19041

@ghost
Copy link

ghost commented Jun 13, 2020

@GammaGames any idea where to place product.json on my filesystem for MacOS? I ran

sudo find / -name product.json

and it came back with nothing.

EDIT: Just found it:

/Applications/VSCodium.app/Contents/Resources/app/product.json

@talentlessguy
Copy link

Same problem:

Version: 1.46.0
Commit: a5d1cc28bb5da32ec67e86cc50f84c67cc690321
Date: 2020-06-11T18:31:22.701Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Linux x64 5.4.43-1-MANJARO

@phd
Copy link

phd commented Jun 13, 2020

Quick workaround:

Edit /usr/share/codium/resources/app/product.json:

Replace:

  "extensionsGallery": {
    "serviceUrl": "https://open-vsx.org/vscode/gallery",
    "itemUrl": "https://open-vsx.org/vscode/item"
  },

with:

  "extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
  },

@talentlessguy
Copy link

@phd I don't have such folder... I installed VSCodium with AppImage 🤔

@rauldipeas
Copy link

Thank you so much @phd! It's working now!

@bencrbcp
Copy link

@phd Life saver!

@ghost
Copy link

ghost commented Jun 14, 2020

Why did we switch to open-vsx then? To go back to Microsoft's marketplace?

@Daniyal-Javani
Copy link

Also we have no access to open-vsx because of Iran sanctions but Microsoft's marketplace is working

@ghost
Copy link

ghost commented Jun 14, 2020

@Rowisi Good question, but probably because the licensing restrictions to Microsoft's marketplace needs more investigation.

I'm wondering if we could add a feature to VSCode to be able to choose the Marketplace from the UI. I think that would be handy.

@joseluisq
Copy link
Contributor

Same issue using VSCodium v1.46.0 on ArchLinux.

Temporary workaround:
Update product.json file following @phd's comment: #418 (comment)

File: /usr/share/vscodium-bin/resources/app/product.json

@wattry
Copy link

wattry commented Jun 15, 2020

I upgraded to 1.46 and the market place stopped working. The console is showing 500 errors:

Request URL: https://open-vsx.org/vscode/gallery/extensionquery
Request Method: POST
Status Code: 500 
Remote Address: 34.98.99.180:443
Referrer Policy: no-referrer-when-downgrade
access-control-allow-origin: *
alt-svc: clear
cache-control: no-cache, no-store, max-age=0, must-revalidate
content-type: application/json; api-version=3.0-preview.1
date: Mon, 15 Jun 2020 01:05:33 GMT
expires: 0
pragma: no-cache
status: 500
strict-transport-security: max-age=31536000 ; includeSubDomains
vary: Origin
vary: Access-Control-Request-Method
vary: Access-Control-Request-Headers
via: 1.1 google
x-content-type-options: nosniff
x-frame-options: DENY
x-xss-protection: 1; mode=block
:authority: open-vsx.org
:method: POST
:path: /vscode/gallery/extensionquery
:scheme: https
accept: application/json;api-version=3.0-preview.1
accept-encoding: gzip, deflate, br
accept-language: en-US
content-length: 231
content-type: application/json
origin: file://
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) VSCodium/1.46.0 Chrome/78.0.3904.130 Electron/7.3.1 Safari/537.36
x-market-client-id: VSCode 1.46.0
x-market-user-id: 5993b4fd-c0fb-411e-9f83-5da24e234b98
{filters: [{,…}], assetTypes: [], flags: 946}
assetTypes: []
filters: [{,…}]
flags: 946

I was using brew to manage VSCodium however I cannot select the previous version (1.45) so I manually reverted using the binary provided here and the market place started working again.

@ghost
Copy link

ghost commented Aug 15, 2020

it works now

@Snooz82
Copy link

Snooz82 commented Aug 19, 2020

i really think that this is a bad move.
Sorry!

But this lead me to throw VSCodium away and install VSCode.
from one day to another i could not find the Extensions i was using normally!
i tried to analyze it but didn't directly find a solution, so i tested VSCode and this worked fine...

Open-VSX may be a nice place, but for me it caused some problems!
i would like to see some kind of a switch in the GUI to select the Marketplaces that are configured.

I now fix this but it was even not easy to find this thread here when searching for this issue...

@stripedpajamas
Copy link
Member

I understand that this marketplace switch presents a regression since there aren't nearly as many extensions available from Open VSX as there are from MS. Much appreciation to anyone submitting ad-hoc solutions for using the MS marketplace -- I encourage the people in this thread who have come up with methods to submit PRs to the README/DOCS so that others who want to use Microsoft's marketplace can possibly have that option without digging through issues.

VSCodium will be sticking with Open VSX for the foreseeable future. I said from the beginning (on the README since almost first commit) that VSCodium would use Microsoft's extension marketplace until there was an open source alternative.

Ideally MS would allow extension marketplace to be configured in the app's settings instead of baked-in at build time. I'm not sure if this is on their roadmap (but doubtful since they will want everyone using their proprietary marketplace).

Closing this issue for now (although feel free to comment if I've missed something still pending in this issue). I will create a readme banner or issue template so that it's easier for anyone unaware of this change to figure out what happened in recent versions.

scottfurry added a commit to scottfurry/FurCaT_Gentoo that referenced this issue Aug 28, 2020
By default vscodium uses open-vsx.com for extension library (IUSE="ext_vsx").
To revert to Microsoft markplace, use the 'ext_msm' use flag.
See VSCodium/vscodium#418 for more information.
@aaronrancsik
Copy link

aaronrancsik commented Sep 12, 2020

Is there any way to make in permanent? After every update I have to

Quick workaround:
Edit /usr/share/codium/resources/app/product.json:
Replace:

  "extensionsGallery": {
    "serviceUrl": "https://open-vsx.org/vscode/gallery",
    "itemUrl": "https://open-vsx.org/vscode/item"
  },

with:

  "extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
  },

If somebody is looking where to find product.json on macOS:
/Applications/VSCodium.app/Contents/Resources/app/product.json

Is there any way to make it permanent? I mean after every update I have to manually change it back to MS store.
I can write an update hook for it, but I curious about an easier and more elegant way. 😄

@stripedpajamas
Copy link
Member

Not atm, at least that I'm aware of. Honestly MS should just make marketplace a setting instead of a "compile-time" var.

@ghost
Copy link

ghost commented Oct 21, 2020

Same issue using VSCodium v1.46.0 on ArchLinux.

Temporary workaround:
Update product.json file following @phd's comment: #418 (comment)

File: /usr/share/vscodium-bin/resources/app/product.json

OR

/usr/lib/code/product.json if you install the open source version community/code

@hydranix
Copy link

Quick workaround:

Edit /usr/share/codium/resources/app/product.json:

Replace:

  "extensionsGallery": {
    "serviceUrl": "https://open-vsx.org/vscode/gallery",
    "itemUrl": "https://open-vsx.org/vscode/item"
  },

with:

  "extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
  },

Or command to fix it
Run as root:

cp /usr/lib/code/product.json /tmp/.product.json
jq -M '.extensionsGallery.serviceUrl |= "https://marketplace.visualstudio.com/_apis/public/gallery" | .extensionsGallery.itemUrl |= "https://marketplace.visualstudio.com/items" | .extensionsGallery.cacheUrl = "https://vscode.blob.core.windows.net/gallery/index"' /tmp/.product.json > /usr/lib/code/product.json
rm /tmp/.product.json

@rugk
Copy link

rugk commented Feb 20, 2021

BTW if you use the flatpak that switch that is also documented in the Readme is a little more complicated.

See flathub/com.vscodium.codium#22 for a solution in the Flathub version.

@Sleepful
Copy link

My new work-around is using emacs instead

@spirobel
Copy link

is there an alternative to vscodium? i dont want the gates snooping, but I need plugins that are only on the microsoft store.

@CrasherX
Copy link

@stripedpajamas
Copy link
Member

@spirobel in the next version of VSCodium, you can use the MS extension gallery (persistently). See the recently merged #674

kiprasmel added a commit to kiprasmel/voidrice that referenced this issue Jun 20, 2021
@dan-r95
Copy link

dan-r95 commented Jul 19, 2021

On a packaged Mac app, replace the content with open -a TextEdit /Applications/VSCodium.app/Contents/Resources/app/product.json . (See #418 (comment))

@MPLew-is
Copy link
Contributor

@dan-r95 there’s no need for edit the package anymore, see #674 for a way to override via environment variable or user-level configuration file.

@CalvinLanger
Copy link

clearing cache from product.js file with code from @phd is the solution. Just find product.js file where you installed VS Code

@gitddpsm
Copy link

Quick workaround:
Edit /usr/share/codium/resources/app/product.json:

awesome ! Thank you. 💟💟💟💟💟

@mrksnlcln
Copy link

Quick workaround:

Edit /usr/share/codium/resources/app/product.json:

Replace:

  "extensionsGallery": {
    "serviceUrl": "https://open-vsx.org/vscode/gallery",
    "itemUrl": "https://open-vsx.org/vscode/item"
  },

with:

  "extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
  },

After an hour of troubleshooting on what I did wrong in my parrot OS, finally I got the actual error and found this post. I cannot thank you enough! :)

@abinlatheef
Copy link

Quick workaround:

Edit /usr/share/codium/resources/app/product.json:

Replace:

  "extensionsGallery": {
    "serviceUrl": "https://open-vsx.org/vscode/gallery",
    "itemUrl": "https://open-vsx.org/vscode/item"
  },

with:

  "extensionsGallery": {
    "serviceUrl": "https://marketplace.visualstudio.com/_apis/public/gallery",
    "cacheUrl": "https://vscode.blob.core.windows.net/gallery/index",
    "itemUrl": "https://marketplace.visualstudio.com/items"
  },

For me, this file was not there. Instead I tried that here /usr/share/vscodium-bin/resources/app/product.json and it worked like a charm.

@VanGoethe
Copy link

VanGoethe commented Aug 12, 2021

Had the same issue once, i was able to solve it by modifying ~/.vscode/argv.json file by adding "enable-browser-code-loading": false

hope it works for you too

credit: to @xip-niekneuij at
https://www.bswen.com/2021/07/others-how-to-solve-can-not-connect-extensions-marketplace1.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests