I was trying to integrate jupyter-notebook inside my web application through iframe. I was able to show the .ipynb file inside the iframe. But codes are not executing. It shows asterisks on the left side. (Without iframe, everything is working perfectly)
Here are the logs:
[W 2024-03-18 22:22:55.503 ServerApp] Couldn't authenticate WebSocket connection
[W 2024-03-18 22:22:55.504 ServerApp] 403 GET /api/kernels/b7c10128-b9ca-41b7-be4e-d9306929beae/channels?session_id=54f772e9-d019-4325-a57e-5307e529a961 (@127.0.0.1) 1.64ms referer=None
[W 2024-03-18 22:22:55.520 ServerApp] Couldn't authenticate WebSocket connection
[W 2024-03-18 22:22:55.521 ServerApp] 403 GET /api/kernels/b7c10128-b9ca-41b7-be4e-d9306929beae/channels?session_id=54f772e9-d019-4325-a57e-5307e529a961 (@127.0.0.1) 2.27ms referer=None
[I 2024-03-18 22:22:55.529 ServerApp] 302 GET /kernelspecs/python3/logo-64x64.png (@127.0.0.1) 0.81ms
[W 2024-03-18 22:22:56.167 ServerApp] Couldn't authenticate WebSocket connection
[W 2024-03-18 22:22:56.167 ServerApp] 403 GET /api/kernels/b7c10128-b9ca-41b7-be4e-d9306929beae/channels?session_id=54f772e9-d019-4325-a57e-5307e529a961 (@127.0.0.1) 0.97ms referer=None
[W 2024-03-18 22:22:58.663 ServerApp] Couldn't authenticate WebSocket connection
[W 2024-03-18 22:22:58.663 ServerApp] 403 GET /api/kernels/b7c10128-b9ca-41b7-be4e-d9306929beae/channels?session_id=54f772e9-d019-4325-a57e-5307e529a961 (@127.0.0.1) 0.94ms referer=None
[W 2024-03-18 22:23:00.387 ServerApp] Couldn't authenticate WebSocket connection
[W 2024-03-18 22:23:00.388 ServerApp] 403 GET /api/kernels/b7c10128-b9ca-41b7-be4e-d9306929beae/channels?session_id=54f772e9-d019-4325-a57e-5307e529a961 (@127.0.0.1) 1.48ms referer=None
[W 2024-03-18 22:23:11.907 ServerApp] Couldn't authenticate WebSocket connection
[W 2024-03-18 22:23:11.908 ServerApp] 403 GET /api/kernels/b7c10128-b9ca-41b7-be4e-d9306929beae/channels?session_id=54f772e9-d019-4325-a57e-5307e529a961 (@127.0.0.1) 1.00ms referer=None
[W 2024-03-18 22:23:35.230 ServerApp] Couldn't authenticate WebSocket connection
[W 2024-03-18 22:23:35.231 ServerApp] 403 GET /api/kernels/b7c10128-b9ca-41b7-be4e-d9306929beae/channels?session_id=54f772e9-d019-4325-a57e-5307e529a961 (@127.0.0.1) 0.95ms referer=None
[W 2024-03-18 22:24:32.856 ServerApp] Couldn't authenticate WebSocket connection
[W 2024-03-18 22:24:32.857 ServerApp] 403 GET /api/kernels/b7c10128-b9ca-41b7-be4e-d9306929beae/channels?session_id=54f772e9-d019-4325-a57e-5307e529a961 (@127.0.0.1) 1.49ms referer=None
Here is the jupyter_notebook_config.py
c = get_config()
c.ServerApp.allow_origin = '*'
c.ServerApp.allow_remote_access = True
c.ServerApp.disable_check_xsrf = True
c.ServerApp.tornado_settings = {'headers': {'Content-Security-Policy': "frame-ancestors self https://example.com/", "Access-Control-Allow-Origin": "https://example.com/"}, "cookie_options": {"SameSite": "None", "Secure": True}}