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.

Some popular extensions (eg GitHub Pull Requests and Issues) fail on load due to lack of Proposed API support

See original GitHub issue

Expected behavior: Extensions load w/o error, eg GitHub.vscode-pull-request-github Actual behavior: Extensions fail to load with the following error.

Ideas for fixing:

  1. hardcode --enable-proposed-api flag for vscode (to enable for all extensions).
  2. I believe issue #1528 could also fix this by adding the flag to VSCODE_OPTIONS once it exists.
[2020-05-28 10:24:10.809] [exthost] [error] Error: [GitHub.vscode-pull-request-github]: Proposed API is only available when running out of dev or with the following command line switch: --enable-proposed-api GitHub.vscode-pull-request-github
        at a (/usr/lib/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:590:810)
	at Object.t.checkProposedApiEnabled (/usr/lib/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:591:148)
	at Object.registerDecorationProvider (/usr/lib/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:906:76)
	at new t.PullRequestsTreeDataProvider (/usr/local/x/home/aderk/.local/share/code-server/extensions/github.vscode-pull-request-github-0.16.0/media/extension.js:1:547205)
	at /usr/local/x/home/aderk/.local/share/code-server/extensions/github.vscode-pull-request-github-0.16.0/media/extension.js:1:653078
	at Generator.next (<anonymous>)
	at /usr/local/x/home/aderk/.local/share/code-server/extensions/github.vscode-pull-request-github-0.16.0/media/extension.js:1:650859
	at new Promise (<anonymous>)
	at n (/usr/local/x/home/aderk/.local/share/code-server/extensions/github.vscode-pull-request-github-0.16.0/media/extension.js:1:650607)
	at t.activate (/usr/local/x/home/aderk/.local/share/code-server/extensions/github.vscode-pull-request-github-0.16.0/media/extension.js:1:652378)
	at Function._callActivateOptional (/usr/lib/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:825:502)
	at Function._callActivate (/usr/lib/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:825:153)
	at /usr/lib/code-server/lib/vscode/out/vs/workbench/services/extensions/node/extensionHostProcess.js:824:94
	at processTicksAndRejections (internal/process/task_queues.js:97:5)
	at async Promise.all (index 0)
  • Web Browser: Chrome
  • Local OS: Ubuntu
  • Remote OS: Ubuntu
  • Remote Architecture: AMD64
  • code-server --version: 3.3.1 6f1309795e1cb930edba68cdc7c3dcaa01da0ab3

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
code-ashercommented, Jun 10, 2020

I did some digging and I haven’t the faintest idea why but it turns out the web version handles this part differently than the local version. Unfortunately it looks like fixing it will require a patch.

VS Code web expects a payload object with an enableProposedApi key: https://github.com/microsoft/vscode/blob/1.45.1/src/vs/workbench/services/environment/browser/environmentService.ts#L254

We provide that payload in src/vs/server/node/server.ts#L101. So we’d need to add enableProposedApi there (only if the proposed API flag is set; it’ll be in options.args and enable-proposed-api will need to be added to the interface). Then in the environmentService.ts linked above we’d set it to the value instead of hardcoding [].

The payload type expects values to be strings so to pass that array we could use JSON.stringify & JSON.parse.

1reaction
code-ashercommented, Aug 26, 2020

I’m not sure why it didn’t automatically close but this is fixed by https://github.com/cdr/code-server/pull/2002. We’re working on getting a new release out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Pull Requests" and "Issues" have been showing "loading ...
When the extension is enabled Github Pull Request Extension doesn't load with above error. If I deactivate sonarlint it works without problems.
Read more >
Working with GitHub Issues in Visual Studio Code
Issue hovers work on full issue URLs, issue comment URLs, issues referenced by number ( #1234 ), and issues referenced by owner/repository#1234 ...
Read more >
GitHub Pull Request Builder - Jenkins Plugins
This plugin builds pull requests in github and report results. ... Commands: When a new pull request is opened in the project and...
Read more >
octokit/rest.js
For example to retrieve a pull request, use octokit.rest.pulls.get() . ... Some API endpoints support alternative response formats, see Media types.
Read more >
Visual Studio Code - ArchWiki
json file lists the extensions that are allowed to use certain proposed APIs accessed by extensions. Code - OSS and VSCodium distributions lack...
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