code-server: [Bug]: Broken extensions with code-server 4.8.0

Is there an existing issue for this?

  • I have searched the existing issues

OS/Web Information

  • Web Browser: Safari 16.1
  • Local OS: macOS 13.0 (Ventura)
  • Remote OS: Debian bullseye
  • Remote Architecture: amd64
  • code-server --version: 4.8.0 005fa87699b4b3c791bd97693400dd016a7ee315 with Code 1.72.1

Steps to Reproduce

  1. Go to https://vscode-r.jupyter.b-data.ch
  2. Log in with your GitHub account
  3. Click “Start My Server”
  4. Select image R (jupyterlab/r/base:test) + code-server
  5. Open code-server
  6. Try to create an R terminal or create/edit a Jupyter Notebook

Expected

“R: Create R terminal” is supposed to create an R terminal.
ℹ️ [YYYY-MM-DD hh:mm:ss.sss] [exthost] [info] ExtensionService#_doActivateExtension REditorSupport.r, startup: false, activationEvent: 'onCommand:r.createRTerm'

When creating a Jupyter Notebook it should be displayed and editable.

Actual

No R terminal is created.

Jupyter Notebook is created but nothing is displayed.

Logs

No response

Screenshot/Video

No response

Does this issue happen in VS Code or GitHub Codespaces?

  • I cannot reproduce this in VS Code.
  • I cannot reproduce this in GitHub Codespaces.

Are you accessing code-server over HTTPS?

  • I am using HTTPS.

Notes

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Ahhhhh that makes sense, I did not consider the use in non-JS code. To use asExternalUri it would need to call back to the extension to run asExternalUri every time it needed the URI since as noted it should not be modified but that does seem rather onerous.

VSCODE_PROXY_URI will not become obsolete however if a good way to use asExternalUri does present itself it might make sense to pursue that so the extension works in Codespaces as well!

@jsjoeio Extension functionality retested and found to work:

  1. [R] “R: Create R terminal”
  2. [Jupyter] Create/Edit/Run Jupyter Notebooks

Functionality [modified by patches] retested and found to work:

  • proxy-url
  • webview

@code-asher I will get in touch with @renkun-ken about

proxy-url: VSCODE_PROXY_URI is now suffixed with a /.

Ah, we added that to make sure relative paths from the proxied application work. We could remove it but my thinking is that we probably always want there to be a trailing slash (open to thoughts on this of course). For extensions the recommended method now is to use asExternalUri instead of the environment variable (we should have put this in the changelog; I will add it once we settle on what to do with the slash).

Identified the issue. Now working on a PR to fix this.

Probably related to CSP issues https://github.com/coder/code-server/issues/5710 can you check this in the browser console?

@jsjoeio Thank you for the prompt analysis.

Reproduced locally too. My apologies, I tested before but must have missed a hash update somewhere.

image

A simple fix would be to add an e2e test to ensure this doesn’t happen again.

@jsjoeio Could you please stick to the approach with release candidates – especially when adding new features?

I offered you to test those to avoid situations like this.

Functionality [modified by patches] tested and found not to work:

  • proxy-url
  • webview

proxy-url: VSCODE_PROXY_URI is now suffixed with a /.
👉 This leads to a double-/ in the browser URL of the R extension – e.g. for help().

webview: Seems to be broken entirely. R Help, R Plots, etc. not working. ℹ️ This might be related to the added support for the Ports panel and/or “Auto Forward Ports” is related to #5710.