Open syoh opened 7 months 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.
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:
Hi @syoh , thanks for the clear instructions, as I was unfamiliar with starting jupyter in codespaces. I created a new codespace from your repo, and could confirm the problem. When I removed :8888
from the URL and tried again, I was redirected to a new page with the same issue. I removed :8888
a second time and that time I was properly directed to RStudio.
I was able to successfully launch RStudio properly from your main branch however. There were other changes in the repo, but I'm guessing it was probably due to the update of jupyter-rsession-proxy from 2.0.1 to 2.2.0.
Thank you @ryanlovett for taking the time to confirm the issue and the solution! I confirmed your solution works for me, too. Also, I confirmed that 2.1.0 also works fine, too. Hopefully that helps to narrow down the root cause.
Here are details on the behavior. Note, I tried to apply the patch but it did not help. I used this to apply the patch
pip install git+https://github.com/juzdzema/jupyter-rsession-proxy@patch-1
Changing the url 2x in the sequence below did work.
Here is what I have to do.
Open a JupyterLab with jupyter-rsession-proxy
. Click the RStudio button on the Launcher. For a moment, this url appears
https://crispy-space-memory-q97x6qjp59cx76p-8888.app.github.dev/rstudio
and then is replaced by this url
https://crispy-space-memory-q97x6qjp59cx76p-8888.app.github.dev:8888/rstudio/auth-sign-in?appUri=%2F
Remove the :8888 from the url and reload. That now looks like this
https://crispy-space-memory-q97x6qjp59cx76p-8888.app.github.dev/rstudio/auth-sign-in?appUri=%2F
That will now redirect to. Notice the :8888 reappears
https://crispy-space-memory-q97x6qjp59cx76p-8888.app.github.dev:8888/rstudio/
Now remove the :8888 again so url looks like
https://crispy-space-memory-q97x6qjp59cx76p-8888.app.github.dev/rstudio/
Now that url will work (not redirect) and clicking the button also works and will continue to work.
And here is my devcontainer.json. The py-rocket base image is just an image with JLab and RStudio.
{
"name": "test",
"workspaceFolder": "/home/jovyan",
"image": "ghcr.io/nmfs-opensci/container-images/py-rocket-base:4.4-3.10",
"hostRequirements": {
"cpus": "2"
},
"customizations": {
"vscode": {
"extensions": [
"ms-toolsai.jupyter",
"ms-python.python",
]
}
},
"forwardPorts": [
8888
],
"portsAttributes": {
"8888": {
"label": "Jupyter Lab - py-rocket-base",
"onAutoForward": "openPreview"
}
},
"postCreateCommand": "jupyter lab --ip=0.0.0.0 --port=8888 --allow-root --no-browser --NotebookApp.token='' --NotebookApp.password=''"
}
Update: it only occurs in a special case below with 2.2.0+ and not with 2.1.0.
I am running the Codespaces devcontainer with a Dockerfile with this line at the bottom. It is the same Dockerfile used in my JupyterHub.
EXPOSE 8888
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--no-browser"]
The original poster was using this base image, which also exposes 8888 https://github.com/jupyter/docker-stacks/blob/main/images/base-notebook/Dockerfile
Using this image in a Codespace, doesn't automatically (for me at least) start jupyter lab on port 8888. Instead I run this from a terminal after the Codespace starts
jupyter lab --ip=0.0.0.0 --port=8888 --allow-root --no-browser --NotebookApp.token='' --NotebookApp.password=''
If I use --port=8888
I get the problem, but if I change to--port=8889
, I don't.
Bug description
In Codespace, using jupyter-rsession-proxy to launch RStudio opens a window with a strange-looking URL.
For example,
Jupyter Lab URL: https://bookish-engine-7vjg45pq4xhpw4-8888.app.github.dev/lab RStudio launched URL: https://bookish-engine-7vjg45pq4xhpw4-8888.app.github.dev:8888/rstudio/auth-sign-in?appUri=%2F
How to reproduce
jupyter server list
in terminalExpected behaviour
Open RStudio
Actual behaviour
Your personal set up
Running on Codespaces with this Dockerfile: https://github.com/dddlab/rstudio/blob/update-jupyter-image/.devcontainer/Dockerfile