-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Comments
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 |
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:
|
Yes I am able to access it fine. Running jupyterlab with a mirrored pypi is also resulting in the same outcome. |
I get the same annoying issue in the backend and frontend under 4.0.10 on windows environment. |
I found pypa/pip#10939 on a web search; are you able to run |
Yes, I am able to |
I have 3 kinds of errors depending on how 1. default config with enable status checked & disclaimed satus uncheckedConsole 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 uncheckedConsole 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) |
Can you open a Python console for the environment where you start jupyterlab and check the openssl version with: |
|
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: |
@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 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? |
Not sure. Could you possibly check if applying the patch from tornadoweb/tornado#3357 solves it for you? |
@firezym @caleb-at-pieces Have you tried using the patch that @krassowski mentioned above? Thanks! |
@JasonWeill which version of jupyterlab should I test? |
@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. |
Blocked on tornadoweb/tornado#3355. |
Tornado patch was just merged, awaiting release. |
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
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
Troubleshoot Output
Command Line Output
Browser Output
screenshot of the error shown in the extension manager:
The text was updated successfully, but these errors were encountered: