Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

can't run JupyterDash.infer_jupyter_proxy_config() in Jupyterhub #62

Closed
statiksof opened this issue May 19, 2021 · 8 comments · Fixed by #84
Closed

can't run JupyterDash.infer_jupyter_proxy_config() in Jupyterhub #62

statiksof opened this issue May 19, 2021 · 8 comments · Fixed by #84

Comments

@statiksof
Copy link

statiksof commented May 19, 2021

I am not able to run JupyterDash.infer_jupyter_proxy_config() in Jupyterhub. There is no error message, cell remains in busy state without any output. Do you have any idea?

  • app.run_server() returns 127.0.0.1:8005 which will not work from outside
  • app.run_server("mode=jupyterlab") also won't work
  • I also see in the browser console: blocked mixed content: the page was loaded over HTTPS, but requested an insecure frame 'http://ip:8050/'. This request has been blocked; the content must be served over HTTPS.

only thing working is opening the ip:8050 in another tab and I can see the dashboard.

@zakandrewking
Copy link

We are seeing a similar issue. Jupyterhub never responds to this request:

_dash_comm.send({

@LukaPitamic
Copy link

Same here. We want to develop dash apps in jupyterlab hub (tljh).
image

@datainvestor
Copy link

Any progress on this issue?

@LukaPitamic
Copy link

me waiting also ;)

@gravelrider
Copy link

Same here.
Are there any updates on this issue?

@edmundhighcock
Copy link

+1

@edmundhighcock
Copy link

edmundhighcock commented Mar 9, 2022

I have a docker MWE to replicate this:

FROM python@sha256:743d52e1c66f456f40d1e673fe580d0ebda7b97a926c81678dedfed2d4a3fd31

RUN apt update

# Install jupyterhub
RUN apt install -y nodejs npm && pip install jupyterhub && \
    npm install -g configurable-http-proxy && pip install jupyterlab

RUN pip install jupyter-dash && jupyter lab build && \
    pip install jupyter-server-proxy && \
    pip install jupyter-dash && \
    jupyter lab build

RUN mkdir -p /jupyter_keys && \
    cd /jupyter_keys && \
    openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -sha256 -days 365 -nodes -subj "/C=IE/ST=County Dublin/L=Dublin/O=MyOrg/OU=JupyterPeeps/CN=Jupyter Hub" 

RUN useradd testuser && echo "testuser:testpassword" | chpasswd && mkdir -p /home/testuser && chown testuser /home/testuser
CMD jupyterhub --ip 0.0.0.0 --port 443 --ssl-key /jupyter_keys/key.pem --ssl-cert /jupyter_keys/cert.pem  &  sleep 1720d

Build this dockerfile, then launch it, connect as testuser and try running this in a new notebook:

from jupyter_dash import JupyterDash

JupyterDash.infer_jupyter_proxy_config()

@psavery
Copy link

psavery commented Mar 25, 2022

It appears that about a year ago, ipykernel changed several functions into coroutines. That includes this function being called in jupyter-dash.

Thus, that function call needs to be changed to maybe something like this:

loop = asyncio.get_running_loop()
loop.run_until_complete(kernel.do_one_iteration())

That would hopefully fix it.

For now, I'm just downgrading ipykernel to 5.5.4 (the version immediately before that change) and the jupyter dash example seems to work...

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

Successfully merging a pull request may close this issue.

7 participants