notebook icon indicating copy to clipboard operation
notebook copied to clipboard

Cant open my jupyter file - 404 GET /static/components/react/react-dom.production.min.js (::1) 2.84ms

Open MollyBai777 opened this issue 4 years ago • 22 comments

404 GET /static/components/react/react-dom.production.min.js (::1) 2.84ms

Does anyone know how to solve this problem? It happened suddenly while I even didn't update or change anything on my jupyter.

I read some said that I need to add “react-dom.production.min.js” file, but cos I am not an experienced jupyter user, I wonder how I can add this file back?

Thanks a lot!

MollyBai777 avatar Jul 10 '20 00:07 MollyBai777

截圖 2020-07-10 上午2 12 28

MollyBai777 avatar Jul 10 '20 01:07 MollyBai777

I've tried this #4771 already, but it still cannot work. Do I ignore anything? Would love to fix this issue. Thanks!

MollyBai777 avatar Jul 10 '20 01:07 MollyBai777

Hi @MollyBai777 - could you please run jupyter --version from the same terminal window in which you typically run jupyter notebook? This will give us an idea of what version you're using for the core jupyter components.

kevin-bates avatar Jul 10 '20 14:07 kevin-bates

Hello, @kevin-bates Thanks for responding.

Below is the result: jupyter core : 4.5.0 jupyter-notebook : 6.0.1 qtconsole : 4.5.5 ipython : 7.8.0 ipykernel : 5.1.2 jupyter client : 5.3.3 jupyter lab : 1.1.4 nbconvert : 5.6.0 ipywidgets : 7.5.1 nbformat : 4.4.0 traitlets : 4.3.3

Thank you again!

MollyBai777 avatar Jul 10 '20 14:07 MollyBai777

Thank you.

Although this issue should have been addressed via 6.0.1, I would recommend upgrading to the current version (6.0.3) and perhaps that upgrade will resolve this. Please try either of the following, depending on your environment, and we'll go from there:

pip install notebook --upgrade

or, for conda envs,

conda update -c conda-forge notebook

kevin-bates avatar Jul 10 '20 15:07 kevin-bates

Hi, @kevin-bates

I just found that if I launch my terminal from anaconda navigator, then no matter typing "pip install notebook --upgrade" or "conda update -c conda-forge notebook", the terminal cannot run anything.

However, if I open the terminal directly and upgrade the version, it works and shows below: jupyter core : 4.6.3 jupyter-notebook : 6.0.3 qtconsole : 4.5.5 ipython : 7.8.0 ipykernel : 5.1.2 jupyter client : 6.1.5 jupyter lab : 1.1.4 nbconvert : 5.6.0 ipywidgets : 7.5.1 nbformat : 4.4.0 traitlets : 4.3.3

Now the jupyter files still can't open.

Thank you!

MollyBai777 avatar Jul 10 '20 15:07 MollyBai777

Since some articles talk about that this problem may result from the wrong default browser, so I've tried to find the "jupyter_notebook_config.py" file, then add the codes below:

import webbrowser webbrowser.register("chrome", None, webbrowser.GenericBrowser(u"/Users/username/library/Application Support/Google/Chrome/Default")) c.NotebookApp.browser = 'chrome'

But it still doesn't help.

MollyBai777 avatar Jul 10 '20 17:07 MollyBai777

Are you still encountering the issue with the react-dom.production.min.js file? If not, please provide the latest output of your notebook server console.

kevin-bates avatar Jul 10 '20 17:07 kevin-bates

截圖 2020-07-10 下午9 43 03

Thank you

MollyBai777 avatar Jul 10 '20 20:07 MollyBai777

This looks correct. I don't see the 404 error on the react js file. What happens when you try to open/create a notebook (and what's displayed on the console afterward)?

((When gathering console log information, its more helpful to use select/copy/paste rather than screenshots. That way, if there are items worth googling, its just a matter of selecting them, rather than re-type. Thanks.))

kevin-bates avatar Jul 10 '20 20:07 kevin-bates

No problem. :)

It used to open jupyter on Chrome directly, now I need to enter the URL myself, this is a change, but which is ok.

The problem is that when I try to open some files, the screen will be blank, and once I open these files, the entire jupyter will be unusable. But if I don't open these files, it will be fine whether I open old files or create new ones. Since I cannot open these two files, I cannot judge the possible cause. But I really need to save these two files back.

  1. When I open those problem files, the console displayed: [W 22:37:19.293 NotebookApp] 404 GET /static/components/react/react-dom.production.min.js (::1) 1.52ms referer=http://localhost:8888/notebooks/Fashion/Polyvore.ipynb [W 22:37:19.320 NotebookApp] 404 GET /static/components/react/react-dom.production.min.js (::1) 2.37ms referer=http://localhost:8888/notebooks/Fashion/Polyvore.ipynb

  2. When I create a new notebook: [I 22:39:42.469 NotebookApp] Creating new notebook in /Fashion [W 22:39:44.293 NotebookApp] 404 GET /static/components/react/react-dom.production.min.js (::1) 2.98ms referer=http://localhost:8888/notebooks/Fashion/Untitled2.ipynb?kernel_name=python3 [W 22:39:44.322 NotebookApp] 404 GET /static/components/react/react-dom.production.min.js (::1) 2.46ms referer=http://localhost:8888/notebooks/Fashion/Untitled2.ipynb?kernel_name=python3 [I 22:39:45.054 NotebookApp] Kernel started: b3bf3fd0-e786-4262-9de2-1fcac36f6fe2 [I 22:39:45.765 NotebookApp] Adapting from protocol version 5.1 (kernel b3bf3fd0-e786-4262-9de2-1fcac36f6fe2) to 5.3 (client).

Thank you so much

MollyBai777 avatar Jul 10 '20 21:07 MollyBai777

It's strange that you're still missing the file. I don't really know enough about front-end stuff to be of more help here. Did you happen to try the workaround described in https://github.com/jupyter/notebook/pull/4772#issuecomment-515794823?

The screenshot you provided previously doesn't show the same file (notebook expects the .min.js version) or the correct location - which should be in .../site-packages/notebook/static/components/react in the Python installation area.

kevin-bates avatar Jul 11 '20 02:07 kevin-bates

v16 13 1 v16 0 0

MollyBai777 avatar Jul 11 '20 21:07 MollyBai777

Hi @kevin-bates I found the correct location and have tried two different versions(v16.0.0 and v16.13.1), but it doesn't work for me. In fact, even worse. Before I tried, I could open other jupyter files and create a new one, but now I cannot open or create anything, the screen is blank. It seems that I lost all my files. Could you please give me some suggestions? Thank you so much!

MollyBai777 avatar Jul 11 '20 22:07 MollyBai777

Your OS seems : macOS, Hence, I can't reproduce the same, but in any debian distro in which I have faced the issue [not installing Anaconda], i resolved it using the following commands : wget -q0- https://unpkg.com/react-dom@16/umd/react-dom.production.min.js find / -path '*/static/components' 2>/dev/null | sudo xargs -i cp react-dom.production.min.js {}/react/

Hope it helps.

Aanzil avatar Oct 23 '21 15:10 Aanzil

Hi @MollyBai777 btw I had the same problem on windows, have you found any solution for this problem...?? image

abraar0305 avatar Apr 27 '22 05:04 abraar0305

The same/similar issue just happened on my Linux(Ubuntu) machine when I started a notebook first time in the morning (after suspend):

[W 2024-03-06 08:57:21.627 ServerApp] 404 GET /static/notebook/6774.bundle.js ([email protected]) 30.71ms referer=http://localhost:8888/notebooks/report_execution.ipynb
[W 2024-03-06 08:57:21.701 ServerApp] 404 GET /static/notebook/1018.bundle.js ([email protected]) 1.65ms referer=http://localhost:8888/notebooks/report_execution.ipynb
[W 2024-03-06 08:57:21.780 ServerApp] 404 GET /static/notebook/6919.bundle.js ([email protected]) 1.87ms referer=http://localhost:8888/notebooks/report_execution.ipynb

When I execute locate 6774.bundle.js, the file exists in other venvs I created some time ago, but it is missing in the current venv which I created yesterday. I deleted the venv and completely recreated it and ran pip install -r requirements.txt, did not help.

I use Ubuntu 22.04, Python 3.11. requirements.txt:

jupyter==1.0.0
gooddata-pandas==1.14.0
matplotlib==3.8.3

jaceksan avatar Mar 06 '24 08:03 jaceksan

Downgrade to 6.x helped (suggested here).

requirements.txt:

# jupyter==1.0.0
notebook==6.1.5

jaceksan avatar Mar 06 '24 08:03 jaceksan

Hey, I don't know if this will work for you, but on my machine (Mac OS 14.6, using Firefox 128.0.3), I fixed the problem by running jupyter notebook --generate-config in my terminal (and then overwriting my current config file), and then I cleared the cache using the instructions here (https://support.mozilla.org/en-US/kb/how-clear-firefox-cache). I had to modify the config file a little to get it to open only in Firefox but it works fine now.

dovidel avatar Aug 09 '24 08:08 dovidel

Hey, I don't know if this will work for you, but on my machine (Mac OS 14.6, using Firefox 128.0.3), I fixed the problem by running jupyter notebook --generate-config in my terminal (and then overwriting my current config file), and then I cleared the cache using the instructions here (https://support.mozilla.org/en-US/kb/how-clear-firefox-cache). I had to modify the config file a little to get it to open only in Firefox but it works fine now.

Thanks! However, meanwhile, I bumped all libraries, and now everything works as expected:

https://github.com/jaceksan/gooddata-data-pipeline/commit/f85d92dc97bc22432ecf7d1812de9cd563670ac0#diff-cfd85ca74ceadc823b1aeed352dfb402e54662c4baec30117effe607fcc76e45

jaceksan avatar Aug 09 '24 12:08 jaceksan

Downgrade to 6.x helped (suggested here).

requirements.txt:

# jupyter==1.0.0
notebook==6.1.5

Thanks a lot. It worked for me.

nayakphy avatar Aug 29 '24 03:08 nayakphy