notebook
notebook copied to clipboard
Blank page if `local_names` are non trivial
It does not work is c.ServerApp.local_hostnames = ['localhost', 'jupyter'] in config. In brower console one can find this.
6774.bundle.js:1
Failed to load resource: the server responded with a status of 404 (Not Found)
tree:29 Refused to execute script from 'http://jupyter:8888/static/notebook/6774.bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
bundle.js:1 Uncaught (in promise) ChunkLoadError: Loading chunk 6774 failed.
(error: http://jupyter:8888/static/notebook/6774.bundle.js)
at v.f.j (bundle.js:1:49164)
at bundle.js:1:1260
at Array.reduce (<anonymous>)
at v.e (bundle.js:1:1238)
at 37559 (bundle.js:1:101)
at v (bundle.js:1:516)
at bundle.js:1:49784
at bundle.js:1:49858
6621.bundle.js:1
Failed to load resource: the server responded with a status of 404 (Not Found)
tree:1 Refused to execute script from 'http://jupyter:8888/static/notebook/6621.bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Thank you for opening this issue @daskol. I was not able to reproduce this issue myself. Can you share the output of jupyter --version? Can you share more information about your setup, is there jupyter server that you are expecting to connect to? Can you also share the response body of the 404 (Not Found) and the OS that you are running?
It's ArchLinux. jupyter hostname is an alias for 127.0.0.1.
$ jupyter --version
Selected Jupyter core packages...
IPython : 8.20.0
ipykernel : 6.29.0
ipywidgets : 8.1.1
jupyter_client : 8.6.0
jupyter_core : 5.7.1
jupyter_server : 2.12.5
jupyterlab : 4.0.11
nbclient : 0.9.0
nbconvert : 7.14.2
nbformat : 5.9.2
notebook : 7.0.7
qtconsole : not installed
traitlets : 5.14.1
UPD I can access to http://localhost:8888 but not http://jupyter:8888. There is nothing special in server's logs except that some particular request return 404.
Same issue here. Same versions. I downgraded the notebook's version for 7.0.0 but the issue still happening.
edited: in my case, if I open with jupyter notebook --browser firefox it is working
I have a similar problem. The page won't load on chrome (it does on firefox and safari) and the server warns404 GET /static/notebook/6774.bundle.js. For what it's worth forcing a refresh of the jupyter notebook page on chrome resolved the issue, but I only was able to try this once.
I have the same problem, but I did not modify anything regarding hostnames (I use http://127.0.0.1:8888/tree?token=XXX, as usual).
On Chrome, page is blank with these errors in the console :
Failed to load resource: the server responded with a status of 404 (Not Found)
tree?token=XXX:29 Refused to execute script from 'http://127.0.0.1:8888/static/notebook/9670.bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
bundle.js:1 Uncaught (in promise) ChunkLoadError: Loading chunk 9670 failed.
(error: http://127.0.0.1:8888/static/notebook/9670.bundle.js)
at v.f.j (bundle.js:1:49813)
at bundle.js:1:1261
at Array.reduce (<anonymous>)
at v.e (bundle.js:1:1239)
at 37559 (bundle.js:1:101)
at v (bundle.js:1:517)
at bundle.js:1:50433
at bundle.js:1:50507
1018.bundle.js:1
Failed to load resource: the server responded with a status of 404 (Not Found)
tree:1 Refused to execute script from 'http://127.0.0.1:8888/static/notebook/1018.bundle.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
On Firefox, page loads but there are some errors in the console as well.
TypeError: t is undefined
f http://127.0.0.1:8888/static/notebook/3512.bundle.js:1
a http://127.0.0.1:8888/static/notebook/409.bundle.js:1
emit http://127.0.0.1:8888/static/notebook/409.bundle.js:1
emit http://127.0.0.1:8888/static/notebook/409.bundle.js:1
add http://127.0.0.1:8888/static/notebook/514.bundle.js:1
activate http://127.0.0.1:8888/static/notebook/3768.bundle.js:1
promise http://127.0.0.1:8888/static/notebook/6731.bundle.js:1
[409.bundle.js:1:1555](http://127.0.0.1:8888/static/notebook/409.bundle.js)
exceptionHandler http://127.0.0.1:8888/static/notebook/409.bundle.js:1
a http://127.0.0.1:8888/static/notebook/409.bundle.js:1
emit http://127.0.0.1:8888/static/notebook/409.bundle.js:1
emit http://127.0.0.1:8888/static/notebook/409.bundle.js:1
add http://127.0.0.1:8888/static/notebook/514.bundle.js:1
activate http://127.0.0.1:8888/static/notebook/3768.bundle.js:1
promise http://127.0.0.1:8888/static/notebook/6731.bundle.js:1
can't convert undefined to object [1835.bundle.js:1:12558](http://127.0.0.1:8888/static/notebook/1835.bundle.js)
activate http://127.0.0.1:8888/static/notebook/1835.bundle.js:1
I am on MacOS (Ventura).
$ jupyter --version
Selected Jupyter core packages...
IPython : 8.21.0
ipykernel : 6.29.2
ipywidgets : not installed
jupyter_client : 8.6.0
jupyter_core : 5.7.1
jupyter_server : 2.12.5
jupyterlab : 4.1.1
nbclient : 0.9.0
nbconvert : 7.16.0
nbformat : 5.9.2
notebook : 7.1.0
qtconsole : not installed
traitlets : 5.14.1
Hope this helps.
facing the same issue, switching to 127.0.0.1 resolved the issue for me locally.
This is almost surely a cache problem, which is very common with the jupyter server. (See this SO page for example.)
Changing the host name from localhost to 127.0.0.1, or vice-versa , or using Firefox instead of Chrome, or vice-versa, works around the stale cache by using a different cache which may not be so stale.
When a page is entirely constructed with javascript any error causes a blank page. Using a stale cached javascript file in place of the expected version of the file is almost certain to produce an undefined result somewhere in the jupyter javascript code base.
The bug here, if there is one, is probably that jupyter re-uses its obfuscated javascript file names. Given that the file names are just numbers, one would think that when a file is changed its name could also be changed. Why not use uuids for filenames, instead of relatively small numbers?
I also had the same issue (blank page, browser console reveals 404 with 6853.bundle.js) and it cost me a lot of time to find this issue and explanation.
AFAICS, the issue here may be that the main page referencing the bundle is stale – after a shift-reload in Safari, the page suddenly worked, and the numbers of the loaded bundle files have changed. So changing the filename to UUIDs would not solve this problem, I am afraid.
BTW: I am also on MacOS, but I think the exact environment may not be very relevant – I did reinstall my Jupyterlab installation via MacPorts and also tried switching from a python 3.11 environment to a python 3.12 one, but that did not change anything w.r.t. the browser frontend. In fact, I noticed that I could open the notebook via Jupyterlab and have it appear and work perfectly, but "detaching" the notebook again led me to the non-functioning notebook URL with the blank page.
For future travellers, I also hit this because of a cached page after a notebook upgrade. On Chrome, on macOS, "force reload page" is unhelpfully hidden behind Option-Shift Reload (click on the button)
Facing a similar issue, though my symptom is a syntax error in bundle.js (extraneous '}'). Using 127.0.0.1 instead of localhost resolved it. Perhaps related to ipv6 entries in /etc/hosts?
As far as I know, the only way that using 127.0.0.1 instead of localhost could possibly resolve a syntax error in a javascript file is by causing the browser to switch to a different cache. Flushing the current cache without changing the host name should have the same effect.