Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean pip install of v7.0.2 launches blank web page at localhost/tree in FireFox, but works in Google Chrome #7009

Closed
gutow opened this issue Aug 11, 2023 · 13 comments
Labels

Comments

@gutow
Copy link
Contributor

gutow commented Aug 11, 2023

Description

A clean install of notebook into a new virtual environment launches without populating any information in the Home page in FireFox 116.0.2, but works in recent Google Chrome. Jupyter lab command works in both.

This may be a FireFox issue, but I am not sure what to report. Help with diagnosis would be appreciated.

The page source does contain some javascript:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Home</title>
  
  <link rel="icon" type="image/x-icon" href="[/static/favicons/favicon.ico](view-source:http://localhost:8888/static/favicons/favicon.ico)" class="favicon">
  

  
  <link rel="stylesheet" type="text/css" href="[/custom/custom.css](view-source:http://localhost:8888/custom/custom.css)">
  
</head>
<body>
  <script id="jupyter-config-data" type="application/json">
    {"allow_hidden_files": false, "appName": "Jupyter Notebook", "appNamespace": "notebook", "appSettingsDir": "/Users/gutow/.local/share/virtualenvs/JupyterTesting-mtYmOuHW/share/jupyter/lab/settings", "appUrl": "/lab", "appVersion": "7.0.2", "baseUrl": "/", "buildAvailable": true, "buildCheck": true, "cacheFiles": true, "devMode": false, "disabledExtensions": [], "exposeAppInBrowser": false, "extensionManager": {"can_install": true, "install_path": "/Users/gutow/.local/share/virtualenvs/JupyterTesting-mtYmOuHW", "name": "PyPI"}, "extraLabextensionsPath": [], "federated_extensions": [{"extension": "./extension", "load": "static/remoteEntry.aa1060b2d1221f8e5688.js", "name": "jupyterlab_pygments", "style": "./style"}, {"extension": "./extension", "load": "static/remoteEntry.f294278414d0a929e4ae.js", "mimeExtension": "./mimeExtension", "name": "jupyterlab-plotly"}, {"extension": "./extension", "load": "static/remoteEntry.e98843e95662ee3208a9.js", "name": "@jupyter-notebook/lab-extension", "style": "./style"}, {"extension": "./extension", "load": "static/remoteEntry.98b8a827bfc5f86e95d2.js", "name": "@jupyter-widgets/jupyterlab-manager"}], "frontendUrl": "/", "fullAppUrl": "/lab", "fullLabextensionsUrl": "/lab/extensions", "fullLicensesUrl": "/lab/api/licenses", "fullListingsUrl": "/lab/api/listings", "fullMathjaxUrl": "/static/nbclassic/components/MathJax/MathJax.js", "fullSettingsUrl": "/lab/api/settings", "fullStaticUrl": "/static/notebook", "fullThemesUrl": "/lab/api/themes", "fullTranslationsApiUrl": "/lab/api/translations", "fullTreeUrl": "/lab/tree", "fullWorkspacesApiUrl": "/lab/api/workspaces", "jupyterConfigDir": "/Users/gutow/.jupyter", "labextensionsPath": ["/Users/gutow/.local/share/virtualenvs/JupyterTesting-mtYmOuHW/share/jupyter/labextensions", "/Users/gutow/Library/Jupyter/labextensions", "/usr/local/share/jupyter/labextensions", "/usr/share/jupyter/labextensions"], "labextensionsUrl": "/lab/extensions", "licensesUrl": "/lab/api/licenses", "listingsUrl": "/lab/api/listings", "mathjaxConfig": "TeX-AMS-MML_HTMLorMML-full,Safe", "nbclassic_enabled": true, "news": {"disabled": false}, "notebookPage": "tree", "notebookStartsKernel": true, "notebookVersion": "[2, 7, 0]", "preferredPath": "/", "quitButton": true, "rootUri": "file:///Users/gutow/Documents/Programming/JupyterTesting", "schemasDir": "/Users/gutow/.local/share/virtualenvs/JupyterTesting-mtYmOuHW/share/jupyter/lab/schemas", "settingsUrl": "/lab/api/settings", "staticDir": "/Users/gutow/.local/share/virtualenvs/JupyterTesting-mtYmOuHW/lib/python3.11/site-packages/notebook/static", "templatesDir": "/Users/gutow/.local/share/virtualenvs/JupyterTesting-mtYmOuHW/lib/python3.11/site-packages/notebook/templates", "terminalsAvailable": true, "themesDir": "/Users/gutow/.local/share/virtualenvs/JupyterTesting-mtYmOuHW/share/jupyter/lab/themes", "themesUrl": "/lab/api/themes", "token": "b6ce77946202876985a221ff9a6a414cb1efce94ab72ed91", "translationsApiUrl": "/lab/api/translations", "treePath": "", "treeUrl": "/lab/tree", "userSettingsDir": "/Users/gutow/.jupyter/lab/user-settings", "virtualDocumentsUri": "file:///Users/gutow/Documents/Programming/JupyterTesting/.virtual_documents", "workspacesApiUrl": "/lab/api/workspaces", "workspacesDir": "/Users/gutow/.jupyter/lab/workspaces", "wsUrl": ""}
  </script>
  <script src="[/static/notebook/bundle.js](view-source:http://localhost:8888/static/notebook/bundle.js)" main="index"></script>

  <script type="text/javascript">
    /* Remove token from URL. */
    (function () {
      var parsedUrl = new URL(window.location.href);
      if (parsedUrl.searchParams.get('token')) {
        parsedUrl.searchParams.delete('token');
        window.history.replaceState({ }, '', parsedUrl.href);
      }
    })();
  </script>

</body>
</html>

Reproduce

  1. Create a new pipenv virtual environment using python 3.11.4 on MacOS (pipenv shell).
  2. Install notebook pip install notebook (does not seem to matter if manually install lab first).
  3. Launch the notebook jupyter notebook.

A blank page opens in my browser (latest Firefox).

Expected behavior

I expect the standard list of files and notebooks in the working directory.

Context

  • Operating System and version: MacOS 13.5
  • Browser and version: FireFox 116.02
  • Jupyter Notebook version:
pip list |grep notebook
notebook                  7.0.2
notebook_shim             0.2.3
pip list | grep jupyter
jupyter_client            8.3.0
jupyter_core              5.3.1
jupyter-events            0.7.0
jupyter-lsp               2.2.0
jupyter_server            2.7.0
jupyter_server_terminals  0.4.4
jupyterlab                4.0.4
jupyterlab-pygments       0.2.2
jupyterlab_server         2.24.0
jupyter --version
Selected Jupyter core packages...
IPython          : 8.14.0
ipykernel        : 6.25.1
ipywidgets       : not installed
jupyter_client   : 8.3.0
jupyter_core     : 5.3.1
jupyter_server   : 2.7.0
jupyterlab       : 4.0.4
nbclient         : 0.8.0
nbconvert        : 7.7.3
nbformat         : 5.9.2
notebook         : 7.0.2
qtconsole        : not installed
traitlets        : 5.9.0


Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
jupyter notebook
[I 2023-08-11 10:48:41.417 ServerApp] Package notebook took 0.0000s to import
[I 2023-08-11 10:48:41.423 ServerApp] Package jupyter_lsp took 0.0061s to import
[W 2023-08-11 10:48:41.423 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-11 10:48:41.427 ServerApp] Package jupyter_server_terminals took 0.0032s to import
[I 2023-08-11 10:48:41.427 ServerApp] Package jupyterlab took 0.0000s to import
[I 2023-08-11 10:48:41.439 ServerApp] Package notebook_shim took 0.0000s to import
[W 2023-08-11 10:48:41.439 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-08-11 10:48:41.440 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-08-11 10:48:41.441 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-08-11 10:48:41.442 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-08-11 10:48:41.444 ServerApp] notebook | extension was successfully linked.
[I 2023-08-11 10:48:41.557 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-08-11 10:48:41.573 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-08-11 10:48:41.574 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-08-11 10:48:41.574 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-08-11 10:48:41.575 LabApp] JupyterLab extension loaded from /Users/gutow/.local/share/virtualenvs/JupyterTesting-mtYmOuHW/lib/python3.11/site-packages/jupyterlab
[I 2023-08-11 10:48:41.575 LabApp] JupyterLab application directory is /Users/gutow/.local/share/virtualenvs/JupyterTesting-mtYmOuHW/share/jupyter/lab
[I 2023-08-11 10:48:41.575 LabApp] Extension Manager is 'pypi'.
[I 2023-08-11 10:48:41.576 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-08-11 10:48:41.577 ServerApp] notebook | extension was successfully loaded.
[I 2023-08-11 10:48:41.578 ServerApp] Serving notebooks from local directory: /Users/gutow/Documents/Programming/JupyterTesting
[I 2023-08-11 10:48:41.578 ServerApp] Jupyter Server 2.7.0 is running at:
[I 2023-08-11 10:48:41.578 ServerApp] http://localhost:8888/tree?token=d068a6c8046a9fe9b5e19c8cc8f12453450709918106a463
[I 2023-08-11 10:48:41.578 ServerApp]     http://127.0.0.1:8888/tree?token=d068a6c8046a9fe9b5e19c8cc8f12453450709918106a463
[I 2023-08-11 10:48:41.578 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-08-11 10:48:41.580 ServerApp] 
To access the server, open this file in a browser:
    file:///Users/gutow/Library/Jupyter/runtime/jpserver-3362-open.html
Or copy and paste one of these URLs:
    http://localhost:8888/tree?token=d068a6c8046a9fe9b5e19c8cc8f12453450709918106a463
    http://127.0.0.1:8888/tree?token=d068a6c8046a9fe9b5e19c8cc8f12453450709918106a463

[I 2023-08-11 10:48:41.588 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server

Browser Output
Uncaught (in promise) TypeError: g[e] is undefined
    v http://localhost:8888/static/notebook/bundle.js:1
    53680 http://localhost:8888/static/notebook/3680.bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
    I http://localhost:8888/static/notebook/bundle.js:1
    e http://localhost:8888/static/notebook/bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
    89605 http://localhost:8888/static/notebook/9605.bundle.js:2
    v http://localhost:8888/static/notebook/bundle.js:1
    I http://localhost:8888/static/notebook/bundle.js:1
    e http://localhost:8888/static/notebook/bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
    32549 http://localhost:8888/static/notebook/2401.bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
    72401 http://localhost:8888/static/notebook/2401.bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
    I http://localhost:8888/static/notebook/bundle.js:1
    e http://localhost:8888/static/notebook/bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
    65733 http://localhost:8888/static/notebook/5733.bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
    I http://localhost:8888/static/notebook/bundle.js:1
    e http://localhost:8888/static/notebook/bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
    60880 http://localhost:8888/static/notebook/880.bundle.js:1
    60880 http://localhost:8888/static/notebook/880.bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
    promise callback*37559 http://localhost:8888/static/notebook/bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
     http://localhost:8888/static/notebook/bundle.js:1
     http://localhost:8888/static/notebook/bundle.js:1
[bundle.js:1:511](http://localhost:8888/static/notebook/bundle.js)
    60880 http://localhost:8888/static/notebook/880.bundle.js:1
    (Async: EventListener.handleEvent)
    60880 http://localhost:8888/static/notebook/880.bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
    (Async: promise callback)
    37559 http://localhost:8888/static/notebook/bundle.js:1
    v http://localhost:8888/static/notebook/bundle.js:1
     http://localhost:8888/static/notebook/bundle.js:1
     http://localhost:8888/static/notebook/bundle.js:1
@gutow gutow added bug status:Needs Triage Applied to issues that need triage labels Aug 11, 2023
@JasonWeill
Copy link
Collaborator

Yesterday, I installed a fresh install of Notebook 7.0.2, and Firefox 102.13.0esr displayed the UI as expected. Not sure whether the problem is related to the mainline Firefox releases.

@gutow
Copy link
Contributor Author

gutow commented Aug 13, 2023

Firefox 102.13.0esr

Latest esr is 115.1.0esr, but I suspect the issue is something recent in FF mainline. My institution requires regular mainline updates. Things were working a couple of weeks ago. Considering the rapidity of mainline updates that could have been a couple of updates ago.

@defjaf
Copy link

defjaf commented Aug 15, 2023

I have seen similar things with Safari on macOS. I think it may be related to caches and token/password security. Switching between localhost and 127.0.0.1 seems to help, as does trying a different port from 8888.

@gutow
Copy link
Contributor Author

gutow commented Aug 15, 2023

I have seen similar things with Safari on macOS. I think it may be related to caches and token/password security. Switching between localhost and 127.0.0.1 seems to help, as does trying a different port from 8888.

That appears to be it. Switching from localhost, which is the default to 127.0.0.1 fixes the problem. Now the question is if the cache issue is MacOS related or FireFox related? As Chrome and older FireFoxes work I am inclined to believe it is FF.

@ialexsilva
Copy link

I have the similiar problem with fresh new install 7.0.2 with Google Chrome 115.0.5790.170

@gutow
Copy link
Contributor Author

gutow commented Aug 16, 2023

I have the similiar problem with fresh new install 7.0.2 with Google Chrome 115.0.5790.170

Is this also on MacOS?

@cayla
Copy link

cayla commented Aug 16, 2023

Hmm, I am having a similar issue except its Safari failing, not Firefox.

Login pages is fine, post login seemingly blank page on Safari (with some JS in page source, but not much else).

In Safari's console, I do see:

Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'g[e].call')

There is a brief stutter / pause, but the notebook fully loads as expected in both Firefox and Chrome (and no console errors)

On a mac. (Apple Silicon, Ventura 13.5 (22G74))
Safari version: 16.6.
Firefox: 116.0.2 (64-bit)
Chrome: 115.0.5790.170 (Official Build) (arm64)

jupyter@jenkins-update-requi-fddec6a7-jupyter-74959b8d7-tnscd:~$ jupyter --version
Selected Jupyter core packages...
IPython          : 8.14.0
ipykernel        : 6.25.1
ipywidgets       : 8.1.0
jupyter_client   : 8.3.0
jupyter_core     : 5.3.1
jupyter_server   : 2.7.1
jupyterlab       : 4.0.5
nbclient         : 0.8.0
nbconvert        : 7.7.3
nbformat         : 5.9.2
notebook         : 7.0.2
qtconsole        : 5.4.3
traitlets        : 5.9.0

@defjaf
Copy link

defjaf commented Aug 16, 2023

I don't think this has anything to do with the particular browser: it is something like a cache problem in whatever browser you normally use, or were using before the upgrade. Does seem to be related to macOS, somehow, but maybe that is reporting bias?

@cayla
Copy link

cayla commented Aug 16, 2023

Oh snap, you are right. I feel like an idiot. Hard refreshed and I am working in Safari now.

(Same ~0.5s stutter load as the other browsers, but otherwise fine, no more console errors).

@ialexsilva
Copy link

ialexsilva commented Aug 17, 2023

I have the similiar problem with fresh new install 7.0.2 with Google Chrome 115.0.5790.170

Is this also on MacOS?

Yes! macOS: Monterey

@gutow
Copy link
Contributor Author

gutow commented Aug 17, 2023

I have verified that this is a cookie and caching issue. I discovered that my institution's defaults for FF cause it to save everything across launches of the browser. At some point this overrode my preference to clear the cache on each restart. Manually clearing the cache and cookies caused things to work properly. I have reset my browser to my preference of clearing everything on relaunch. I am still mystified as to why lab still worked while notebook did not. Thus, I am leaving this open for 24 more hours in case somebody thinks that discrepancy should be pursued. After that I will close the issue as resolved by forcing clearing of caches.

@odinsbane
Copy link

I had this problem with Firefox on WSL (windows subsystem for linux). It happened after I created a new virtual environment with a fresh notebook install. I erased all of my history for firefox and it appears to be working again.

@gutow gutow closed this as completed Nov 10, 2023
@johann-petrak
Copy link

johann-petrak commented May 17, 2024

Same problem here, switching between localhost and 127.0.0.1 does not help. If this happens on different browsers, why has this issue been closed? Not dealing with caching properly seems to be a bug in the notbook program to me.
The workaround of using a fresh browser installation, clearing caches, erasing history etc seems way too disruptive if the browser is used for other things as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants