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

2.0.2 reports location of browser launch file, but does not create it #1143

Closed
bollwyvl opened this issue Dec 21, 2022 · 0 comments · Fixed by #1144
Closed

2.0.2 reports location of browser launch file, but does not create it #1143

bollwyvl opened this issue Dec 21, 2022 · 0 comments · Fixed by #1144
Labels

Comments

@bollwyvl
Copy link
Contributor

bollwyvl commented Dec 21, 2022

Description

The change to only writing the launch file if automatically opening causes issues in a number of situations:

  • starting with jupyter lab --no-browser --debug reports the location of the browser launch file
    • but it doesn't exist
  • python -m jupyterlab.browser_check always fails
    • this is actively breaking a number of downstream CI setups, such as ipywidgets

Reproduce

  • pip install jupyterlab==3.5.2 jupyter_server==2.0.2 (and nodejs... somehow)
  • python -m jupyterlab.browser_check
  • see a couple minutes of node junk
  • see a cryptic error
(default) weg@floki:~/projects/ipywidgets_/ipywidgets$  python -m jupyterlab.browser_check
[I 2022-12-20 22:30:15.771 ServerApp] __main__ | extension was successfully linked.
[I 2022-12-20 22:30:15.774 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2022-12-20 22:30:15.777 ServerApp] jupyterlab | extension was successfully linked.
[I 2022-12-20 22:30:15.780 ServerApp] nbclassic | extension was successfully linked.
[I 2022-12-20 22:30:15.785 ServerApp] notebook_shim | extension was successfully linked.
[I 2022-12-20 22:30:15.865 ServerApp] notebook_shim | extension was successfully loaded.
[I 2022-12-20 22:30:15.866 BrowserApp] JupyterLab extension loaded from /~/projects/ipywidgets_/envs/default/lib/python3.10/site-packages/jupyterlab
[I 2022-12-20 22:30:15.866 BrowserApp] JupyterLab application directory is /~/projects/ipywidgets_/envs/default/share/jupyter/lab
[I 2022-12-20 22:30:15.868 ServerApp] __main__ | extension was successfully loaded.
[I 2022-12-20 22:30:15.869 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2022-12-20 22:30:15.869 LabApp] JupyterLab extension loaded from /~/projects/ipywidgets_/envs/default/lib/python3.10/site-packages/jupyterlab
[I 2022-12-20 22:30:15.869 LabApp] JupyterLab application directory is /~/projects/ipywidgets_/envs/default/share/jupyter/lab
[I 2022-12-20 22:30:15.870 ServerApp] jupyterlab | extension was successfully loaded.
[I 2022-12-20 22:30:15.873 ServerApp] nbclassic | extension was successfully loaded.
[I 2022-12-20 22:30:15.873 ServerApp] Serving notebooks from local directory: /~/projects/ipywidgets_/ipywidgets
[I 2022-12-20 22:30:15.873 ServerApp] Jupyter Server 2.0.2 is running at:
[I 2022-12-20 22:30:15.874 ServerApp] http://localhost:8888/foo/lab?reset?token=d3adb3f
[I 2022-12-20 22:30:15.874 ServerApp]  or http://127.0.0.1:8888/foo/lab?reset?token=d3adb3f
[I 2022-12-20 22:30:15.874 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2022-12-20 22:30:15.874 ServerApp] 
To access the server, open this file in a browser:
    file:///~/.local/share/jupyter/runtime/jpserver-XXXXXX-open.html
Or copy and paste one of these URLs:
    http://localhost:8888/foo/lab?reset?token=d3adb3f
 or http://127.0.0.1:8888/foo/lab?reset?token=d3adb3f

[I 2022-12-20 22:30:15.875 ServerApp] Running async test
yarn init v1.21.1
warning The yes flag has been set. This will automatically answer yes to all questions, which may have security implications.
success Saved package.json
Done in 0.03s.
yarn add v1.21.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
success Saved 2 new dependencies.
info Direct dependencies
└─ playwright@1.29.0
info All dependencies
├─ playwright-core@1.29.0
└─ playwright@1.29.0
Done in 75.26s.
Starting headless chromium...
Navigating to page: file:////.local/share/jupyter/runtime/jpserver-XXXXXX-open.html
/
/projects/ipywidgets_/envs/default/share/jupyter/lab/browser_test/browser-test.js:104
throw up;
^

page.goto: net::ERR_FILE_NOT_FOUND at file:////.local/share/jupyter/runtime/jpserver-XXXXXX-open.html
=========================== logs ===========================
navigating to "file:///
/.local/share/jupyter/runtime/jpserver-XXXXXX-open.html", waiting until "load"

at main (/~/projects/ipywidgets_/envs/default/share/jupyter/lab/browser_test/browser-test.js:54:14) {

name: 'Error'
}
[C 2022-12-20 22:31:33.454 ServerApp] Caught exception during the test:
Caught exception during the test:
[E 2022-12-20 22:31:33.454 ServerApp] ['node', 'browser-test.js', 'file:////.local/share/jupyter/runtime/jpserver-XXXXXX-open.html'] exited with 1
['node', 'browser-test.js', 'file:///
/.local/share/jupyter/runtime/jpserver-XXXXXX-open.html'] exited with 1
[I 2022-12-20 22:31:33.454 ServerApp] Test Complete
[C 2022-12-20 22:31:33.454 ServerApp] Exiting with 1 due to errors
Exiting with 1 due to errors
[I 2022-12-20 22:31:33.454 ServerApp] Stopping server...

Expected behavior

  • launch file should continue to be created
  • not creating the file should be opt-in

Context

  • Operating System and version:
  • Browser and version:
  • Jupyter Server version:
Troubleshoot Output
nah
Command Line Output
see above
Browser Output
headless
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant