Button 'render with voila' - connection refused

Hello Jupyter team,

I’m on migration form Jupyter notebook to JupyterHub because of LDAP integrity.
JupyterHub is running on docker, there is only one instance in my setup.
All member use ‘/lab’ and everything works almost perfect except one thing. Our users use voila library.
Voila extension works fine when I use URL /user/:name/voila/render/path/to/notebook.ipynb

But I got a problem when I use URL and button ‘Render with voila’ , new page open with monit ‘refused to connect’

  1. /user/:name/lab/tree/path/to/notebook.ipynb

and
2. /user/:name/notebooks/path/to/notebook.ipynb

For now I’m out of idea so I’m here with my problem,
Please help

Can you show us the logs for your singleuser server, and also your browser console logs?

I notice this message in browser console logs, but not sure if that the root cause.

Refused to frame 'https://<HOSTNAME>:8080/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'".

Installed package:
alembic==1.13.1
annotated-types==0.7.0
anyio==4.4.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
arrow==1.3.0
asttokens==2.4.1
async-generator==1.10
async-lru==2.0.4
atlassian-python-api==3.41.14
attrs==23.2.0
Babel==2.15.0
bcrypt==4.1.3
beautifulsoup4==4.12.3
bleach==6.1.0
cdsdashboards==0.6.3
certifi==2024.6.2
certipy==0.1.3
cffi==1.16.0
charset-normalizer==3.3.2
colorclass==2.2.2
comm==0.2.2
compressed-rtf==1.0.6
contourpy==1.2.1
croniter==1.4.1
cryptography==42.0.8
cx-Oracle==8.3.0
cycler==0.12.1
debugpy==1.8.1
decorator==5.1.1
defusedxml==0.7.1
Deprecated==1.2.14
distro==1.9.0
easygui==0.98.3
ebcdic==1.1.1
et-xmlfile==1.1.0
exceptiongroup==1.2.1
executing==2.0.1
extract-msg==0.48.5
fastjsonschema==2.20.0
fonttools==4.53.0
fqdn==1.5.1
fsspec==2023.6.0
greenlet==3.0.3
h11==0.14.0
httpcore==1.0.5
httpx==0.27.0
idna==3.7
ijson==3.3.0
importlib_metadata==7.1.0
importlib_resources==6.4.0
ipykernel==6.29.4
ipython==8.18.1
ipywidgets==8.1.3
isoduration==20.11.0
jedi==0.19.1
Jinja2==3.1.4
jmespath==1.0.1
json5==0.9.25
jsonpointer==3.0.0
jsonschema==4.22.0
jsonschema-specifications==2023.12.1
jupyter-events==0.10.0
jupyter-lsp==2.2.5
jupyter_client==8.6.2
jupyter_core==5.7.2
jupyter_scheduler==2.7.1
jupyter_server==2.14.1
jupyter_server_terminals==0.5.3
jupyterhub==5.0.0
jupyterhub-ldapauthenticator==1.3.2
jupyterlab==4.2.2
jupyterlab_pygments==0.3.0
jupyterlab_server==2.27.2
jupyterlab_widgets==3.0.11
kiwisolver==1.4.5
lark==1.1.8
ldap3==2.9.1
Mako==1.3.5
MarkupSafe==2.1.5
matplotlib==3.9.0
matplotlib-inline==0.1.7
memory-profiler==0.61.0
mistune==3.0.2
msoffcrypto-tool==5.4.1
nbclient==0.10.0
nbconvert==7.16.4
nbformat==5.10.4
nest-asyncio==1.6.0
notebook==7.2.1
notebook_shim==0.2.4
numpy==2.0.0
oauthlib==3.2.2
olefile==0.47
oletools==0.60.1
openpyxl==3.1.4
overrides==7.7.0
packaging==24.1
pamela==1.1.0
pandas==2.2.2
pandocfilters==1.5.1
paramiko==3.4.0
parso==0.8.4
pcodedmp==1.2.6
pexpect==4.9.0
pillow==10.3.0
platformdirs==4.2.2
pluggy==1.5.0
prometheus_client==0.20.0
prompt_toolkit==3.0.47
psutil==5.9.8
ptyprocess==0.7.0
pure-eval==0.2.2
pyasn1==0.6.0
pycparser==2.22
pycurl==7.45.3
pydantic==2.7.4
pydantic_core==2.18.4
Pygments==2.18.0
PyNaCl==1.5.0
pyOpenSSL==24.1.0
pyparsing==2.4.7
python-dateutil==2.9.0.post0
python-json-logger==2.0.7
pytz==2023.3
PyYAML==6.0.1
pyzmq==26.0.3
red-black-tree-mod==1.20
referencing==0.35.1
requests==2.32.3
requests-oauthlib==2.0.0
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
rpds-py==0.18.1
RTFDE==0.1.1
Send2Trash==1.8.3
six==1.16.0
sniffio==1.3.1
soupsieve==2.5
SQLAlchemy==2.0.31
stack-data==0.6.3
tabula-py==2.9.3
terminado==0.18.1
tinycss2==1.3.0
tomli==2.0.1
tornado==6.4.1
tqdm==4.66.4
traitlets==5.14.3
types-python-dateutil==2.9.0.20240316
typing_extensions==4.12.2
tzdata==2024.1
tzlocal==5.2
uri-template==1.3.0
urllib3==2.2.2
voila==0.5.7
wcwidth==0.2.13
webcolors==24.6.0
webencodings==0.5.1
websocket-client==1.8.0
websockets==12.0
widgetsnbextension==4.0.11
wrapt==1.16.0
xlrd==2.0.1
zipp==3.19.2

Extensions list :
jupyter server extension list
Config dir: /app/.jupyter

Config dir: /usr/etc/jupyter

Config dir: /usr/local/etc/jupyter
jupyter_lsp enabled
- Validating jupyter_lsp…
jupyter_lsp 2.2.5 OK
jupyter_scheduler enabled
- Validating jupyter_scheduler…
Extension package jupyter_scheduler took 0.2020s to import
jupyter_scheduler 2.7.1 OK
jupyter_server_terminals enabled
- Validating jupyter_server_terminals…
jupyter_server_terminals 0.5.3 OK
jupyterlab enabled
- Validating jupyterlab…
jupyterlab 4.2.2 OK
notebook enabled
- Validating notebook…
notebook 7.2.1 OK
notebook_shim enabled
- Validating notebook_shim…
notebook_shim OK
voila.server_extension enabled
- Validating voila.server_extension…
Extension package voila.server_extension took 0.1165s to import
voila.server_extension OK

JupyterHUB logs:

[I 2024-06-21 08:52:46.524 JupyterHub app:3286] Running JupyterHub version 5.0.0
[I 2024-06-21 08:52:46.524 JupyterHub app:3316] Using Authenticator: ldapauthenticator.ldapauthenticator.LDAPAuthenticator-1.3.2
[I 2024-06-21 08:52:46.524 JupyterHub app:3316] Using Spawner: builtins.LDAPSpawner
[I 2024-06-21 08:52:46.524 JupyterHub app:3316] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-5.0.0
[D 2024-06-21 08:52:46.636 JupyterHub app:1857] Generating new cookie_secret
[I 2024-06-21 08:52:46.636 JupyterHub app:1862] Writing cookie_secret to /app/jupyterhub_cookie_secret
[D 2024-06-21 08:52:46.636 JupyterHub app:1984] Connecting to db: sqlite:///jupyterhub.sqlite
[D 2024-06-21 08:52:46.713 JupyterHub orm:1478] Stamping empty database with alembic revision 4621fec11365
[I 2024-06-21 08:52:46.715 alembic.runtime.migration migration:216] Context impl SQLiteImpl.
[I 2024-06-21 08:52:46.715 alembic.runtime.migration migration:219] Will assume non-transactional DDL.
[I 2024-06-21 08:52:46.720 alembic.runtime.migration migration:622] Running stamp_revision → 4621fec11365
[D 2024-06-21 08:52:46.720 alembic.runtime.migration migration:830] new branch insert 4621fec11365
[W 2024-06-21 08:52:46.785 JupyterHub configurable:214] Config option num_proxy not recognized by ConfigurableHTTPProxy.
[W 2024-06-21 08:52:46.786 JupyterHub configurable:214] Config option base_url not recognized by ConfigurableHTTPProxy. Did you mean api_url?
[I 2024-06-21 08:52:46.786 JupyterHub proxy:556] Generating new CONFIGPROXY_AUTH_TOKEN
[D 2024-06-21 08:52:46.786 JupyterHub app:2291] Loading roles into database
[D 2024-06-21 08:52:46.797 JupyterHub roles:326] Assigning default role to User
[I 2024-06-21 08:52:46.800 JupyterHub roles:281] Adding role admin for User:
[I 2024-06-21 08:52:46.802 JupyterHub roles:281] Adding role user for User:
[D 2024-06-21 08:52:46.818 JupyterHub app:2638] Purging expired APITokens
[D 2024-06-21 08:52:46.820 JupyterHub app:2638] Purging expired OAuthCodes
[D 2024-06-21 08:52:46.821 JupyterHub app:2638] Purging expired Shares
[D 2024-06-21 08:52:46.822 JupyterHub app:2638] Purging expired ShareCodes
[D 2024-06-21 08:52:46.824 JupyterHub app:2412] Loading role assignments from config
[D 2024-06-21 08:52:46.825 JupyterHub app:2523] Assigning allowed_users to the user role
[D 2024-06-21 08:52:46.828 JupyterHub app:2531] Assigning 1 allowed_users to the user role
[I 2024-06-21 08:52:46.831 JupyterHub roles:281] Adding role user for User: tkryh
[D 2024-06-21 08:52:46.846 JupyterHub app:2923] Initializing spawners
[D 2024-06-21 08:52:46.853 JupyterHub app:3061] Loaded users:

[I 2024-06-21 08:52:46.853 JupyterHub app:3355] Initialized 0 spawners in 0.007 seconds
[I 2024-06-21 08:52:46.856 JupyterHub metrics:371] Found 0 active users in the last ActiveUserPeriods.twenty_four_hours
[I 2024-06-21 08:52:46.857 JupyterHub metrics:371] Found 0 active users in the last ActiveUserPeriods.seven_days
[I 2024-06-21 08:52:46.857 JupyterHub metrics:371] Found 0 active users in the last ActiveUserPeriods.thirty_days
[I 2024-06-21 08:52:46.858 JupyterHub proxy:752] Starting proxy @ https://:8080/
[D 2024-06-21 08:52:46.858 JupyterHub proxy:753] Proxy cmd: [‘configurable-http-proxy’, ‘–ip’, ‘’, ‘–port’, ‘8080’, ‘–api-ip’, ‘127.0.0.1’, ‘–api-port’, ‘8001’, ‘–error-target’, ‘http://127.0.0.1:8081/hub/error’, ‘–log-level’, ‘info’, ‘–ssl-key’, ‘/app/cert/key.pem’, ‘–ssl-cert’, ‘/app/cert/chain.pem’]
[D 2024-06-21 08:52:46.862 JupyterHub proxy:670] Writing proxy pid file: jupyterhub-proxy.pid
[D 2024-06-21 08:52:46.863 JupyterHub utils:272] Waiting 10s for server at a48be64191d8:8080
[D 2024-06-21 08:52:46.863 JupyterHub utils:119] Server at a48be64191d8:8080 not ready: [Errno 111] Connection refused
[D 2024-06-21 08:52:46.863 JupyterHub utils:272] Waiting 10s for server at 127.0.0.1:8001
[D 2024-06-21 08:52:46.863 JupyterHub utils:119] Server at 127.0.0.1:8001 not ready: [Errno 111] Connection refused
[D 2024-06-21 08:52:46.867 JupyterHub utils:119] Server at 127.0.0.1:8001 not ready: [Errno 111] Connection refused
[D 2024-06-21 08:52:46.934 JupyterHub utils:119] Server at a48be64191d8:8080 not ready: [Errno 111] Connection refused
[D 2024-06-21 08:52:47.016 JupyterHub utils:119] Server at 127.0.0.1:8001 not ready: [Errno 111] Connection refused
[D 2024-06-21 08:52:47.246 JupyterHub utils:119] Server at a48be64191d8:8080 not ready: [Errno 111] Connection refused
08:52:47.415 [ConfigProxy] info: Proxying https://:8080 to (no default)
08:52:47.417 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
[D 2024-06-21 08:52:47.429 JupyterHub utils:280] Server at a48be64191d8:8080 responded in 0.57s
[D 2024-06-21 08:52:47.651 JupyterHub utils:280] Server at 127.0.0.1:8001 responded in 0.79s
[D 2024-06-21 08:52:47.651 JupyterHub proxy:832] Proxy started and appears to be up
[D 2024-06-21 08:52:47.653 JupyterHub proxy:925] Proxy: Fetching GET http://127.0.0.1:8001/api/routes
08:52:47.659 [ConfigProxy] info: 200 GET /api/routes
[I 2024-06-21 08:52:47.660 JupyterHub app:3669] Hub API listening on http://:8081/hub/
[I 2024-06-21 08:52:47.660 JupyterHub app:3671] Private Hub API connect url http://127.0.0.1:8081/hub/
[D 2024-06-21 08:52:47.660 JupyterHub proxy:389] Fetching routes to check
[D 2024-06-21 08:52:47.660 JupyterHub proxy:925] Proxy: Fetching GET http://127.0.0.1:8001/api/routes
[D 2024-06-21 08:52:47.661 JupyterHub proxy:392] Checking routes
08:52:47.661 [ConfigProxy] info: 200 GET /api/routes
[I 2024-06-21 08:52:47.661 JupyterHub proxy:477] Adding route for Hub: / => http://127.0.0.1:8081
[D 2024-06-21 08:52:47.661 JupyterHub proxy:925] Proxy: Fetching POST http://127.0.0.1:8001/api/routes/
08:52:47.662 [ConfigProxy] info: Adding route / → http://127.0.0.1:8081
08:52:47.663 [ConfigProxy] info: Route added / → http://127.0.0.1:8081
08:52:47.663 [ConfigProxy] info: 201 POST /api/routes/
[I 2024-06-21 08:52:47.664 JupyterHub app:3710] JupyterHub is now running at https://:8080/
[D 2024-06-21 08:52:47.664 JupyterHub app:3279] It took 1.274 seconds for the Hub to start
[I 2024-06-21 08:52:56.510 JupyterHub log:192] 302 GET /hub/home → /hub/login?next=%2Fhub%2Fhome (@::ffff:10.0.2.100) 0.90ms
[I 2024-06-21 08:52:56.555 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b’None:wjWBEg7IGzariHpm7RqUVEOnNXDFIxV3k-HGdDqm6S0=’ {‘path’: ‘/hub/’, ‘max_age’: 3600}
[I 2024-06-21 08:52:56.613 JupyterHub log:192] 200 GET /hub/login?next=%2Fhub%2Fhome (@::ffff:10.0.2.100) 58.32ms
[D 2024-06-21 08:52:56.680 JupyterHub log:192] 200 GET /hub/static/css/style.min.css?v=767a5bba6db14f852eca424d08f508ae6c199900b0c5ef7009723188e8bee2e877675e443eaaeab51bae1a12cedffddf99ccf4a4e5684ade405134325e7af7e2 (@::ffff:10.0.2.100) 1.20ms
[D 2024-06-21 08:52:56.751 JupyterHub log:192] 200 GET /hub/static/components/jquery/dist/jquery.min.js?v=de027062931edd07b01842eff24fc15fdbdcaa1af245dcd133155faba9e0c965f0a34dc6144ce3b149bc43b4597073c792cb6dabbfc6168c63095523923bcf77 (@::ffff:10.0.2.100) 0.70ms
[D 2024-06-21 08:52:56.754 JupyterHub log:192] 200 GET /hub/static/components/requirejs/require.js?v=bd1aa102bdb0b27fbf712b32cfcd29b016c272acf3d864ee8469376eaddd032cadcf827ff17c05a8c8e20061418fe58cf79947049f5c0dff3b4f73fcc8cad8ec (@::ffff:10.0.2.100) 0.62ms
[D 2024-06-21 08:52:56.760 JupyterHub log:192] 200 GET /hub/static/components/bootstrap/dist/js/bootstrap.bundle.min.js?v=ecf8bfa2d7656db091f8b9d6f85ecfc057120c93ae5090773b1b441db838bd232fcef26375ee0fa35bf8051f4675cf5a5cd50d155518f922b9d70593f161741a (@::ffff:10.0.2.100) 0.56ms
[D 2024-06-21 08:52:56.859 JupyterHub log:192] 200 GET /hub/logo (@::ffff:10.0.2.100) 0.81ms
[D 2024-06-21 08:52:56.910 JupyterHub log:192] 200 GET /hub/static/favicon.ico?v=fde5757cd3892b979919d3b1faa88a410f28829feb5ba22b6cf069f2c6c98675fceef90f932e49b510e74d65c681d5846b943e7f7cc1b41867422f0481085c1f (@::ffff:10.0.2.100) 0.66ms
[D 2024-06-21 08:53:06.301 JupyterHub ldapauthenticator:256] Looking up user with:
search_base = ‘OU=,OU=,OU=,DC=,DC=’
search_filter = ‘(sAMAccountName=)’
attributes = ‘sAMAccountName’
[D 2024-06-21 08:53:06.303 JupyterHub ldapauthenticator:379] Attempting to bind with CN= \28\29,OU=,OU=,OU=,DC=,DC=
[D 2024-06-21 08:53:06.521 JupyterHub ldapauthenticator:392] Status of user bind with CN= \28\29,OU=,OU=,OU=,DC=,DC= : True
[D 2024-06-21 08:53:06.521 JupyterHub ldapauthenticator:431] username: Using dn CN= \28\29,OU=,OU=,OU=,DC=,DC=
[D 2024-06-21 08:53:06.533 JupyterHub roles:326] Assigning default role to User
[D 2024-06-21 08:53:06.535 JupyterHub base:681] Setting cookie jupyterhub-session-id: {‘httponly’: True, ‘secure’: True, ‘path’: ‘/’}
[D 2024-06-21 08:53:06.535 JupyterHub base:685] Setting cookie for : jupyterhub-hub-login
[D 2024-06-21 08:53:06.535 JupyterHub base:681] Setting cookie jupyterhub-hub-login: {‘httponly’: True, ‘secure’: True, ‘path’: ‘/hub/’}
[I 2024-06-21 08:53:06.535 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b’wjWBEg7IGzariHpm7RqUVEOnNXDFIxV3k-HGdDqm6S0=:2292cb3acd8244d2b95caecd1314359f’ {‘path’: ‘/hub/’}
[I 2024-06-21 08:53:06.535 JupyterHub base:973] User logged in:
[I 2024-06-21 08:53:06.536 JupyterHub log:192] 302 POST /hub/login?next=%2Fhub%2Fhome → /hub/home (@::ffff:10.0.2.100) 855.10ms
[D 2024-06-21 08:53:06.538 JupyterHub log:192] 200 GET /hub/static/components/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 (@::ffff:10.0.2.100) 0.94ms
[D 2024-06-21 08:53:06.586 JupyterHub base:366] Recording first activity for <User( 0/1 running)>
[D 2024-06-21 08:53:06.589 JupyterHub user:496] Creating <class ‘LDAPSpawner’> for :
[D 2024-06-21 08:53:06.589 JupyterHub _xsrf_utils:155] xsrf id mismatch b’wjWBEg7IGzariHpm7RqUVEOnNXDFIxV3k-HGdDqm6S0=:2292cb3acd8244d2b95caecd1314359f’ != b’334d57e9326849b48f55c4ea49845019:2292cb3acd8244d2b95caecd1314359f’
[I 2024-06-21 08:53:06.589 JupyterHub _xsrf_utils:125] Setting new xsrf cookie for b’334d57e9326849b48f55c4ea49845019:2292cb3acd8244d2b95caecd1314359f’ {‘path’: ‘/hub/’}
[I 2024-06-21 08:53:06.599 JupyterHub log:192] 200 GET /hub/home (@::ffff:10.0.2.100) 17.82ms
[D 2024-06-21 08:53:06.705 JupyterHub log:192] 304 GET /hub/static/components/@fortawesome/fontawesome-free/webfonts/fa-solid-900.woff2 (@::ffff:10.0.2.100) 0.59ms
[D 2024-06-21 08:53:06.719 JupyterHub log:192] 200 GET /hub/static/js/home.js?v=20240621085246 (@::ffff:10.0.2.100) 0.97ms
[D 2024-06-21 08:53:06.771 JupyterHub log:192] 200 GET /hub/static/components/moment/moment.js?v=20240621085246 (@::ffff:10.0.2.100) 0.93ms
[D 2024-06-21 08:53:06.772 JupyterHub log:192] 200 GET /hub/static/js/jhapi.js?v=20240621085246 (@::ffff:10.0.2.100) 0.84ms
[D 2024-06-21 08:53:06.817 JupyterHub log:192] 200 GET /hub/static/js/utils.js?v=20240621085246 (@::ffff:10.0.2.100) 0.68ms
[D 2024-06-21 08:53:08.760 JupyterHub scopes:1010] Checking access to /hub/spawn/ via scope servers!server=/
[D 2024-06-21 08:53:08.760 JupyterHub pages:216] Triggering spawn with default options for
[D 2024-06-21 08:53:08.760 JupyterHub base:1095] Initiating spawn for
[D 2024-06-21 08:53:08.760 JupyterHub base:1099] 0/100 concurrent spawns
[D 2024-06-21 08:53:08.760 JupyterHub base:1104] 0 active servers
[I 2024-06-21 08:53:08.773 JupyterHub provider:661] Creating oauth client jupyterhub-user-
[D 2024-06-21 08:53:08.780 JupyterHub user:912] Calling Spawner.start for
useradd: warning: the home directory /app/notebook/ already exists.
useradd: Not copying any file from skel directory into it.
[I 2024-06-21 08:53:09.032 JupyterHub spawner:1738] Spawning jupyterhub-singleuser --VoilaConfiguration.enable_nbextensions=True ‘–VoilaConfiguration.file_whitelist=[’“'”'.
‘"’"‘]’
[D 2024-06-21 08:53:09.046 JupyterHub spawner:1432] Polling subprocess every 30s
[D 2024-06-21 08:53:09.050 JupyterHub utils:292] Waiting 30s for server at http://127.0.0.1:54827/user//api
[I 2024-06-21 08:53:09.761 JupyterHub log:192] 302 GET /hub/spawn/ → /hub/spawn-pending/ (@::ffff:10.0.2.100) 1005.27ms
[D 2024-06-21 08:53:09.808 JupyterHub scopes:1010] Checking access to /hub/spawn-pending/ via scope servers!server=/
[I 2024-06-21 08:53:09.808 JupyterHub pages:397] is pending spawn
[I 2024-06-21 08:53:09.811 JupyterHub log:192] 200 GET /hub/spawn-pending/ (@::ffff:10.0.2.100) 8.26ms
[D 2024-06-21 08:53:09.910 JupyterHub scopes:1010] Checking access to /hub/api/users//server/progress via scope read:servers!server=/
[I 2024-06-21 08:53:10.087 ServerApp] Extension package jupyterlab took 0.1166s to import
[I 2024-06-21 08:53:10.877 ServerApp] Extension package voila.server_extension took 0.2045s to import
[I 2024-06-21 08:53:10.877 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2024-06-21 08:53:10.881 ServerApp] jupyter_scheduler | extension was successfully linked.
[I 2024-06-21 08:53:10.884 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2024-06-21 08:53:10.885 JupyterHubSingleUser] Starting jupyterhub single-user server extension version 5.0.0
[I 2024-06-21 08:53:10.885 JupyterHubSingleUser] Using default url from environment $JUPYTERHUB_DEFAULT_URL: /lab
[I 2024-06-21 08:53:10.888 ServerApp] jupyterhub | extension was successfully linked.
[W 2024-06-21 08:53:10.889 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-06-21 08:53:10.892 ServerApp] jupyterlab | extension was successfully linked.
[W 2024-06-21 08:53:10.893 JupyterNotebookApp] ‘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-06-21 08:53:10.896 ServerApp] notebook | extension was successfully linked.
/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py:1897: DeprecationWarning: ServerApp.token config is deprecated in jupyter-server 2.0. Use IdentityProvider.token
return t.cast(Sentinel, self._get_trait_default_generator(names[0])(self))
[I 2024-06-21 08:53:11.836 ServerApp] notebook_shim | extension was successfully linked.
[I 2024-06-21 08:53:11.836 ServerApp] voila.server_extension | extension was successfully linked.
[I 2024-06-21 08:53:11.854 ServerApp] notebook_shim | extension was successfully loaded.
[I 2024-06-21 08:53:11.856 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2024-06-21 08:53:11.879 ServerApp] jupyter_scheduler | extension was successfully loaded.
[I 2024-06-21 08:53:11.880 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2024-06-21 08:53:11.900 JupyterHub log:192] 200 GET /hub/api (@127.0.0.1) 0.67ms
[I 2024-06-21 08:53:11.901 JupyterHubSingleUser] Updating Hub with activity every 300 seconds
[I 2024-06-21 08:53:11.902 ServerApp] jupyterhub | extension was successfully loaded.
[I 2024-06-21 08:53:11.910 LabApp] JupyterLab extension loaded from /usr/local/lib/python3.9/site-packages/jupyterlab
[I 2024-06-21 08:53:11.910 LabApp] JupyterLab application directory is /usr/local/share/jupyter/lab
[I 2024-06-21 08:53:11.911 LabApp] Extension Manager is ‘pypi’.
[I 2024-06-21 08:53:11.954 ServerApp] jupyterlab | extension was successfully loaded.
[I 2024-06-21 08:53:11.959 ServerApp] notebook | extension was successfully loaded.
[I 2024-06-21 08:53:11.962 ServerApp] voila.server_extension | extension was successfully loaded.
[I 2024-06-21 08:53:11.962 ServerApp] Serving notebooks from local directory: /app/notebook
[I 2024-06-21 08:53:11.963 ServerApp] Jupyter Server 2.14.1 is running at:
[I 2024-06-21 08:53:11.963 ServerApp] http://127.0.0.1:54827/user//lab?token=…
[I 2024-06-21 08:53:11.963 ServerApp] http://127.0.0.1:54827/user//lab?token=…
[I 2024-06-21 08:53:11.963 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[D 2024-06-21 08:53:11.970 JupyterHub base:366] Recording first activity for <APIToken(‘2723…’, user=‘’, client_id=‘jupyterhub’)>
[D 2024-06-21 08:53:11.974 JupyterHub scopes:1010] Checking access to /hub/api/users//activity via scope users:activity!user=
[D 2024-06-21 08:53:11.977 JupyterHub users:959] Activity for user : 2024-06-21T08:53:11.844765Z
[D 2024-06-21 08:53:11.977 JupyterHub users:977] Activity on server /: 2024-06-21T08:53:11.844765Z
[I 2024-06-21 08:53:11.979 JupyterHub log:192] 200 POST /hub/api/users//activity (@127.0.0.1) 11.49ms
[I 2024-06-21 08:53:12.522 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-06-21 08:53:12.872 ServerApp] 200 GET /user//api (@127.0.0.1) 1.20ms
[D 2024-06-21 08:53:12.873 JupyterHub utils:328] Server at http://127.0.0.1:54827/user//api responded in 3.82s
[D 2024-06-21 08:53:12.873 JupyterHub _version:73] jupyterhub and jupyterhub-singleuser both on version 5.0.0
[I 2024-06-21 08:53:12.873 JupyterHub base:1124] User took 4.112 seconds to start
[I 2024-06-21 08:53:12.873 JupyterHub proxy:331] Adding user to proxy /user// => http://127.0.0.1:54827
[D 2024-06-21 08:53:12.873 JupyterHub proxy:925] Proxy: Fetching POST http://127.0.0.1:8001/api/routes/user/
08:53:12.874 [ConfigProxy] info: Adding route /user/ → http://127.0.0.1:54827
08:53:12.875 [ConfigProxy] info: Route added /user/ → http://127.0.0.1:54827
08:53:12.875 [ConfigProxy] info: 201 POST /api/routes/user/
[I 2024-06-21 08:53:12.875 JupyterHub users:854] Server is ready
[I 2024-06-21 08:53:12.876 JupyterHub log:192] 200 GET /hub/api/users//server/progress?_xsrf=[secret] (@::ffff:10.0.2.100) 2969.20ms
[D 2024-06-21 08:53:12.928 JupyterHub scopes:1010] Checking access to /hub/spawn-pending/ via scope servers!server=/
[I 2024-06-21 08:53:12.929 JupyterHub log:192] 302 GET /hub/spawn-pending/ → /user// (@::ffff:10.0.2.100) 4.07ms
[I 2024-06-21 08:53:12.969 ServerApp] 302 GET /user// → /user//lab? (@::ffff:10.0.2.100) 0.59ms
[I 2024-06-21 08:53:13.009 ServerApp] 302 GET /user//lab? → /hub/api/oauth2/authorize?client_id=jupyterhub-user-&redirect_uri=%2Fuser%2F%2Foauth_callback&response_type=code&state=[secret] (@::ffff:10.0.2.100) 1.68ms
[D 2024-06-21 08:53:13.052 JupyterHub provider:421] Validating client id jupyterhub-user-
[D 2024-06-21 08:53:13.054 oauthlib.oauth2.rfc6749.grant_types.authorization_code authorization_code:362] Validating redirection uri /user//oauth_callback for client jupyterhub-user-.
[D 2024-06-21 08:53:13.054 oauthlib.oauth2.rfc6749.grant_types.base base:231] Using provided redirect_uri /user//oauth_callback
[D 2024-06-21 08:53:13.054 JupyterHub provider:497] validate_redirect_uri: client_id=jupyterhub-user-, redirect_uri=/user//oauth_callback
[D 2024-06-21 08:53:13.055 oauthlib.oauth2.rfc6749.grant_types.base base:172] Validating access to scopes [‘access:servers!server=/’, ‘read:users:name!user’, ‘read:users:groups!user’] for client ‘jupyterhub-user-’ (<OAuthClient(identifier=‘jupyterhub-user-’)>).
[D 2024-06-21 08:53:13.055 JupyterHub provider:624] Allowing request for scope(s) for jupyterhub-user-: access:servers!server=/,read:users:groups!user,read:users:name!user
[D 2024-06-21 08:53:13.056 JupyterHub auth:326] Skipping oauth confirmation for <User( 1/1 running)> accessing Server at /user//
[D 2024-06-21 08:53:13.056 oauthlib.oauth2.rfc6749.endpoints.authorization authorization:98] Dispatching response_type code request to <oauthlib.oauth2.rfc6749.grant_types.authorization_code.AuthorizationCodeGrant object at 0x7efcbbedee50>.
[D 2024-06-21 08:53:13.056 JupyterHub provider:421] Validating client id jupyterhub-user-
[D 2024-06-21 08:53:13.057 oauthlib.oauth2.rfc6749.grant_types.authorization_code authorization_code:362] Validating redirection uri /user//oauth_callback for client jupyterhub-user-.
[D 2024-06-21 08:53:13.057 oauthlib.oauth2.rfc6749.grant_types.base base:231] Using provided redirect_uri /user//oauth_callback
[D 2024-06-21 08:53:13.057 JupyterHub provider:497] validate_redirect_uri: client_id=jupyterhub-user-, redirect_uri=/user//oauth_callback
[D 2024-06-21 08:53:13.057 oauthlib.oauth2.rfc6749.grant_types.base base:172] Validating access to scopes {‘access:servers!server=/’, ‘read:users:name!user’, ‘read:users:groups!user’} for client ‘jupyterhub-user-’ (<OAuthClient(identifier=‘jupyterhub-user-’)>).
[D 2024-06-21 08:53:13.058 JupyterHub provider:624] Allowing request for scope(s) for jupyterhub-user-: access:servers!server=/,read:users:groups!user,read:users:name!user
[D 2024-06-21 08:53:13.058 oauthlib.oauth2.rfc6749.grant_types.authorization_code authorization_code:245] Pre resource owner authorization validation ok for <oauthlib.Request SANITIZED>.
[D 2024-06-21 08:53:13.058 oauthlib.oauth2.rfc6749.grant_types.authorization_code authorization_code:170] Created authorization code grant {‘code’: ‘52vZNLP5U9UDLmzkzZ68FFpyMawRZT’, ‘state’: ‘OF4r6TvqBu_JJizSC1SEYA’} for request <oauthlib.Request SANITIZED>.
[D 2024-06-21 08:53:13.058 oauthlib.oauth2.rfc6749.grant_types.authorization_code authorization_code:277] Saving grant {‘code’: ‘52vZNLP5U9UDLmzkzZ68FFpyMawRZT’, ‘state’: ‘OF4r6TvqBu_JJizSC1SEYA’} for <oauthlib.Request SANITIZED>.
[D 2024-06-21 08:53:13.058 JupyterHub provider:247] Saving authorization code jupyterhub-user-, 52v…, (), {}
[I 2024-06-21 08:53:13.062 JupyterHub log:192] 302 GET /hub/api/oauth2/authorize?client_id=jupyterhub-user-&redirect_uri=%2Fuser%2F%2Foauth_callback&response_type=code&state=[secret] → /user//oauth_callback?code=[secret]&state=[secret] (@::ffff:10.0.2.100) 13.56ms
[D 2024-06-21 08:53:13.105 oauthlib.oauth2.rfc6749.endpoints.token token:112] Dispatching grant_type authorization_code request to <oauthlib.oauth2.rfc6749.grant_types.authorization_code.AuthorizationCodeGrant object at 0x7efcbbedee50>.
[D 2024-06-21 08:53:13.106 JupyterHub provider:58] authenticate_client <oauthlib.Request SANITIZED>
[D 2024-06-21 08:53:13.119 oauthlib.oauth2.rfc6749.grant_types.authorization_code authorization_code:533] Using provided redirect_uri /user//oauth_callback
[D 2024-06-21 08:53:13.119 JupyterHub provider:117] confirm_redirect_uri: client_id=jupyterhub-user-, redirect_uri=/user//oauth_callback
[D 2024-06-21 08:53:13.119 oauthlib.oauth2.rfc6749.grant_types.authorization_code authorization_code:301] Token request validation ok for <oauthlib.Request SANITIZED>.
[D 2024-06-21 08:53:13.119 JupyterHub provider:345] Saving bearer token {‘access_token’: ‘REDACTED’, ‘expires_in’: 1209600, ‘token_type’: ‘Bearer’, ‘scope’: ‘access:servers!server=/ read:users:groups!user read:users:name!user’, ‘refresh_token’: ‘REDACTED’}
[D 2024-06-21 08:53:13.208 JupyterHub provider:205] Deleting oauth code 52v… for jupyterhub-user-
[I 2024-06-21 08:53:13.213 JupyterHub log:192] 200 POST /hub/api/oauth2/token (@127.0.0.1) 109.43ms
[D 2024-06-21 08:53:13.216 JupyterHub base:366] Recording first activity for <APIToken(‘7xdC…’, user=‘’, client_id=‘jupyterhub-user-’)>
[I 2024-06-21 08:53:13.218 JupyterHub log:192] 200 GET /hub/api/user (@127.0.0.1) 3.84ms
[I 2024-06-21 08:53:13.219 ServerApp] Logged-in user

Render with Voilda from /lab URL https://:8080/user//lab/tree//voila_test.ipynb

[I 2024-06-21 08:53:34.797 ServerApp] 200 GET /user//api/terminals?1718960014660 (@::ffff:10.0.2.100) 1.12ms
[I 2024-06-21 08:53:34.837 ServerApp] 200 GET /user//lab/api/workspaces?1718960014765 (@::ffff:10.0.2.100) 2.07ms
[I 2024-06-21 08:53:36.010 ServerApp] 200 GET /user//api/contents//voila_test.ipynb?content=0&hash=1&1718960015959 (@::ffff:10.0.2.100) 2.31ms
[I 2024-06-21 08:53:36.057 ServerApp] Saving file at //voila_test.ipynb
[I 2024-06-21 08:53:36.074 ServerApp] 200 PUT /user//api/contents//voila_test.ipynb?1718960016009 (@::ffff:10.0.2.100) 17.48ms
[I 2024-06-21 08:53:36.120 ServerApp] 200 GET /user//api/contents//voila_test.ipynb?content=0&hash=1&1718960016067 (@::ffff:10.0.2.100) 3.89ms
[I 2024-06-21 08:53:36.123 ServerApp] 200 GET /user//api/contents/?content=1&hash=0&1718960016067 (@::ffff:10.0.2.100) 5.32ms
[I 2024-06-21 08:53:36.163 ServerApp] 200 GET /user//api/contents//voila_test.ipynb/checkpoints?1718960016114 (@::ffff:10.0.2.100) 1.58ms
[I 2024-06-21 08:53:36.165 ServerApp] 200 GET /user//api/contents//voila_test.ipynb?content=0&hash=0&1718960016114 (@::ffff:10.0.2.100) 1.34ms
[I 2024-06-21 08:53:36.268 ServerApp] Kernel started: a7e2e12d-59bc-4504-8d10-403aa6fade30
[I 2024-06-21 08:53:36.682 ServerApp] 200 GET /user//api/contents//voila_test.ipynb/checkpoints?1718960016239 (@::ffff:10.0.2.100) 6.56ms
[I 2024-06-21 08:53:36.989 ServerApp] 200 GET /user//voila/render//voila_test.ipynb (@::ffff:10.0.2.100) 760.37ms
[I 2024-06-21 08:53:37.293 ServerApp] 204 PUT /user//lab/api/workspaces/default?1718960017242 (@::ffff:10.0.2.100) 1.48ms
[I 2024-06-21 08:53:38.008 ServerApp] 200 GET /user//api/kernels?1718960017959 (@::ffff:10.0.2.100) 1.03ms
[I 2024-06-21 08:53:38.043 ServerApp] 200 GET /user//api/sessions?1718960017990 (@::ffff:10.0.2.100) 1.08ms
[I 2024-06-21 08:53:44.960 ServerApp] 200 GET /user//api/terminals?1718960024841 (@::ffff:10.0.2.100) 0.94ms
[I 2024-06-21 08:53:45.000 ServerApp] 200 GET /user//lab/api/workspaces?1718960024870 (@::ffff:10.0.2.100) 2.09ms
[I 2024-06-21 08:53:46.184 ServerApp] 200 GET /user//api/contents/?content=1&hash=0&1718960026129 (@::ffff:10.0.2.100) 4.78ms

Hello,

I solved my problem. The root cause was:

Refused to frame ‘https://:8080/’ because an ancestor violates the following Content Security Policy directive: “frame-ancestors ‘none’”.

That message was logged in browser console. Somehow I skip that before you asked for.

So solution for me:

c.JupyterHub.tornado_settings = {'headers': {'Content-Security-Policy': "frame-ancestors *;"}}
c.Spawner.args = [
    '--VoilaConfiguration.enable_nbextensions=True',
    "--VoilaConfiguration.file_whitelist=['.*']",
    '--NotebookApp.tornado_settings={"headers":{"Content-Security-Policy": "frame-ancestors *;"}}']
1 Like