Jupyter notebook browser page not loading

Here is the solution:
Add this line to your jupyter_notebook_config.py file:

c.NotebookApp.use_redirect_file = False

Hi @simon_sat - did you ever resolve this properly? It’s 2024 and it just happened to me. Trying jupyter lab didn’t work either unfortunately.

it seems like a vscode issue for me. updating vscode solved it

1 Like

Issue seems with this ā€œlocalhost:8888/treeā€.

I started Jupyter Lab it was running fine on 8888 port, then I tried running Jupyter Notebook and it was using 8889/tree it is working fine. So something causing 8888/tree port.
Already, updated all libs and also updated Jupyter Notebook didn’t work.
But if used again localhost:8888/tree, it doesn’t work for jupyter notebook.

I tried EVERYTHING! And you what eventually fixed it? Simply clearing my browser’s cashe. -_-

2 Likes

Indeed, refreshing the page via CTRL + Shift + R (cleaning cache) indeed worked for me.

1 Like

I know that it’s pretty late but still I would like to share the fix. I just went to the specified location and deleted everything inside the runtime. It worked fine after that.

1 Like

I got into the same problem, then I asked ChatGPT, I was told to install a lower version of JupyterNotebook - 6.5.5 (I was using 7.2.2), and it worked successfully.

For me, I run jupyter lab/notebook in miniconda3 inside Ubuntu WSL, it doesn’t load because I’m running jupyterlab in my Windows either, after stop windows’s jupyterlab, both Jupyter Lab and Notebook in Ubuntu WSL run well.

1 Like

Thanks,
As your instruction, I tried 6.5.7 and it worked,
I tried to higher then 7.0.0 and it remained blank in browser.

1 Like

Solved the problem. I tried many things, and while the final thing may have fixed it, I’m not savvy enough to know if it ā€œfixedā€ it.

In the Jupyter Config file, you change a ā€˜localhost’ to ā€˜0.0.0.0’

This is on the machine I’m connecting to:

nano ~/.jupyter/jupyter_notebook_config.py
c.NotebookApp.ip = '0.0.0.0'  # Listens on all network interfaces
c.NotebookApp.open_browser = False

I ignored the above because I could have it run headless in the command, and sometimes wanted it to open in the browser.
c.NotebookApp.port = 8888 # Ensure the port matches your SSH forwarding

I then test ran Jupyter Notebook (after downgrading to 6.5.7) locally. It worked still!

When I tried it via a mobile hotspot to check the network connectivity, it still gave the error above. The way I got around it was to go to the address of ā€˜localhost:8888’ rather than one of the three links provided. I used the token to set up a password. I can now get it to consistently run.

I tried downgrading, which may have helped.
I tried Jupyter Lab, which did not help.
I tried connecting locally over SSH, and was successful, even initially. This was only occurring when trying to connect remotely.

1 Like

I solved it, but I don’t know if this solution is a good way to do it: Locate the ā€˜runtime’ folder. On my Windows system, it is located at C:\Users\Usuario\AppData\Roaming\jupyter. Inside the ā€˜jupyter’ folder, you will find the ā€˜runtime’ folder. Rename it—for example, to ā€˜runtime_’. Then, when you launch Jupyter Notebook from Anaconda Navigator, it should work. A new ā€˜runtime’ folder will be created, and works.

1 Like