notebook
notebook copied to clipboard
I cant access to JN with token when I use firefox.
Hello,
So my default browser is firefox. When I start jupyter notebook I get the usual respond and a link such as: Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8888/?token=7c014a1c5217f33143de0a891f0623f49afc4513761e728c. However when I paste this code to firefox, I get redirected to http://localhost:8888/tree no matter what. And that requires Password and Token (which does not work when I still paste the token). However if I paste my link to Chrome, it works fine and I dont even get asked authentication. I use firefox for everything so it is a bit annoying facing this issue. Any thoughts on this?
Thanks!
Do you have any unusual config in Firefox, such as blocking cookies?
Umm, do you know which particular preference names I should check under about:config?
I don't know, sorry. But the defaults should be fine, so unless you know that you've configured it to ignore cookies or something, it's probably not that.
What about browser extensions?
Every configuration is in default. I only have AdBlock as an extension but jupyter notebook used to work in Firefox with that extension installed.
I have fixed the problem by editing the jupyer notebook config file:
c.NotebookApp.token = ''
c.NotebookApp.password = ''
That's essentially disabling all security, which we don't recommend. You may want to try setting an explicit password by running jupyter notebook password at the command line.
Ran into a similar situation using firefox a couple of days ago. In addition to running jupyter notebook password, I had to clear some cookies on my browser.
Looks like I've got similar issue.
Firefox opens notebook, but after some time writes "Autosave failed!" and displays orange plate with the word "Forbidden" on saving attempts.
There is a new version of the notebook coming out very soon which should fix this. Please test the release candidate if you can!
On Tue, 8 May 2018, 1:44 p.m. wl2776, [email protected] wrote:
Looks like I've got similar issue.
Firefox opens notebook, but after some time writes "Autosave failed!" and displays orange plate with the word "Forbidden" on saving attempts.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jupyter/notebook/issues/3301#issuecomment-387375622, or mute the thread https://github.com/notifications/unsubscribe-auth/AAUA9Z5Jdah7GrDh6QBx_zfdlpQPyMxKks5twYULgaJpZM4R4NGA .
Mine used to work great but now tends to forget the token.
What version of the notebook do you have (jupyter notebook --version)? We fixed a bug relating to that recently.
@takluyver I'm using 5.4.1.
Try upgrading to 5.5.0
@takluyver Upgrading fixed my problem.
It seems like the token passed via the URL is being altered by some middle layer. See this log for demonstration:
[I 10:48:42.128 NotebookApp] The Jupyter Notebook is running at:
[I 10:48:42.129 NotebookApp] http://localhost:8888/?token=1c9b13fc28608e7bd2b7bb2d9b491838080a47c58af4b17f
....
[I 10:48:42.412 NotebookApp] Accepting one-time-token-authenticated connection from 127.0.0.1
[I 10:48:46.459 NotebookApp] 302 GET /tree?token=f5faa7ce47aaf66aca1b6ccc283afe5754c9efcbf5fe65d0 (127.0.0.1) 1.16ms
If one copy/pasted the generated URL it works as expected, so something is fiddling around with the token before passing it to the browser. As observed this only affects Firefox (only tested on Linux). The observed behaviour is still present in notebook-5.5.0, but I suspect that Firefox or the layer below it is the culprit as other browsers handle the URL correctly.
When Jupyter opens the browser for you, it uses a second token which is valid for only one use. This is deliberate, because the command line arguments you launch a process with are visible to other users on the system, so someone could copy the token from the command line arguments and access your server.
Ok, this makes sense. But xdg-open is a fairly common approach of delegating to the standard browser. Are there any changes we can have the one-time tokens for this use-case?
It is actually weird, that the token has already been used before the real browser is invoked, because xdg-open should not make any connection.
I'm not quite sure what you mean. We don't use xdg-open, we use Python's webbrowser module, which tries to open the right browser on any platform.
The token that's printed in the terminal output ...is running at... is the regular, multi-use token. The single use token is only used for opening the browser.
On 09/02/2018 05:37 PM, Thomas Kluyver wrote:
I'm not quite sure what you mean. We don't use xdg-open, we use Python's webbrowser module, which tries to open the right browser on any platform.
Sorry let me clarify this. The webbrowser module uses xdg-open to select the users standard browser on freedesktop enabled systems. It is a very thin wrapper which reads a configuration file pointing to the users browser and then passes the URL as command line argument to the desired program.
The token that's printed in the terminal output |...is running at...| is the regular, multi-use token. The single use token is only used for opening the browser. xdg-open is correctly invoked with the one time token and passes it on to the desired browser. However the one time token is not accepted any more when the real browser is finally invoked. The notebook server log indicates that the token got accepted though.
Hello, So my default browser is firefox. When I start jupyter notebook I get the usual respond and a link such as:
Copy/paste this URL into your browser when you connect for the first time, to login with a token: http://localhost:8888/?token=7c014a1c5217f33143de0a891f0623f49afc4513761e728c. However when I paste this code to firefox, I get redirected tohttp://localhost:8888/treeno matter what. And that requires Password and Token (which does not work when I still paste the token). However if I paste my link to Chrome, it works fine and I dont even get asked authentication. I use firefox for everything so it is a bit annoying facing this issue. Any thoughts on this?Thanks!
With the same link try it on Google chrome you can able to open jupyter note book
Have you disabled cookies (or installed some addon that blocks them) in Firefox? That behaviour sounds like what you'd see with cookies disabled.
The thing is that xdg-open already accesses the URL containing the one-time token, so the token is invalid upon the desired (any real browser) access. This is just an issue with xdg-open, not jupyter.
@marscher xdg-open is mostly a generic wrapper over desktop-specific open commands (like gio open for Gnome and kde-open for KDE). I don't think it accesses the URL itself. It's possible that your desktop does access it before passing it to the browser, though.
@takluyver It does access it for whatever reason, I see it in the log file of the server. I'm on KDE Plasma (and konsole to launch jupyter).
i installAnaconda Python 3.7 in win 7 but my jupyter nootnbook is opening in my browozer, i tride too much but faild please hlep me .
Having the same issue. I thought it was something else for awhile until I opened it in Chromium and discovered it was indeed firefox.
I had previously used Firefox and it worked fine. Not sure if it is my firefox settings conflicting with jupyter setting, but it is clearly something.
I do have firefox debugging enabled I believe which may be an issue here?
Bueller? I just switched to Firefox and the same happens to me. Pasting in the url with the token led me to a page prompting me for the token, and pasting the token in the field blips the page, but does nothing. I'm on MacOS 14.7.1, FF 135.0 installed yesterday, no modifications other than enabling vertical sidebar.