notebook
notebook copied to clipboard
Jupyter Notebook is broken in Firefox

When I run 'jupyter notebook' it will open the html file in the filesystem and will be displayed incorrectly in the Firefox 67 and 68 (current Betas, I haven't tested 66). This issue does not happen in Chrome or Safari. file:///Users/eduardomorales/Library/Jupyter/runtime/nbserver-81921-open.html
The only way to fix this is to access the URL provided in the terminal instead. http://localhost:8888/?token=57035d2f78d7578f424d28e280855612e6d4b6cfb73f5de7
Seems to be an issue with the most recent release. Using an older release works:
pip install notebook==5.6.0
thank you! this fixed it. This is the third thread I found about this issue, btw.
I also have the same problem, only in Firefox. I don't think using an older version of notebook is a fix, though.
Does anyone know why this happens?
Confirmed not working on Firefox 67 (MacOS Mojave)
Cause is this commit, which changed the way Jupyter Notebook is opened in the browser: https://github.com/jupyter/notebook/commit/270c0f96d761ec3c81e0ef3dae6f39d88677d6b5#diff-f68f5eab41b9092b5b739944f53d5730
Instead of opening <base-url>/?token=<token>
directly, an nbserver-<pid>-open.html
file is now created which redirects to <base-url>/tree?token=<token>
Safari and Chrome have no problems with this redirect, but Firefox does. I have edited the nbserver-<pid>-open.html
file to remove the tree
part and can confirm that this does work in Firefox.
By the way: this same problem exists in jupyter lab
the nbserver-
Seems to be an issue with the most recent release. Using an older release works:
pip install notebook==5.6.0
This solved my issue too, after spending much time diagnosing and attempting several options in vain!
Still an issue in new versions of notebook (for Opera), had to go back to 5.6.0
I have the same issue!
I am having the same issue ("Access to file was denied") on Ubuntu 18.04.3 (and 16.04) using Firefox and Opera.
My specific issue is because Firefox was installed using Snap. Firefox can't access anything outside the home directory. Moving the nbserver-
It looks like this is the intended way snap-installed apps are meant to function, so I'm not sure there's a good fix for this.
Seems to be an issue with the most recent release. Using an older release works:
pip install notebook==5.6.0
I had the same issue using Opera on Ubuntu 18.04 and this fixed it !
Also broken in notebook=6.0.1 & 6.0.0 when using Chromium on Ubuntu 18.04.3. Had to install version 5.6.0 as suggested... seems weird that there has been a major version change but the issue persists. Make me wonder what I'm doing wrong? :-/ EDIT: fixed "Chrome" reference... it is "Chromium" FWIW
Also broken for me:
- Jupyterlab 1.1.3
- Ubuntu 19.04
- Firefox 69.0.3 (64-bit) Snap for Ubuntu
I consider the same problem with Firefox since some versions currently I am on FF 70 under Arch Linux. I have to copy the URL and directly open it in the browser address field. BUT I run a sandboxed Firefox via Firejail. When I run a non sandboxed instance directly via /usr/bin/firefox, Jupyter-Notebook – currently version 6.0.1 – starts and runs fine like it used to before. Although I have in mind everything worked fine with Firejail too I do not remember the versions of Firefox, Firejail or jupyter-notebook when it stopped working.
I have the same issue on Windows Subsystem for Linux (WSL). Because browsers running in Windows can't access files in WSL. I hope to choose either URL access or redirect in settings.
Setting c.NotebookApp.use_redirect_file = False
as described here (https://github.com/jupyter/notebook/issues/4353#issuecomment-570564277) solves this for me
yes this command helped me with Ubuntu 20.04 and Chromium / 15th July 2020
pip install notebook==5.6.0
I was also facing the same issue i changed the default setting of browser from Firefox to Chrome it will continue to work
Setting
c.NotebookApp.use_redirect_file = False
as described here (#4353 (comment)) solves this for me
Not working for me
Ubuntu 18.04 Jupyter Notebook 6.1.3 FF developer edition 80.0b8 64-bit
I have found this is AppArmor for me on ubuntu 20.04, if my default browser is mozilla it opens fine, I have chromium installed from snap store.
if you do a: tail -f /var/log/syslog you may see the reason as below. I have not looked to modify the policy just yet to allow.
apparmor="DENIED" operation="open" profile="snap.chromium.chromium" name="/home/username/.local/share/jupyter/runtime/nbserver-55637-open.html" pid=3385 comm="ThreadPoolForeg" requested_mask="r" denied_mask="r" fsuid=1000 ouid=1000
I had this same problem
Kubuntu 20.10 Chromium Version 87.0.4280.88 (Official Build) snap (64-bit)
Two solutions:
- Downgrade notebook
pip install notebook==5.6.0
- Disable redirect
$ jupyter-notebook --generate-config
Writing default config to: /home/<USER>/.jupyter/jupyter_notebook_config.py
Open that file, uncomment this line and set it to False (it is commented and set to True by default)
c.NotebookApp.use_redirect_file = False
All from command line:
jupyter-notebook --generate-config
sed -i 's/#c\.NotebookApp\.use_redirect_file\s=\sTrue/c\.NotebookApp\.use_redirect_file=False/g' /home/$USER/.jupyter/jupyter_notebook_config.py
Can we push this upstream? It has been almost two years since this issue is open
Doesn't seem to work for jupyter lab
. Added the flag to the configuration file but it is ignored.
The real reason is that your browser (chrome, chromium, opera, ...) is installed as a snap application. Snap prevents access to hidden files. The files are in ~/.local/share/jupyter/runtime
. IMO this is a great security feature: I don't want my browser to access my ssh keys sitting in ~/.ssh
. My suggested solution is that jupyter places the launch file in /tmp/
or ~
and deletes it whenever the server is successfully accessed.
Alternatively for the Jupyter Lab, I patched this file: ~/.local/lib/python3.8/site-packages/jupyter_server/serverapp.py
. Around line 1048 is the property use_redirect_file
. I put the default value to False:
use_redirect_file = Bool(False, config=True,
help="""Disable launching browser by redirect file
I had the same problem.
Ubuntu 20.04.3 LTS Chromium Version 96.0.4664.110 (Official Build) snap (64-bit)
This was the solution in my case:
- Create the configuration file: jupyter-notebook --generate-config
- Edit the configuration file /home/<USER>/.jupyter/jupyter_notebook_config.py and set: c.NotebookApp.use_redirect_file = False
Make sure that this configuration parameter starts at the beginning of the line. If you leave one space at the beginning of the line, you will get the message that access to the file was denied.
This works for jupyter notebook, but when launching jupyter lab I still get an access denied, is there an additional config setting that needs to be set for jupyter lab?
The corresponding issue with jupyter lab is solved by:
- Running
jupyter-lab --generate-config
- Editing the configuration file at
~/.jupyter/jupyter_lab_config.py
; if the line is hashed out unhash it and changec.ServerApp.use_redirect_file = True
toc.ServerApp.use_redirect_file = False
That should do it, good luck! Thanks to @radenkovpy for the actual solution, I merely extrapolated it to jupyter lab.
I had this same problem
Kubuntu 20.10 Chromium Version 87.0.4280.88 (Official Build) snap (64-bit)
Two solutions:
1. Downgrade notebook
pip install notebook==5.6.0
2. Disable redirect
$ jupyter-notebook --generate-config Writing default config to: /home/<USER>/.jupyter/jupyter_notebook_config.py
Open that file, uncomment this line and set it to False (it is commented and set to True by default)
c.NotebookApp.use_redirect_file = False
All from command line:jupyter-notebook --generate-config sed -i 's/#c\.NotebookApp\.use_redirect_file\s=\sTrue/c\.NotebookApp\.use_redirect_file=False/g' /home/$USER/.jupyter/jupyter_notebook_config.py
Can we push this upstream? It has been almost two years since this issue is open
This solved the issue for me. Ubuntu 22.04, Anaconda env, Firefox browser.