jupyterhub / jupyter-remote-desktop-proxy

Run a Linux Desktop on a JupyterHub
BSD 3-Clause "New" or "Revised" License
116 stars 106 forks source link

Using with bundled tigervnc fails with TypeError #43

Closed pnasrat closed 1 year ago

pnasrat commented 1 year ago

Bug description

Using git master (to test the unix socket support)

PR to follow - issue at https://github.com/jupyterhub/jupyter-remote-desktop-proxy/blob/main/jupyter_remote_desktop_proxy/__init__.py#L18

Expected behaviour

Xvnc server starts and is rendered through browser and able to

  1. Open the jupyterlab link in browser
  2. Click on the desktop icon

Actual behaviour

Traceback in docker logs

[W 2023-07-14 15:44:59.270 ServerApp] jupyter_server_proxy | extension failed loading with message: TypeError('expected str, bytes or os.PathLike object, not tuple')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 356, in load_extension
        extension.load_all_points(self.serverapp)
      File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 228, in load_all_points
        return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 228, in <listcomp>
        return [self.load_point(point_name, serverapp) for point_name in self.extension_points]
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 219, in load_point
        return point.load(serverapp)
               ^^^^^^^^^^^^^^^^^^^^^
      File "/opt/conda/lib/python3.11/site-packages/jupyter_server/extension/manager.py", line 147, in load
        return loader(serverapp)
               ^^^^^^^^^^^^^^^^^
      File "/opt/conda/lib/python3.11/site-packages/jupyter_server_proxy/__init__.py", line 47, in _load_jupyter_server_extension
        server_processes += get_entrypoint_server_processes(serverproxy_config)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/conda/lib/python3.11/site-packages/jupyter_server_proxy/config.py", line 100, in get_entrypoint_server_processes
        server_process_config = entry_point.load()()
                                ^^^^^^^^^^^^^^^^^^^^
      File "/opt/install/jupyter_remote_desktop_proxy/__init__.py", line 24, in setup_desktop
        with open(vncserver) as vncserver_file:
             ^^^^^^^^^^^^^^^
    TypeError: expected str, bytes or os.PathLike object, not tuple

How to reproduce

  1. git clone https://github.com/jupyterhub/jupyter-remote-desktop-proxy.git
  2. cd jupyter-remote-desktop-proxy
  3. Edit Dockerfile and comment out turbovnc install as below
  4. docker build --no-cache -t $(whoami)/$(basename ${PWD}) .
  5. docker run --rm -p 8888:8888 $(whoami)/$(basename ${PWD})
  6. Traceback in docker output
# Install TurboVNC (https://github.com/TurboVNC/turbovnc)
# ARG TURBOVNC_VERSION=2.2.6
# RUN wget -q "https://sourceforge.net/projects/turbovnc/files/${TURBOVNC_VERSION}/turbovnc_${TURBOVNC_VERSION}_amd64.deb/download" -O turbovnc.deb \
#  && apt-get install -y -q ./turbovnc.deb \
#     # remove light-locker to prevent screen lock
#  && apt-get remove -y -q light-locker \
#  && rm ./turbovnc.deb \
#  && ln -s /opt/TurboVNC/bin/* /usr/local/bin/
welcome[bot] commented 1 year ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively. welcome You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada: