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

SSL Error while fetching extensions #15602

Open
caleb-at-pieces opened this issue Jan 3, 2024 · 18 comments
Open

SSL Error while fetching extensions #15602

caleb-at-pieces opened this issue Jan 3, 2024 · 18 comments

Comments

@caleb-at-pieces
Copy link

caleb-at-pieces commented Jan 3, 2024

Description

JupyterLab is saying that there is an uncaught error while trying to fetch the list of extensions, this also makes installing extensions from the extension manager impossible as the search feature does not work.

the error output in the jupyter lab shell [E 2024-01-03 17:10:45.372 ServerApp] Uncaught exception GET /lab/api/extensions?query&page=1&per_page=30&refresh=0&1704319843799 (::1) HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/lab/api/extensions?query&page=1&per_page=30&refresh=0&1704319843799', version='HTTP/1.1', remote_ip='::1') Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tornado/web.py", line 1790, in _execute result = await result ^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/handlers/extension_manager_handler.py", line 37, in get extensions, last_page = await self.manager.list_extensions(query, page, per_page) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/manager.py", line 368, in list_extensions await self.refresh(query, page, per_page) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/manager.py", line 402, in refresh await self._update_extensions_list(query, page, per_page) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/manager.py", line 575, in _update_extensions_list extensions, last_page = await self.list_packages(query, page, per_page) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/pypi.py", line 201, in list_packages matches = await self.__get_all_extensions() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/pypi.py", line 255, in __get_all_extensions self.__all_packages_cache = await self.__throttleRequest( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/pypi.py", line 156, in __throttleRequest data = await current_loop.run_in_executor(None, fn, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1122, in __call__ return self.__send(self.__name, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1464, in __request response = self.__transport.request( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1166, in request return self.single_request(host, handler, request_body, verbose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1178, in single_request http_conn = self.send_request(host, handler, request_body, verbose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1291, in send_request self.send_content(connection, request_body) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1321, in send_content connection.endheaders(request_body) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1278, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1038, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 976, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1455, in connect self.sock = self._context.wrap_socket(self.sock, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 517, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1075, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1346, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002) [W 2024-01-03 17:10:45.374 ServerApp] wrote error: 'Unhandled error' Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tornado/web.py", line 1790, in _execute result = await result ^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/handlers/extension_manager_handler.py", line 37, in get extensions, last_page = await self.manager.list_extensions(query, page, per_page) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/manager.py", line 368, in list_extensions await self.refresh(query, page, per_page) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/manager.py", line 402, in refresh await self._update_extensions_list(query, page, per_page) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/manager.py", line 575, in _update_extensions_list extensions, last_page = await self.list_packages(query, page, per_page) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/pypi.py", line 201, in list_packages matches = await self.__get_all_extensions() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/pypi.py", line 255, in __get_all_extensions self.__all_packages_cache = await self.__throttleRequest( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/jupyterlab/extensions/pypi.py", line 156, in __throttleRequest data = await current_loop.run_in_executor(None, fn, *args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1122, in __call__ return self.__send(self.__name, args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1464, in __request response = self.__transport.request( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1166, in request return self.single_request(host, handler, request_body, verbose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1178, in single_request http_conn = self.send_request(host, handler, request_body, verbose) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1291, in send_request self.send_content(connection, request_body) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/xmlrpc/client.py", line 1321, in send_content connection.endheaders(request_body) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1278, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1038, in _send_output self.send(msg) File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 976, in send self.connect() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/http/client.py", line 1455, in connect self.sock = self._context.wrap_socket(self.sock, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 517, in wrap_socket return self.sslsocket_class._create( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1075, in _create self.do_handshake() File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/ssl.py", line 1346, in do_handshake self._sslobj.do_handshake() ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002) [E 2024-01-03 17:10:45.375 ServerApp] { "Host": "localhost:8888", "Accept": "*/*", "Referer": "http://localhost:8888/lab/tree/untitled.md", "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (

Reproduce

  1. start jupyterlab
  2. open localhost:8888/lab in the browser
  3. observe errors thrown in the jupyter lab command output
    a. it's also impossible to search for extensions due to the same issue.

Expected behavior

I would expect no errors, as well as the ability to search for extensions in the extension manager.

Context

  • Operating System and version: see below
  • Browser and version: Chrome 120.0.6099.199
  • JupyterLab version: see below
Troubleshoot Output
$PATH:
	/Users/calebanderson/Documents/ngrok
	/Users/calebanderson/Documents/google-cloud-sdk/bin
	/Users/calebanderson/.nvm/versions/node/v20.3.0/bin
	/Users/calebanderson/anaconda3/envs/test-1.8.2/bin
	/Users/calebanderson/anaconda3/condabin
	/Library/Frameworks/Python.framework/Versions/3.11/bin
	/opt/homebrew/bin
	/opt/homebrew/sbin
	/usr/local/bin
	/System/Cryptexes/App/usr/bin
	/usr/bin
	/bin
	/usr/sbin
	/sbin
	/Library/Apple/usr/bin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
	/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
	/Users/calebanderson/Documents/flutter/bin

sys.path:
/Library/Frameworks/Python.framework/Versions/3.11/bin
/Library/Frameworks/Python.framework/Versions/3.11/lib/python311.zip
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/lib-dynload
/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages
/Users/calebanderson/Documents/plugin_jupyter

sys.executable:
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11

sys.version:
3.11.3 (v3.11.3:f3909b8bc8, Apr 4 2023, 20:12:10) [Clang 13.0.0 (clang-1300.0.29.30)]

platform.platform():
macOS-13.4.1-arm64-arm-64bit

which -a jupyter:
/Library/Frameworks/Python.framework/Versions/3.11/bin/jupyter

pip list:
Package Version Editable project location
------------------------- ---------- ---------------------------------------------
aiofiles 22.1.0
aiosqlite 0.19.0
anyio 4.2.0
appnope 0.1.3
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asttokens 2.4.1
async-lru 2.0.4
attrs 23.2.0
Babel 2.14.0
backcall 0.2.0
beautifulsoup4 4.12.2
bleach 6.1.0
build 1.0.3
certifi 2023.11.17
cffi 1.16.0
charset-normalizer 3.3.2
comm 0.2.1
contourpy 1.1.0
cycler 0.11.0
debugpy 1.8.0
decorator 5.1.1
defusedxml 0.7.1
docutils 0.20.1
executing 2.0.1
fastjsonschema 2.19.1
fonttools 4.40.0
fqdn 1.5.1
idna 3.6
importlib-metadata 6.8.0
ipykernel 6.28.0
ipython 8.19.0
ipython-genutils 0.2.0
ipywidgets 8.1.1
isoduration 20.11.0
jaraco.classes 3.3.0
jedi 0.19.1
Jinja2 3.1.2
json5 0.9.14
jsonpointer 2.4
jsonschema 4.20.0
jsonschema-specifications 2023.12.1
jupyter 1.0.0
jupyter_client 8.6.0
jupyter-console 6.6.3
jupyter_core 5.7.0
jupyter-events 0.9.0
jupyter-lsp 2.2.1
jupyter-pieces 1.9.0 /Users/calebanderson/Documents/plugin_jupyter
jupyter_server 2.12.1
jupyter_server_fileid 0.9.0
jupyter_server_terminals 0.5.1
jupyter_server_ydoc 0.8.0
jupyter-ydoc 0.2.4
jupyterlab 4.0.10
jupyterlab_pygments 0.3.0
jupyterlab_server 2.25.2
jupyterlab-widgets 3.0.9
keyring 24.2.0
kiwisolver 1.4.4
markdown-it-py 3.0.0
MarkupSafe 2.1.3
matplotlib 3.7.1
matplotlib-inline 0.1.6
mdurl 0.1.2
mistune 3.0.2
more-itertools 10.1.0
nbclassic 1.0.0
nbclient 0.9.0
nbconvert 7.14.0
nbformat 5.9.2
nest-asyncio 1.5.8
networkx 3.1
nh3 0.2.14
notebook 7.0.6
notebook_shim 0.2.3
numpy 1.24.3
overrides 7.4.0
packaging 23.2
pandocfilters 1.5.0
parso 0.8.3
pexpect 4.9.0
pickleshare 0.7.5
Pillow 9.5.0
pip 23.3.2
pkginfo 1.9.6
platformdirs 4.1.0
prometheus-client 0.19.0
prompt-toolkit 3.0.43
psutil 5.9.7
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.21
Pygments 2.17.2
pyparsing 3.0.9
pyproject_hooks 1.0.0
pyrsistent 0.19.3
python-dateutil 2.8.2
python-json-logger 2.0.7
PyYAML 6.0.1
pyzmq 25.1.2
qtconsole 5.5.0
QtPy 2.4.1
readme-renderer 42.0
referencing 0.32.0
requests 2.31.0
requests-toolbelt 1.0.0
rfc3339-validator 0.1.4
rfc3986 2.0.0
rfc3986-validator 0.1.1
rich 13.6.0
rpds-py 0.16.2
Send2Trash 1.8.2
setuptools 68.2.2
six 1.16.0
sniffio 1.3.0
soupsieve 2.5
stack-data 0.6.3
terminado 0.18.0
tinycss2 1.2.1
tornado 6.4
traitlets 5.14.1
twine 4.0.2
types-python-dateutil 2.8.19.14
typing_extensions 4.5.0
uri-template 1.3.0
urllib3 2.1.0
wcwidth 0.2.12
webcolors 1.13
webencodings 0.5.1
websocket-client 1.7.0
wheel 0.41.3
widgetsnbextension 4.0.9
y-py 0.5.9
ypy-websocket 0.8.2
zipp 3.17.0

conda list:
# packages in environment at /Users/calebanderson/anaconda3/envs/test-1.8.2:
#
# Name Version Build Channel

conda env:
name: test-1.8.2
channels:
- defaults
prefix: /Users/calebanderson/anaconda3/envs/test-1.8.2

Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
GET http://localhost:8888/lab/api/extensions?query&page=1&per_page=30&refresh=0&1704319843799 500 (Internal Server Error)
n @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
n @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
i @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
search @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
factory @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
_execute @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
o @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
setTimeout (async)
schedule @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
await in schedule (async)
invoke @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
set isDisclaimed @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
(anonymous) @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
Promise.then (async)
activate @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
(anonymous) @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
Promise.then (async)
activatePlugin @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
(anonymous) @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
start @ jlab_core.bca8c55f9011e1fc4717.js?v=bca8c55f9011e1fc4717:1
K @ 812.2577ef8cc5e1b8ad35e9.js?v=2577ef8cc5e1b8ad35e9:1
load (async)
e @ main.086ffbfbda4e5316f5b5.js?v=086ffbfbda4e5316f5b5:1
await in e (async)
37559 @ main.086ffbfbda4e5316f5b5.js?v=086ffbfbda4e5316f5b5:1
t @ main.086ffbfbda4e5316f5b5.js?v=086ffbfbda4e5316f5b5:1
(anonymous) @ main.086ffbfbda4e5316f5b5.js?v=086ffbfbda4e5316f5b5:1
(anonymous) @ main.086ffbfbda4e5316f5b5.js?v=086ffbfbda4e5316f5b5:1

screenshot of the error shown in the extension manager:
image

@JasonWeill
Copy link
Contributor

It looks like the issue is in connecting to PyPI via SSL. Do you have a proxy on your network that is intercepting SSL certificates? Is there a way to capture the HTTPS request that is being made, such as by using Fiddler to intercept network traffic? I can't reproduce this, although I'm not using a proxy server. It would help if we knew what request, to which server, is causing this error. Thanks!

@caleb-at-pieces
Copy link
Author

It looks like the issue is in connecting to PyPI via SSL. Do you have a proxy on your network that is intercepting SSL certificates? Is there a way to capture the HTTPS request that is being made, such as by using Fiddler to intercept network traffic? I can't reproduce this, although I'm not using a proxy server. It would help if we knew what request, to which server, is causing this error. Thanks!

Unfortunately I am not using any kind of special proxy, when you say which server are you saying which PyPi server? I'm not sure how to check this, the route that is failing on the JLab kernel is GET /lab/api/extensions?query&page=1&per_page=30&refresh=0&1704821307620

@JasonWeill
Copy link
Contributor

Can you access https://pypi.org/pypi from your computer without any issues with the certificate? You can alternatively try using a PyPI mirror (note that there are no officially endorsed mirrors, although some organizations run one) by running:

jupyter lab --PyPIExtensionManager.base_url=https://mirror.example/pypi

@caleb-at-pieces
Copy link
Author

Can you access https://pypi.org/pypi from your computer without any issues with the certificate? You can alternatively try using a PyPI mirror (note that there are no officially endorsed mirrors, although some organizations run one) by running:

jupyter lab --PyPIExtensionManager.base_url=https://mirror.example/pypi

Yes I am able to access it fine. Running jupyterlab with a mirrored pypi is also resulting in the same outcome.

@firezym
Copy link

firezym commented Jan 11, 2024

I get the same annoying issue in the backend and frontend under 4.0.10 on windows environment.

@JasonWeill
Copy link
Contributor

I found pypa/pip#10939 on a web search; are you able to run pip commands from the same Conda environment in which you run JupyterLab (if you use Conda) or from the same terminal where you started JupyterLab?

@caleb-at-pieces
Copy link
Author

I found pypa/pip#10939 on a web search; are you able to run pip commands from the same Conda environment in which you run JupyterLab (if you use Conda) or from the same terminal where you started JupyterLab?

Yes, I am able to pip install xyz just fine.

@firezym
Copy link

firezym commented Jan 12, 2024

I have 3 kinds of errors depending on how extension manager config is set (backend on windows server 2022):

image

1. default config with enable status checked & disclaimed satus unchecked

Console Output Error
[E 2024-01-12 17:39:43.482 ServerApp] Uncaught exception, closing connection.
    Traceback (most recent call last):
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
        self._handle_read()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
        self._do_ssl_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
        self.socket.do_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
Exception in callback None()
handle: 
Traceback (most recent call last):
  File "D:\ProgramData\miniconda3\envs\prod\Lib\asyncio\events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\platform\asyncio.py", line 192, in _handle_events
    handler_func(fileobj, events)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
    self._handle_read()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
    self._do_ssl_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
    self.socket.do_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
[E 2024-01-12 17:39:43.498 ServerApp] Exception in callback functools.partial(. at 0x000001CC288A1D00>,  exception=SSLCertVerificationError(5, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)')>)
    Traceback (most recent call last):
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\ioloop.py", line 738, in _run_callback
        ret = callback()
              ^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\simple_httpclient.py", line 287, in 
        gen.convert_yielded(self.run()), lambda f: f.result()
                                                   ^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\simple_httpclient.py", line 340, in run
        stream = await self.tcp_client.connect(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\tcpclient.py", line 292, in connect
        stream = await stream.start_tls(
                 ^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
        self._handle_read()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
        self._do_ssl_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
        self.socket.do_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

2. Extension manager's enable status unchecked & disclaimed satus unchecked

Console Output Error
[E 2024-01-12 18:21:19.617 ServerApp] Uncaught exception, closing connection.
    Traceback (most recent call last):
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
        self._handle_read()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
        self._do_ssl_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
        self.socket.do_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
Exception in callback None()
handle: 
Traceback (most recent call last):
  File "D:\ProgramData\miniconda3\envs\prod\Lib\asyncio\events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\platform\asyncio.py", line 192, in _handle_events
    handler_func(fileobj, events)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
    self._handle_read()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
    self._do_ssl_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
    self.socket.do_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
[I 2024-01-12 18:21:19.883 ServerApp] Connecting to kernel 76edede5-6e9a-4852-84f2-292632430c4b.

3. Extension manager's enable status checked & disclaimed satus checked, a lot more error occurred:

Console Output Error
[E 2024-01-12 18:24:13.756 ServerApp] Uncaught exception GET /lab/api/extensions?query&page=1&per_page=30&refresh=0&1705055056432 (192.168.40.90)
    HTTPServerRequest(protocol='http', host='192.168.30.168:8889', method='GET', uri='/lab/api/extensions?query&page=1&per_page=30&refresh=0&1705055056432', version='HTTP/1.1', remote_ip='192.168.40.90')
    Traceback (most recent call last):
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\web.py", line 1786, in _execute
        result = await result
                 ^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\handlers\extension_manager_handler.py", line 37, in get
        extensions, last_page = await self.manager.list_extensions(query, page, per_page)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\manager.py", line 368, in list_extensions
        await self.refresh(query, page, per_page)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\manager.py", line 402, in refresh
        await self._update_extensions_list(query, page, per_page)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\manager.py", line 575, in _update_extensions_list
        extensions, last_page = await self.list_packages(query, page, per_page)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\pypi.py", line 201, in list_packages
        matches = await self.__get_all_extensions()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\pypi.py", line 255, in __get_all_extensions
        self.__all_packages_cache = await self.__throttleRequest(
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\pypi.py", line 156, in __throttleRequest
        data = await current_loop.run_in_executor(None, fn, *args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\concurrent\futures\thread.py", line 58, in run
        result = self.fn(*self.args, **self.kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1122, in __call__
        return self.__send(self.__name, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1461, in __request
        response = self.__transport.request(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1166, in request
        return self.single_request(host, handler, request_body, verbose)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1178, in single_request
        http_conn = self.send_request(host, handler, request_body, verbose)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1291, in send_request
        self.send_content(connection, request_body)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1321, in send_content
        connection.endheaders(request_body)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\http\client.py", line 1322, in endheaders
        self._send_output(message_body, encode_chunked=encode_chunked)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\http\client.py", line 1081, in _send_output
        self.send(msg)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\http\client.py", line 1025, in send
        self.connect()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\http\client.py", line 1468, in connect
        self.sock = self._context.wrap_socket(self.sock,
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 455, in wrap_socket
        return self.sslsocket_class._create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1046, in _create
        self.do_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
[W 2024-01-12 18:24:13.771 ServerApp] wrote error: 'Unhandled error'
    Traceback (most recent call last):
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\web.py", line 1786, in _execute
        result = await result
                 ^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\handlers\extension_manager_handler.py", line 37, in get
        extensions, last_page = await self.manager.list_extensions(query, page, per_page)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\manager.py", line 368, in list_extensions
        await self.refresh(query, page, per_page)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\manager.py", line 402, in refresh
        await self._update_extensions_list(query, page, per_page)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\manager.py", line 575, in _update_extensions_list
        extensions, last_page = await self.list_packages(query, page, per_page)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\pypi.py", line 201, in list_packages
        matches = await self.__get_all_extensions()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\pypi.py", line 255, in __get_all_extensions
        self.__all_packages_cache = await self.__throttleRequest(
                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\jupyterlab\extensions\pypi.py", line 156, in __throttleRequest
        data = await current_loop.run_in_executor(None, fn, *args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\concurrent\futures\thread.py", line 58, in run
        result = self.fn(*self.args, **self.kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1122, in __call__
        return self.__send(self.__name, args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1461, in __request
        response = self.__transport.request(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1166, in request
        return self.single_request(host, handler, request_body, verbose)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1178, in single_request
        http_conn = self.send_request(host, handler, request_body, verbose)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1291, in send_request
        self.send_content(connection, request_body)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\xmlrpc\client.py", line 1321, in send_content
        connection.endheaders(request_body)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\http\client.py", line 1322, in endheaders
        self._send_output(message_body, encode_chunked=encode_chunked)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\http\client.py", line 1081, in _send_output
        self.send(msg)
      File "D:\ProgramData\miniconda3\envs\prod\Lib\http\client.py", line 1025, in send
        self.connect()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\http\client.py", line 1468, in connect
        self.sock = self._context.wrap_socket(self.sock,
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 455, in wrap_socket
        return self.sslsocket_class._create(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1046, in _create
        self.do_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
[E 2024-01-12 18:24:13.787 ServerApp] {
      "Host": "192.168.30.168:8889",
      "Accept": "*/*",
      "Referer": "http://192.168.30.168:8889/lab",
      "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
    }
[E 2024-01-12 18:24:13.787 ServerApp] 500 GET /lab/api/extensions?query&page=1&per_page=30&refresh=0&1705055056432 (c8f2dddab0e6491cba0d7180fad534d9@192.168.40.90) 343.69ms referer=http://192.168.30.168:8889/lab
[E 2024-01-12 18:24:15.054 ServerApp] Uncaught exception, closing connection.
    Traceback (most recent call last):
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
        self._handle_read()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
        self._do_ssl_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
        self.socket.do_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
Exception in callback None()
handle: 
Traceback (most recent call last):
  File "D:\ProgramData\miniconda3\envs\prod\Lib\asyncio\events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\platform\asyncio.py", line 192, in _handle_events
    handler_func(fileobj, events)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
    self._handle_read()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
    self._do_ssl_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
    self.socket.do_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
[E 2024-01-12 18:24:15.351 ServerApp] Uncaught exception, closing connection.
    Traceback (most recent call last):
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
        self._handle_read()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
        self._do_ssl_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
        self.socket.do_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
Exception in callback None()
handle: 
Traceback (most recent call last):
  File "D:\ProgramData\miniconda3\envs\prod\Lib\asyncio\events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\platform\asyncio.py", line 192, in _handle_events
    handler_func(fileobj, events)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
    self._handle_read()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
    self._do_ssl_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
    self.socket.do_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
[E 2024-01-12 18:24:15.772 ServerApp] Uncaught exception, closing connection.
    Traceback (most recent call last):
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
        self._handle_read()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
        self._do_ssl_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
        self.socket.do_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
Exception in callback None()
handle: 
Traceback (most recent call last):
  File "D:\ProgramData\miniconda3\envs\prod\Lib\asyncio\events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\platform\asyncio.py", line 192, in _handle_events
    handler_func(fileobj, events)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
    self._handle_read()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
    self._do_ssl_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
    self.socket.do_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
[E 2024-01-12 18:24:16.069 ServerApp] Uncaught exception, closing connection.
    Traceback (most recent call last):
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
        self._handle_read()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
        self._do_ssl_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
        self.socket.do_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
Exception in callback None()
handle: 
Traceback (most recent call last):
  File "D:\ProgramData\miniconda3\envs\prod\Lib\asyncio\events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\platform\asyncio.py", line 192, in _handle_events
    handler_func(fileobj, events)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
    self._handle_read()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
    self._do_ssl_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
    self.socket.do_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
[E 2024-01-12 18:24:16.366 ServerApp] Uncaught exception, closing connection.
    Traceback (most recent call last):
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
        self._handle_read()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
        self._do_ssl_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
        self.socket.do_handshake()
      File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
        self._sslobj.do_handshake()
    ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)
Exception in callback None()
handle: 
Traceback (most recent call last):
  File "D:\ProgramData\miniconda3\envs\prod\Lib\asyncio\events.py", line 84, in _run
    self._context.run(self._callback, *self._args)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\platform\asyncio.py", line 192, in _handle_events
    handler_func(fileobj, events)
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 691, in _handle_events
    self._handle_read()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1454, in _handle_read
    self._do_ssl_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\site-packages\tornado\iostream.py", line 1367, in _do_ssl_handshake
    self.socket.do_handshake()
  File "D:\ProgramData\miniconda3\envs\prod\Lib\ssl.py", line 1321, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000)

@krassowski
Copy link
Member

Can you open a Python console for the environment where you start jupyterlab and check the openssl version with: import ssl; ssl.OPENSSL_VERSION and report it here?

@firezym
Copy link

firezym commented Jan 12, 2024

OpenSSL 3.2.0 23 Nov 2023

Can you open a Python console for the environment where you start jupyterlab and check the openssl version with: import ssl; ssl.OPENSSL_VERSION and report it here?

@krassowski
Copy link
Member

Hmm, it seems like there might be an issue with tornado compatibility with OpenSSL 3.2.0. Someone just opened a bug report on the tests failing for it upstream yesterday:

@firezym
Copy link

firezym commented Jan 17, 2024

@krassowski To add up: I encountered similar ssl certificate error when I am dealing with fetch transcript from youtube:

from pytube import YouTube
yt = YouTube('https://www.youtube.com/watch?v=QytLiiCJOcI&ab_channel=DoubleLineCapital')
video_info = {
        "title": yt.title,
        "description": yt.description,
        "view_count": yt.views,
        "thumbnail_url": yt.thumbnail_url,
        "publish_date": yt.publish_date.isoformat() if yt.publish_date else "Unknown",
        "length": yt.length,
        "author": yt.author
}
print(video_info)

It failed with URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)>

But when I added these 2 lines before the previous code, this error will not happen:

import ssl
ssl._create_default_https_context = ssl._create_stdlib_context

Is there a possibility of such SSL context issue happening here in jupyterlab on windows system?

@krassowski
Copy link
Member

Not sure. Could you possibly check if applying the patch from tornadoweb/tornado#3357 solves it for you?

@JasonWeill
Copy link
Contributor

@firezym @caleb-at-pieces Have you tried using the patch that @krassowski mentioned above? Thanks!

@firezym
Copy link

firezym commented Jan 24, 2024

@JasonWeill which version of jupyterlab should I test?

@JasonWeill
Copy link
Contributor

@firezym This is used for Lab 4.0.x and Lab 4.1, which is currently in beta. The patch affects the server code that works with both of these Lab versions.

@JasonWeill JasonWeill added status:Blocked and removed status:Needs Info status:Needs Triage Applied to new issues that need triage labels Jan 30, 2024
@JasonWeill
Copy link
Contributor

Blocked on tornadoweb/tornado#3355.

@krassowski
Copy link
Member

Tornado patch was just merged, awaiting release.

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

No branches or pull requests

4 participants