VS-Code interactive app issue when downloading any extensions

I cannot get any any marketplace extensions to work. When trying to install python or jupyter I get this error: Failed to install ‘ms-toolsai.jupyter’.

For any extension that does download, it doesnt actually work, ex installed VS Code Jupyter Notebook Previewer and My Jupyter Notebook Previewer. When opening .ipynb file using either of the installed extensions I just get a black screen.

Another thing to note, all detail tabs for any extension dont actually show any information. Just a blank screen.

This is likely because while it is the VSCode editor, it is actually Code Server that you are using which does not connect to the MicroSoft Public Marketplace.

And some more docs around how you can do various things for the market place:

You will have to actually download any extension you are interested in and build it in order to use it with Code Server and then use the json.settings within the VScode editor to point to the path of the built binary, which will depend on the app.

What version of code-server are you using? Older versions, which I believe most OSC or public VSCode OOD apps use no longer work with extensions correctly (from my testing). A while back code-server refactored to use the newly open sourced VS Code Server backend. This change broke most OOD apps so they were never updated.

If you use the latest version of code-server (4.6.0) and a view.html.erb like below everything should work correctly.

<form action="/rnode/<%= host %>/<%= port %>/login?to=" method="post" target="_blank">
  <input type="hidden" name="password" value="<%= password %>">
  <button class="btn btn-primary" type="submit">
    <i class="fa fa-eye"></i> Connect
  </button>
</form>

I’ll follow up with the full app in gitlab if your interested. I’m doing some finishing touches before moving the update to production.

Here’s the full working app NMSU_HPC / ood_bc_codeserver · GitLab. The extensions I tested worked without issues with this new version. I tested Python but not Jupyter.

I ended up getting this working with code server 3.9.3, vs code 1.54.2 and having to manually download ms-python v2021.5.926500501 and ms-toolsai.jupyter-2021.3.619093157.vsix

When I tried to use the latest version I was getting 404 errors when trying to load the app. I have not yet tested the app posted above with the latest version.

I tried using the view.html.erb file that you posted with code-server (4.6.0) but now I am having a different issue. The app will start but when I go to connect the page says: Not Found.
The url looks funky too:
https://****/rnode/dgx-a100/30516/rnode/dgx-a100/30516/

if I delete the duplicate part to look like this : https://****/rnode/dgx-a100/30516 I just get a white screen

The logs do not indicate any issues, if I go to the compute node directly on that port I can get into vs code.

having below in view.html.erb semi works

<form id="<%= form_id %>" action="/rnode/<%= host %>/<%= port %>/" method="get" target="_blank">
  <button class="btn btn-primary" type="submit">
    <i class="fa fa-cogs"></i> Connect to VS Code
  </button>
</form>

get the wrong url (still https:///rnode/dgx-a100/30516/rnode/dgx-a100/30516/) but manually changing to https:///rnode/dgx-a100/30516 I am able to login and download extensions. Still dont know why its adding this part twice rnode/dgx-a100/30516/.

Now the problem is the extension that I need doesnt work (jupyter) . Both python and jupyter download fine but when I go to open a jupyter notebook it never loads.
Console error:
The Web Worker Extension Host did not start in 60s, that might be a problem

pop up error: Extension activation failed, run the ‘Developer: Toggle Developer Tools’ command for more information. Source jupyter extension

Can you confirm what version of Ondemand you have deployed? I’m running 2.0.28 and don’t get the weird redirection issue. I ran into it with both an earlier version of ondemand and code-server so I don’t know which update fixed it. For now verify that you are actually using the new version of code-server and update to ondemand 2.0.28 if you can.

The view.html.erb you posted won’t log in as you are not passing in the password.

I am using OnDemand version: v2.0.9 and code-server 4.6.0. Should I try downgrading OnDemand version?

Can you confirm in your version that you are able to load an .ipynb notebook and run a cell?

How about we meet. I’ll DM you a meeting invite.

I blew away the full install (which was installed from source originally using ansible in deepops) and freshly installed using new .deb files for ubuntu 20.04. Also using the latest version of vs code and cloned a clean copy of NMSU_HPC / ood_bc_codeserver · GitLab. With everything being completely reinstalled and up to date I am still having the same exact issues (the issue with the url putting the port hostname and rnode twice but more importantly the jupyter extension still not working. I have also tried switching the python kernel when opening a jupyter notebook but doesnt work either). Any other suggestions?

Versions:
OS Ubuntu 20.04
OnDemand version: 2.1.20220912-127981.1b38c8e.nightly
URL issue https://****/rnode/dgx-a100/60574/rnode/dgx-a100/60574/
Jupyter extension: v2022.8.1002170547
Python extension: v2022.14.0
code-server: 4.6.0 6d3f9ca6a6df30a1bfad6f073f6fa33c0e63abdb with Code 1.70.1
Python 3.8.10 64-bit path: /opt/deepops/env/bin/python

From what I can see this is possible an Apache issue of some kind for the redirect issue. I am on the latest 2.0.x stable release instead of unstable and running RHEL 8 version of apache. Here is what is likely the relevant pit in ood-portal.conf apache config

# Reverse "relative" proxy traffic to backend webserver through IP sockets:
  #
  #     https://ondemand.nmsu.edu:443/rnode/HOST/PORT/index.html
  #     #=> http://HOST:PORT/index.html
  #
  <LocationMatch "^/rnode/(?<host>discovery-(c|g)\\d+-ib0\\.cluster\\.local)/(?<port>\d+)(?<uri>/.*|)">
    AuthType openid-connect
    Require valid-user

    # ProxyPassReverse implementation
    Header edit Location "^([^/]+//[^/]+)|(?=/)|^([\./]{1,}(?<!/))" "/rnode/%{MATCH_HOST}e/%{MATCH_PORT}e"

    # ProxyPassReverseCookieDomain implemenation
    Header edit* Set-Cookie ";\s*(?i)Domain[^;]*" ""

    # ProxyPassReverseCookiePath implementation
    Header edit* Set-Cookie ";\s*(?i)Path[^;]*" ""
    Header edit  Set-Cookie "^([^;]+)" "$1; Path=/rnode/%{MATCH_HOST}e/%{MATCH_PORT}e"

    LuaHookFixups node_proxy.lua node_proxy_handler
  </LocationMatch>

I’m not sure how this compares to what is being generated on Ubuntu. This may need troubleshooting from someone in the core OOD team.

As far as Jupyter is concerned this has to be an issue with either conda not being available or missing packages in the base conda environment. Here is the base environment in that I showed you was working src/sstack/modules/conda/data/base.yaml · main · NMSU_HPC / sstack · GitLab.

I did get this working but in a very hacky way that would be unusable for the average user.

Steps:
Login, start interactive app, click on connect
URL now looks like its supposed to (I think): https://xcitemain.asrc.albany.edu/rnode/dgx-a100/21148/login?to=

get error: 
Not Found
The requested URL was not found on this server.

Go to actual node with above port to see if its running
look at connection.yml output to grab password
https://dgx-a100.asrc.albany.edu:21148
Everything works correctly, including downloading and loading extensions. Not sure what the issue could be now since the url seems to be generated correctly.

I had the same problem - rnode appeared twice in the URL and I got ‘Not found’ in the browser. The URL looks something like this:

https://ood-server/rnode/nodename/port/rnode/nodename/port/

Below are the steps how I make it working

  1. delete one rnode from the URL and it becomes:
    https://ood-server/rnode/nodename/port/
  2. the URL will be redirected to the following URL (in my case), still with double rnode, but with the workspace directory appended as a parameter:
    https://ood-server/rnode/nodename/port/rnode/nodename/port/?workspace=/path/to/job.code-workspace
  3. remove one rnode from the above URL and then it works

I also think it may need troubleshooting from someone in the core OOD team.

I now have the url being generated correctly but it leads to a page with “Not Found
The requested URL was not found on this server.” If I go to the compute node directly with the port generated it works. Also https on compute node for code server only works if I edit .config/code-server/config.yaml and set cert:true (not sure why this wouldn’t be set by default)

I see. You removed login? from the URI in view.html.erb. Not sure why the URI needs login?. @nvonwolf do you know?

Still the URL is not correctly rewrote by the apache server. If no double rnode, it should work properly.

It’s not strictly necessary as the web server will check for a cookie/token and redirect to login if you don’t have it (view.html.erb will submit the password) or to the workspace if you do. I have it in there to do 1 less redirect (not sure if there is much of a load time difference).

Do you see any issue with this url?
https://xcitemain.asrc.albany.edu/rnode/dgx-a100/21148/login?to=
This is what is now being generated and unedited. I am not sure why it is not working if the compute node has it working if accessed directly.

Hi - This seems to be a known issue reported by a lot of folks and I suspect there’s an issue with our proxy.

Which is to say I don’t believe there’s any resolution on your side. We will bump this up in priority and I’ll let folks know on the several discourse topics we have on the same.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.