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

Timeline slider not shown when base_url is set #393

Open
ykazakov opened this issue Nov 1, 2024 · 2 comments · May be fixed by #402
Open

Timeline slider not shown when base_url is set #393

ykazakov opened this issue Nov 1, 2024 · 2 comments · May be fixed by #402
Labels
bug Something isn't working

Comments

@ykazakov
Copy link

ykazakov commented Nov 1, 2024

See below for an updated report

OLD Description

When Jupyter Lab is started as as single-user server in Jupyter Hub, the document timeline widget uses an incorrect url, which can be seen from the browser console when clicking on the timeline icon:

Screenshot 2024-11-01 at 22 23 53

As can be seen from this screenshot, the url has the part /collaboration/timeline two times.

If I manually change the url by removing one duplicate and open it in a browser, it appears to be working fine:

{"roomId": "json:notebook:1acd8c55-cfea-4e70-aa54-f7ad73df5511", "timestamps": [1730491695.928937], "forkRoom": "426ef1f297924abfb3af89c85f1ccf82", "sessionId": "cff41fa8-722f-4dc2-b52b-07db54815389"}

Reproduce

  1. Install the required packages in a fresh python environment: conda install -c conda-forge jupyterhub jupyterlab jupyter-collaboration
  2. Start jupyterhub: jupyterhub --JupyterHub.authenticator_class='dummy' --JupyterHub.spawner_class='simple'
  3. Open the url http://localhost:8000 and enter any user name, e.g., bob
  4. Open a new notebook
  5. Open the browser console and click on the timeline icon
  6. Observe the above error message in the console

Expected behavior

A slider should appear next to the timeline icon.

Context

  • Operating System and version: MacOS 15.0.1
  • Browser and version: Safari 18.0.1
  • JupyterLab version: 4.3.0
% pip list | grep jupyter
jupyter_client            8.6.3
jupyter-collaboration     3.0.0
jupyter-collaboration-ui  1.0.0
jupyter_core              5.7.2
jupyter-docprovider       1.0.0
jupyter-events            0.10.0
jupyter-lsp               2.2.5
jupyter_server            2.14.2
jupyter_server_fileid     0.9.2
jupyter_server_terminals  0.5.3
jupyter-server-ydoc       1.0.0
jupyter-ydoc              3.0.0
jupyterhub                5.2.1
jupyterlab                4.3.0
jupyterlab_pygments       0.3.0
jupyterlab_server         2.27.3
Command Line Output
 % jupyterhub --JupyterHub.authenticator_class='dummy' --JupyterHub.spawner_class='simple'
[I 2024-11-01 22:44:25.313 JupyterHub app:3346] Running JupyterHub version 5.2.1
[I 2024-11-01 22:44:25.314 JupyterHub app:3376] Using Authenticator: jupyterhub.auth.DummyAuthenticator-5.2.1
[I 2024-11-01 22:44:25.314 JupyterHub app:3376] Using Spawner: jupyterhub.spawner.SimpleLocalProcessSpawner-5.2.1
[I 2024-11-01 22:44:25.314 JupyterHub app:3376] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-5.2.1
[I 2024-11-01 22:44:25.325 JupyterHub app:1831] Loading cookie_secret from /private/tmp/hub/jupyterhub_cookie_secret
[I 2024-11-01 22:44:25.364 JupyterHub proxy:556] Generating new CONFIGPROXY_AUTH_TOKEN
[W 2024-11-01 22:44:25.367 JupyterHub auth:1508] Using testing authenticator DummyAuthenticator! This is not meant for production!
[I 2024-11-01 22:44:25.386 JupyterHub app:3416] Initialized 0 spawners in 0.004 seconds
[I 2024-11-01 22:44:25.388 JupyterHub metrics:373] Found 1 active users in the last ActiveUserPeriods.twenty_four_hours
[I 2024-11-01 22:44:25.388 JupyterHub metrics:373] Found 1 active users in the last ActiveUserPeriods.seven_days
[I 2024-11-01 22:44:25.388 JupyterHub metrics:373] Found 1 active users in the last ActiveUserPeriods.thirty_days
[W 2024-11-01 22:44:25.389 JupyterHub proxy:748] Running JupyterHub without SSL.  I hope there is SSL termination happening somewhere else...
[I 2024-11-01 22:44:25.389 JupyterHub proxy:752] Starting proxy @ http://:8000
22:44:25.605 [ConfigProxy] info: Proxying http://*:8000 to (no default)
22:44:25.609 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
22:44:25.925 [ConfigProxy] info: 200 GET /api/routes 
[I 2024-11-01 22:44:25.926 JupyterHub app:3739] Hub API listening on http://127.0.0.1:8081/hub/
22:44:25.928 [ConfigProxy] info: 200 GET /api/routes 
[I 2024-11-01 22:44:25.928 JupyterHub proxy:477] Adding route for Hub: / => http://127.0.0.1:8081
22:44:25.931 [ConfigProxy] info: Adding route / -> http://127.0.0.1:8081
22:44:25.931 [ConfigProxy] info: Route added / -> http://127.0.0.1:8081
22:44:25.932 [ConfigProxy] info: 201 POST /api/routes/ 
[I 2024-11-01 22:44:25.932 JupyterHub app:3770] JupyterHub is now running at http://:8000
[W 2024-11-01 22:44:26.788 JupyterHub web:1873] 403 POST /hub/api/users/admin/activity (127.0.0.1): Missing or invalid credentials.
[W 2024-11-01 22:44:26.789 JupyterHub log:192] 403 POST /hub/api/users/admin/activity (@127.0.0.1) 7.12ms
[W 2024-11-01 22:44:35.944 JupyterHub web:1873] 403 POST /hub/api/users/admin/activity (127.0.0.1): Missing or invalid credentials.
[W 2024-11-01 22:44:35.945 JupyterHub log:192] 403 POST /hub/api/users/admin/activity (@127.0.0.1) 2.98ms
(node:32626) [DEP0060] DeprecationWarning: The `util._extend` API is deprecated. Please use Object.assign() instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
[I 2024-11-01 22:44:36.524 JupyterHub log:192] 302 GET / -> /hub/ (@::1) 0.93ms
[I 2024-11-01 22:44:36.542 JupyterHub log:192] 302 GET /hub/ -> /hub/spawn (bob@::1) 8.90ms
[I 2024-11-01 22:44:36.563 JupyterHub provider:661] Creating oauth client jupyterhub-user-bob
[I 2024-11-01 22:44:36.568 JupyterHub spawner:1837] Spawning jupyterhub-singleuser
[I 2024-11-01 22:44:37.459 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-11-01 22:44:37.461 ServerApp] jupyter_server_fileid | extension was successfully linked.
[I 2024-11-01 22:44:37.462 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-11-01 22:44:37.464 ServerApp] jupyter_server_ydoc | extension was successfully linked.
[I 2024-11-01 22:44:37.464 JupyterHubSingleUser] Starting jupyterhub single-user server extension version 5.2.1
[I 2024-11-01 22:44:37.464 JupyterHubSingleUser] Using default url from server extension lab: /lab
[I 2024-11-01 22:44:37.465 ServerApp] jupyterhub | extension was successfully linked.
[W 2024-11-01 22:44:37.466 LabApp] 'extra_template_paths' was found in both NotebookApp and ServerApp. This is likely a recent change. This config will only be set in NotebookApp. Please check if you should also config these traits in ServerApp for your purpose.
[I 2024-11-01 22:44:37.467 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-11-01 22:44:37.555 JupyterHub log:192] 302 GET /hub/spawn -> /hub/spawn-pending/bob (bob@::1) 1002.46ms
[I 2024-11-01 22:44:37.566 JupyterHub pages:397] bob is pending spawn
[I 2024-11-01 22:44:37.567 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b'7512dbed59ab466e9b6486590d3c704f:f37d1ad69b224331bb0eda1b0a6c1d35' {'path': '/hub/'}
[I 2024-11-01 22:44:37.582 JupyterHub log:192] 200 GET /hub/spawn-pending/bob (bob@::1) 20.03ms
[I 2024-11-01 22:44:37.689 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-11-01 22:44:37.759 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-11-01 22:44:37.760 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-11-01 22:44:37.760 FileIdExtension] Configured File ID manager: ArbitraryFileIdManager
[I 2024-11-01 22:44:37.760 FileIdExtension] ArbitraryFileIdManager : Configured root dir: /private/tmp/bob
[I 2024-11-01 22:44:37.760 FileIdExtension] ArbitraryFileIdManager : Configured database path: /private/tmp/bob/Library/Jupyter/file_id_manager.db
[I 2024-11-01 22:44:37.760 FileIdExtension] ArbitraryFileIdManager : Successfully connected to database file.
[I 2024-11-01 22:44:37.760 FileIdExtension] ArbitraryFileIdManager : Creating File ID tables and indices with journal_mode = DELETE
[I 2024-11-01 22:44:37.760 FileIdExtension] Attached event listeners.
[I 2024-11-01 22:44:37.761 ServerApp] jupyter_server_fileid | extension was successfully loaded.
[I 2024-11-01 22:44:37.761 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-11-01 22:44:37.763 ServerApp] jupyter_server_ydoc | extension was successfully loaded.
[I 2024-11-01 22:44:37.766 JupyterHub log:192] 200 GET /hub/api (@127.0.0.1) 0.29ms
[I 2024-11-01 22:44:37.767 JupyterHubSingleUser] Updating Hub with activity every 300 seconds
[I 2024-11-01 22:44:37.767 ServerApp] jupyterhub | extension was successfully loaded.
[I 2024-11-01 22:44:37.769 LabApp] JupyterLab extension loaded from /opt/homebrew/Caskroom/miniconda/base/envs/jc/lib/python3.13/site-packages/jupyterlab
[I 2024-11-01 22:44:37.769 LabApp] JupyterLab application directory is /opt/homebrew/Caskroom/miniconda/base/envs/jc/share/jupyter/lab
[I 2024-11-01 22:44:37.769 LabApp] Extension Manager is 'pypi'.
[I 2024-11-01 22:44:37.780 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-11-01 22:44:37.781 ServerApp] Serving notebooks from local directory: /private/tmp/bob
[I 2024-11-01 22:44:37.781 ServerApp] Jupyter Server 2.14.2 is running at:
[I 2024-11-01 22:44:37.781 ServerApp] http://127.0.0.1:65094/user/bob/lab?token=...
[I 2024-11-01 22:44:37.781 ServerApp]     http://127.0.0.1:65094/user/bob/lab?token=...
[I 2024-11-01 22:44:37.781 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 2024-11-01 22:44:37.789 JupyterHub log:192] 200 POST /hub/api/users/bob/activity (bob@127.0.0.1) 5.31ms
[I 2024-11-01 22:44:37.858 ServerApp] 200 GET /user/bob/api (@127.0.0.1) 0.80ms
[I 2024-11-01 22:44:37.858 JupyterHub base:1124] User bob took 1.304 seconds to start
[I 2024-11-01 22:44:37.858 JupyterHub proxy:331] Adding user bob to proxy /user/bob/ => http://127.0.0.1:65094
22:44:37.859 [ConfigProxy] info: Adding route /user/bob -> http://127.0.0.1:65094
22:44:37.859 [ConfigProxy] info: Route added /user/bob -> http://127.0.0.1:65094
22:44:37.860 [ConfigProxy] info: 201 POST /api/routes/user/bob 
[I 2024-11-01 22:44:37.860 JupyterHub users:899] Server bob is ready
[I 2024-11-01 22:44:37.860 JupyterHub log:192] 200 GET /hub/api/users/bob/server/progress?_xsrf=[secret] (bob@::1) 236.81ms
[I 2024-11-01 22:44:37.869 JupyterHub log:192] 302 GET /hub/spawn-pending/bob -> /user/bob/ (bob@::1) 2.49ms
[I 2024-11-01 22:44:37.879 ServerApp] 302 GET /user/bob/ -> /user/bob/lab? (@::1) 0.41ms
[W 2024-11-01 22:44:37.886 JupyterHub log:192] 403 GET /hub/api/user (@127.0.0.1) 0.83ms
[W 2024-11-01 22:44:37.886 ServerApp] No Hub user identified for request
[W 2024-11-01 22:44:37.886 ServerApp] Token stored in cookie may have expired
[I 2024-11-01 22:44:37.887 ServerApp] 302 GET /user/bob/lab? -> /hub/api/oauth2/authorize?client_id=jupyterhub-user-bob&redirect_uri=%2Fuser%2Fbob%2Foauth_callback&response_type=code&state=[secret] (@::1) 2.95ms
[I 2024-11-01 22:44:37.899 JupyterHub log:192] 302 GET /hub/api/oauth2/authorize?client_id=jupyterhub-user-bob&redirect_uri=%2Fuser%2Fbob%2Foauth_callback&response_type=code&state=[secret] -> /user/bob/oauth_callback?code=[secret]&state=[secret] (bob@::1) 6.25ms
[I 2024-11-01 22:44:37.917 JupyterHub log:192] 200 POST /hub/api/oauth2/token (bob@127.0.0.1) 11.32ms
[I 2024-11-01 22:44:37.920 JupyterHub log:192] 200 GET /hub/api/user (bob@127.0.0.1) 2.18ms
[I 2024-11-01 22:44:37.920 ServerApp] Logged-in user bob
[I 2024-11-01 22:44:37.921 ServerApp] Setting new xsrf cookie for b'7512dbed59ab466e9b6486590d3c704f:4ce13b77bbf20757846381e8e43277e8ef076e803d8e417af0c5345231c2f2a2' {'path': '/user/bob/'}
[I 2024-11-01 22:44:37.921 ServerApp] 302 GET /user/bob/oauth_callback?code=[secret]&state=[secret] -> /user/bob/lab? (bob@::1) 16.31ms
[I 2024-11-01 22:44:37.946 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
[I 2024-11-01 22:44:37.951 ServerApp] 200 GET /user/bob/lab? (bob@::1) 24.07ms
[I 2024-11-01 22:44:38.212 ServerApp] 200 GET /user/bob/api/kernelspecs?1730497478199 (bob@::1) 9.21ms
[I 2024-11-01 22:44:38.213 ServerApp] 200 GET /user/bob/api/me?1730497478201 (bob@::1) 0.89ms
[I 2024-11-01 22:44:38.259 ServerApp] 200 GET /user/bob/lab/api/settings?1730497478205 (bob@::1) 45.38ms
[I 2024-11-01 22:44:38.260 ServerApp] 200 GET /user/bob/api/kernels?1730497478211 (bob@::1) 0.96ms
[I 2024-11-01 22:44:38.261 ServerApp] 200 GET /user/bob/api/sessions?1730497478211 (bob@::1) 1.59ms
[I 2024-11-01 22:44:38.262 ServerApp] 200 GET /user/bob/api/terminals?1730497478212 (bob@::1) 1.23ms
[I 2024-11-01 22:44:38.263 ServerApp] 200 GET /user/bob/api/me?1730497478216 (bob@::1) 1.75ms
[I 2024-11-01 22:44:38.264 ServerApp] 101 GET /user/bob/api/events/subscribe (bob@::1) 1.62ms
[I 2024-11-01 22:44:38.265 ServerApp] 200 GET /user/bob/lab/api/workspaces?1730497478213 (bob@::1) 2.72ms
[I 2024-11-01 22:44:38.266 ServerApp] 200 GET /user/bob/api/kernelspecs?1730497478216 (bob@::1) 2.73ms
[I 2024-11-01 22:44:38.341 ServerApp] 200 GET /user/bob/lab/api/translations/default?1730497478328 (bob@::1) 10.14ms
[I 2024-11-01 22:44:38.354 ServerApp] 200 GET /user/bob/api/config/jupyterlabapputilsextensionannouncements?1730497478351 (bob@::1) 1.11ms
[I 2024-11-01 22:44:38.370 ServerApp] 200 GET /user/bob/lsp/status?1730497478367 (bob@::1) 1.23ms
[I 2024-11-01 22:44:38.410 ServerApp] 200 GET /user/bob/lab/api/settings/@jupyterlab/codemirror-extension:plugin?1730497478404 (bob@::1) 3.84ms
[I 2024-11-01 22:44:38.471 ServerApp] 200 GET /user/bob/lab/api/translations?1730497478400 (bob@::1) 68.65ms
[I 2024-11-01 22:44:38.638 ServerApp] 101 GET /user/bob/api/collaboration/room/JupyterLab:globalAwareness (bob@::1) 6.87ms
[I 2024-11-01 22:44:38.675 ServerApp] 200 GET /user/bob/api/contents?content=1&hash=0&1730497478667 (bob@::1) 6.33ms
[I 2024-11-01 22:44:38.771 ServerApp] 200 GET /user/bob/lab/api/workspaces/default?1730497478767 (bob@::1) 1.66ms
[I 2024-11-01 22:44:38.783 ServerApp] 200 GET /user/bob/lab/api/settings/@jupyterlab/docmanager-extension:plugin?1730497478777 (bob@::1) 3.20ms
[I 2024-11-01 22:44:38.799 ServerApp] 200 GET /user/bob/lab/api/settings/@jupyterlab/notebook-extension:panel?1730497478793 (bob@::1) 2.35ms
[I 2024-11-01 22:44:38.803 ServerApp] 200 GET /user/bob/api/contents?content=1&hash=0&1730497478794 (bob@::1) 3.67ms
[I 2024-11-01 22:44:38.805 ServerApp] 200 GET /user/bob/api/contents?content=0&hash=0&1730497478802 (bob@::1) 0.83ms
[I 2024-11-01 22:44:38.806 ServerApp] 200 GET /user/bob/api/contents/Untitled.ipynb?content=0&hash=0&1730497478802 (bob@::1) 1.37ms
[I 2024-11-01 22:44:38.808 ServerApp] 200 GET /user/bob/api/contents/Untitled.ipynb?content=0&hash=0&1730497478803 (bob@::1) 0.98ms
[I 2024-11-01 22:44:38.809 ServerApp] 200 GET /user/bob/api/terminals?1730497478803 (bob@::1) 0.46ms
[I 2024-11-01 22:44:38.832 ServerApp] Request for Y document 'Untitled.ipynb' with room ID: 1acd8c55-cfea-4e70-aa54-f7ad73df5511
[I 2024-11-01 22:44:38.832 ServerApp] 200 PUT /user/bob/api/collaboration/session/Untitled.ipynb?1730497478828 (bob@::1) 0.91ms
/opt/homebrew/Caskroom/miniconda/base/envs/jc/bin/jupyterhub-singleuser:10: DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious
and fails to parse leap day. The default behavior will change in Python 3.15
to either always raise an exception or to use a different default year (TBD).
To avoid trouble, add a specific year to the input & format.
See https://github.com/python/cpython/issues/70647.
  sys.exit(main())
[I 2024-11-01 22:44:38.964 LabApp] Build is up to date
[I 2024-11-01 22:44:38.964 ServerApp] 200 GET /user/bob/lab/api/build?1730497478622 (bob@::1) 339.73ms
[I 2024-11-01 22:44:38.972 ServerApp] New terminal with automatic name: 2
[I 2024-11-01 22:44:38.973 ServerApp] 200 POST /user/bob/api/terminals?1730497478862 (bob@::1) 8.26ms
[I 2024-11-01 22:44:38.974 YDocExtension] Creating FileLoader for: Untitled.ipynb
[I 2024-11-01 22:44:38.975 YDocExtension] Watching file: Untitled.ipynb
[I 2024-11-01 22:44:38.977 ServerApp] 200 GET /user/bob/api/terminals?1730497478974 (bob@::1) 0.76ms
[I 2024-11-01 22:44:38.977 ServerApp] 101 GET /user/bob/api/collaboration/room/json:notebook:1acd8c55-cfea-4e70-aa54-f7ad73df5511?sessionId=a14c55ef-6cc0-4234-a790-4f45919eb3a2 (bob@::1) 12.37ms
[I 2024-11-01 22:44:38.977 ServerApp] Initializing room json:notebook:1acd8c55-cfea-4e70-aa54-f7ad73df5511
[I 2024-11-01 22:44:38.982 ServerApp] 101 GET /user/bob/terminals/websocket/2 (bob@::1) 0.72ms
[I 2024-11-01 22:44:39.022 ServerApp] 200 GET /user/bob/lab/api/settings?ids_only=true&1730497479005 (bob@::1) 11.77ms
[I 2024-11-01 22:44:39.025 ServerApp] 200 GET /user/bob/api/contents/Untitled.ipynb?type=notebook&content=0&hash=1&1730497479021 (bob@::1) 1.95ms
[I 2024-11-01 22:44:39.034 ServerApp] Content in room json:notebook:1acd8c55-cfea-4e70-aa54-f7ad73df5511 loaded from the ystore SQLiteYStore
[I 2024-11-01 22:44:39.055 ServerApp] 200 GET /user/bob/api/contents/Untitled.ipynb/checkpoints?1730497479049 (bob@::1) 3.13ms
[I 2024-11-01 22:44:39.056 ServerApp] 200 GET /user/bob/api/contents/Untitled.ipynb/checkpoints?1730497479051 (bob@::1) 2.35ms
[I 2024-11-01 22:44:39.084 ServerApp] 200 GET /user/bob/api/sessions?1730497479081 (bob@::1) 0.56ms
[I 2024-11-01 22:44:39.173 ServerApp] Kernel started: 2b7bb49d-4935-4ca9-a01e-de94af2eb4ab
[I 2024-11-01 22:44:39.174 ServerApp] 201 POST /user/bob/api/sessions?1730497479120 (bob@::1) 51.56ms
[I 2024-11-01 22:44:39.181 ServerApp] 200 GET /user/bob/api/sessions?1730497479176 (bob@::1) 1.30ms
[I 2024-11-01 22:44:39.190 ServerApp] 200 GET /user/bob/api/kernels?1730497479186 (bob@::1) 0.82ms
[I 2024-11-01 22:44:39.195 ServerApp] 200 PATCH /user/bob/api/sessions/d24a8f28-b556-4846-8bb1-0bb70d865587?1730497479185 (bob@::1) 5.14ms
[I 2024-11-01 22:44:39.200 ServerApp] 200 PATCH /user/bob/api/sessions/d24a8f28-b556-4846-8bb1-0bb70d865587?1730497479196 (bob@::1) 1.18ms
[I 2024-11-01 22:44:39.201 ServerApp] 200 GET /user/bob/api/sessions?1730497479197 (bob@::1) 0.78ms
[I 2024-11-01 22:44:39.205 ServerApp] 200 GET /user/bob/api/kernelspecs?1730497479201 (bob@::1) 1.70ms
[I 2024-11-01 22:44:39.291 ServerApp] 200 GET /user/bob/api/nbconvert?1730497478849 (bob@::1) 439.94ms
[I 2024-11-01 22:44:39.515 ServerApp] 101 GET /user/bob/api/kernels/2b7bb49d-4935-4ca9-a01e-de94af2eb4ab/channels?session_id=a99697cc-4386-44fe-88e6-c8eddb71a55c (bob@::1) 325.13ms
[I 2024-11-01 22:44:39.515 ServerApp] Connecting to kernel 2b7bb49d-4935-4ca9-a01e-de94af2eb4ab.
[I 2024-11-01 22:44:39.516 ServerApp] 101 GET /user/bob/api/kernels/2b7bb49d-4935-4ca9-a01e-de94af2eb4ab/channels?session_id=19d35261-ad48-4609-b077-356a4e10c8cc (bob@::1) 321.05ms
[I 2024-11-01 22:44:39.516 ServerApp] Connecting to kernel 2b7bb49d-4935-4ca9-a01e-de94af2eb4ab.
[I 2024-11-01 22:44:39.517 ServerApp] 101 GET /user/bob/api/kernels/2b7bb49d-4935-4ca9-a01e-de94af2eb4ab/channels?session_id=bc441724-4fee-4891-a151-d595527f5b28 (bob@::1) 304.78ms
[I 2024-11-01 22:44:39.517 ServerApp] Connecting to kernel 2b7bb49d-4935-4ca9-a01e-de94af2eb4ab.
[I 2024-11-01 22:44:39.539 ServerApp] 200 GET /user/bob/api/sessions?1730497479536 (bob@::1) 0.62ms
[I 2024-11-01 22:44:39.539 ServerApp] 200 GET /user/bob/api/kernels?1730497479536 (bob@::1) 0.77ms
[I 2024-11-01 22:44:40.052 ServerApp] Saving the content from room json:notebook:1acd8c55-cfea-4e70-aa54-f7ad73df5511
[I 2024-11-01 22:44:40.053 YDocExtension] Saving file: Untitled.ipynb
[I 2024-11-01 22:44:40.068 ServerApp] 204 PUT /user/bob/lab/api/workspaces/default?1730497480054 (bob@::1) 2.02ms
[I 2024-11-01 22:44:40.093 ServerApp] 200 GET /user/bob/api/contents/Untitled.ipynb?content=0&hash=0&1730497480088 (bob@::1) 2.24ms
[I 2024-11-01 22:44:40.099 ServerApp] 200 GET /user/bob/api/contents?content=1&hash=0&1730497480088 (bob@::1) 4.74ms
[W 2024-11-01 22:44:41.174 JupyterHub web:1873] 403 POST /hub/api/users/admin/activity (127.0.0.1): Missing or invalid credentials.
[W 2024-11-01 22:44:41.177 JupyterHub log:192] 403 POST /hub/api/users/admin/activity (@127.0.0.1) 7.55ms
[I 2024-11-01 22:44:44.105 ServerApp] 204 PUT /user/bob/lab/api/workspaces/default?1730497484088 (bob@::1) 3.19ms
[I 2024-11-01 22:44:48.338 ServerApp] 200 GET /user/bob/lab/api/workspaces?1730497488329 (bob@::1) 3.20ms
[I 2024-11-01 22:44:48.985 ServerApp] 200 GET /user/bob/api/terminals?1730497488979 (bob@::1) 2.04ms
[I 2024-11-01 22:44:49.556 ServerApp] 200 GET /user/bob/api/sessions?1730497489542 (bob@::1) 3.86ms
[I 2024-11-01 22:44:49.559 ServerApp] 200 GET /user/bob/api/kernels?1730497489542 (bob@::1) 5.22ms
[I 2024-11-01 22:44:49.717 ServerApp] 204 PUT /user/bob/lab/api/workspaces/default?1730497489698 (bob@::1) 9.20ms
[I 2024-11-01 22:44:50.129 ServerApp] 200 GET /user/bob/api/contents?content=1&hash=0&1730497490103 (bob@::1) 18.92ms
[W 2024-11-01 22:44:50.553 ServerApp] 404 GET /user/bob/api/collaboration/timeline/collaboration/timeline/Untitled.ipynb?format=json&&type=notebook&1730497490547 (bob@::1) 2.36ms
Browser Output
[Warning] Unsatisfied version 3.0.0 from @jupyterlab/application-top of shared singleton module @jupyter/ydoc (required ^2.0.1) (remoteEntry.df025193a26e76919ed8.js, line 1)
[Warning] Language pack 'en' not installed! (jlab_core.30ac71af4fabafb542d8.js, line 1)
[Debug] hub-extension: Found configuration  – Object (jlab_core.30ac71af4fabafb542d8.js, line 1)
Object
[Debug] Starting application in workspace: "default" (jlab_core.30ac71af4fabafb542d8.js, line 1)
[Debug] Starting WebSocket: ws://localhost:8000/user/bob/api/kernels/2b7bb49d-4935-4ca9-a01e-de94af2eb4ab (jlab_core.30ac71af4fabafb542d8.js, line 1)
[Debug] Starting WebSocket: ws://localhost:8000/user/bob/api/kernels/2b7bb49d-4935-4ca9-a01e-de94af2eb4ab (jlab_core.30ac71af4fabafb542d8.js, line 1)
[Debug] Starting WebSocket: ws://localhost:8000/user/bob/api/kernels/2b7bb49d-4935-4ca9-a01e-de94af2eb4ab (jlab_core.30ac71af4fabafb542d8.js, line 1)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) [(Untitled.ipynb, line 0)](http://localhost:8000/user/bob/api/collaboration/timeline/collaboration/timeline/Untitled.ipynb?format=json&&type=notebook&1730497490547)
[Error] Error fetching data: – Error: Not found — 618.28407d2343b911e61b63.js:0
Error: Not found — 618.28407d2343b911e61b63.js:0
	(anonymous function) (618.28407d2343b911e61b63.js:1:15066)
@ykazakov ykazakov added the bug Something isn't working label Nov 1, 2024
@ykazakov ykazakov changed the title Document Timeline not showing under Jupyter Hub Timeline slider not showing under Jupyter Hub Nov 1, 2024
@ykazakov
Copy link
Author

ykazakov commented Nov 7, 2024

Actually, exactly the same problem takes place even without jupyterhub if one changes the default base_url (which jupyterhub does):

jupyter lab --ServerApp.base_url='/user/bob'

@ykazakov
Copy link
Author

ykazakov commented Nov 7, 2024

Updated report

Description

When Jupyter Lab starts with a custom base_url, the document timeline widget uses an incorrect url, which can be seen from the browser console when clicking on the timeline icon:

Screenshot 2024-11-07 at 16 05 34

As can be seen from this screenshot, the url has the fragment /collaboration/timeline two times.

If I manually change the url by removing one duplicate and open it in a browser, it appears to be working fine:

{"roomId": "json:notebook:6ac6ac6d-7495-48cc-a50b-079b716639b6", "timestamps": [1730991797.4978712, 1730991823.8297029, 1730991841.182337], "forkRoom": "dcbf793c2a554d11bcb811537ed539e8", "sessionId": "48f278d7-0dd0-4617-b81e-bc3a6198e682"}

Reproduce

  1. Install the required packages in a fresh python environment: conda install -c conda-forge jupyterlab jupyter-collaboration
  2. Start jupyterlab: jupyter lab --ServerApp.base_url='/user/bob'
  3. Open a new notebook
  4. Open the browser console and click on the timeline icon
  5. Observe the above error message in the console

Expected behavior

A slider should appear next to the timeline icon.

Context

  • Operating System and version: MacOS 15.1
  • Browser and version: Safari 18.1
  • JupyterLab version: 4.3.0
% pip list | grep jupyter
jupyter_client            8.6.3
jupyter-collaboration     3.0.0
jupyter-collaboration-ui  1.0.0
jupyter_core              5.7.2
jupyter-docprovider       1.0.0
jupyter-events            0.10.0
jupyter-lsp               2.2.5
jupyter_server            2.14.2
jupyter_server_fileid     0.9.2
jupyter_server_terminals  0.5.3
jupyter-server-ydoc       1.0.0
jupyter-ydoc              3.0.0
jupyterlab                4.3.0
jupyterlab_pygments       0.3.0
jupyterlab_server         2.27.3
Command Line Output
% jupyter lab --ServerApp.base_url='/user/bob'
[I 2024-11-07 16:16:01.969 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-11-07 16:16:01.971 ServerApp] jupyter_server_fileid | extension was successfully linked.
[I 2024-11-07 16:16:01.972 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-11-07 16:16:01.974 ServerApp] jupyter_server_ydoc | extension was successfully linked.
[I 2024-11-07 16:16:01.976 ServerApp] jupyterlab | extension was successfully linked.
[I 2024-11-07 16:16:02.182 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-11-07 16:16:02.225 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-11-07 16:16:02.227 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-11-07 16:16:02.227 FileIdExtension] Configured File ID manager: ArbitraryFileIdManager
[I 2024-11-07 16:16:02.227 FileIdExtension] ArbitraryFileIdManager : Configured root dir: /private/tmp/2
[I 2024-11-07 16:16:02.227 FileIdExtension] ArbitraryFileIdManager : Configured database path: /Users/ecull/Library/Jupyter/file_id_manager.db
[I 2024-11-07 16:16:02.229 FileIdExtension] ArbitraryFileIdManager : Successfully connected to database file.
[I 2024-11-07 16:16:02.229 FileIdExtension] ArbitraryFileIdManager : Creating File ID tables and indices with journal_mode = DELETE
[I 2024-11-07 16:16:02.229 FileIdExtension] Attached event listeners.
[I 2024-11-07 16:16:02.230 ServerApp] jupyter_server_fileid | extension was successfully loaded.
[I 2024-11-07 16:16:02.230 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-11-07 16:16:02.233 ServerApp] jupyter_server_ydoc | extension was successfully loaded.
[I 2024-11-07 16:16:02.234 LabApp] JupyterLab extension loaded from /opt/homebrew/Caskroom/miniconda/base/envs/jc/lib/python3.13/site-packages/jupyterlab
[I 2024-11-07 16:16:02.234 LabApp] JupyterLab application directory is /opt/homebrew/Caskroom/miniconda/base/envs/jc/share/jupyter/lab
[I 2024-11-07 16:16:02.234 LabApp] Extension Manager is 'pypi'.
[I 2024-11-07 16:16:02.244 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-11-07 16:16:02.245 ServerApp] Serving notebooks from local directory: /private/tmp/2
[I 2024-11-07 16:16:02.245 ServerApp] Jupyter Server 2.14.2 is running at:
[I 2024-11-07 16:16:02.245 ServerApp] http://localhost:8888/user/bob/lab?token=bf0b13662ad05739f3df0a59bdd549cc497547156a52c91f
[I 2024-11-07 16:16:02.245 ServerApp]     http://127.0.0.1:8888/user/bob/lab?token=bf0b13662ad05739f3df0a59bdd549cc497547156a52c91f
[I 2024-11-07 16:16:02.245 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2024-11-07 16:16:02.249 ServerApp] 
To access the server, open this file in a browser:
    file:///Users/ecull/Library/Jupyter/runtime/jpserver-89216-open.html
Or copy and paste one of these URLs:
    http://localhost:8888/user/bob/lab?token=bf0b13662ad05739f3df0a59bdd549cc497547156a52c91f
    http://127.0.0.1:8888/user/bob/lab?token=bf0b13662ad05739f3df0a59bdd549cc497547156a52c91f

[I 2024-11-07 16:16:02.261 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
[W 2024-11-07 16:16:04.171 LabApp] Could not determine jupyterlab build status without nodejs
[I 2024-11-07 16:16:04.379 ServerApp] Request for Y document 'Untitled.ipynb' with room ID: 6ac6ac6d-7495-48cc-a50b-079b716639b6
/opt/homebrew/Caskroom/miniconda/base/envs/jc/bin/jupyter-lab:10: DeprecationWarning: Parsing dates involving a day of month without a year specified is ambiguious
and fails to parse leap day. The default behavior will change in Python 3.15
to either always raise an exception or to use a different default year (TBD).
To avoid trouble, add a specific year to the input & format.
See python/cpython#70647.
sys.exit(main())
[I 2024-11-07 16:16:04.510 YDocExtension] Creating FileLoader for: Untitled.ipynb
[I 2024-11-07 16:16:04.522 YDocExtension] Watching file: Untitled.ipynb
[I 2024-11-07 16:16:04.523 ServerApp] Initializing room json:notebook:6ac6ac6d-7495-48cc-a50b-079b716639b6
[I 2024-11-07 16:16:04.560 ServerApp] Content in room json:notebook:6ac6ac6d-7495-48cc-a50b-079b716639b6 loaded from the ystore SQLiteYStore
[I 2024-11-07 16:16:04.660 ServerApp] Kernel started: 81f4f380-8fb5-4ca1-9767-cb4aa2ccd5ac
[I 2024-11-07 16:16:05.021 ServerApp] Connecting to kernel 81f4f380-8fb5-4ca1-9767-cb4aa2ccd5ac.
[I 2024-11-07 16:16:05.022 ServerApp] Connecting to kernel 81f4f380-8fb5-4ca1-9767-cb4aa2ccd5ac.
[I 2024-11-07 16:16:05.023 ServerApp] Connecting to kernel 81f4f380-8fb5-4ca1-9767-cb4aa2ccd5ac.
[I 2024-11-07 16:16:05.569 ServerApp] Saving the content from room json:notebook:6ac6ac6d-7495-48cc-a50b-079b716639b6
[I 2024-11-07 16:16:05.572 YDocExtension] Saving file: Untitled.ipynb
[W 2024-11-07 16:16:22.906 ServerApp] 404 GET /user/bob/api/collaboration/timeline/collaboration/timeline/Untitled.ipynb?format=json&&type=notebook&1730992582902 (b9b4d0dcbdf84761a74507d9e38d5727@::1) 1.37ms referer=http://localhost:8888/user/bob/lab

Browser Output
[Warning] Unsatisfied version 3.0.0 from @jupyterlab/application-top of shared singleton module @jupyter/ydoc (required ^2.0.1) (remoteEntry.df025193a26e76919ed8.js, line 1)
[Warning] Language pack 'en_US' not installed! (jlab_core.30ac71af4fabafb542d8.js, line 1)
[Debug] Starting application in workspace: "default" (jlab_core.30ac71af4fabafb542d8.js, line 1)
[Debug] Starting WebSocket: ws://localhost:8888/user/bob/api/kernels/81f4f380-8fb5-4ca1-9767-cb4aa2ccd5ac (jlab_core.30ac71af4fabafb542d8.js, line 1)
[Debug] Starting WebSocket: ws://localhost:8888/user/bob/api/kernels/81f4f380-8fb5-4ca1-9767-cb4aa2ccd5ac (jlab_core.30ac71af4fabafb542d8.js, line 1)
[Debug] Starting WebSocket: ws://localhost:8888/user/bob/api/kernels/81f4f380-8fb5-4ca1-9767-cb4aa2ccd5ac (jlab_core.30ac71af4fabafb542d8.js, line 1)
[Error] Failed to load resource: the server responded with a status of 404 (Not Found) [(Untitled.ipynb, line 0)](http://localhost:8888/user/bob/api/collaboration/timeline/collaboration/timeline/Untitled.ipynb?format=json&&type=notebook&1730992582902)
[Error] Error fetching data: – Error: Not found — 618.28407d2343b911e61b63.js:0
Error: Not found — 618.28407d2343b911e61b63.js:0
	(anonymous function) (618.28407d2343b911e61b63.js:1:15066)

@ykazakov ykazakov changed the title Timeline slider not showing under Jupyter Hub Timeline slider not shown when base_url is set Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant