user234683 / youtube-local

browser-based client for watching Youtube anonymously and with greater page performance
GNU Affero General Public License v3.0
540 stars 65 forks source link

SSL: CERTIFICATE_VERIFY_FAILED | Windows 11, using run.bat #195

Closed ghost closed 9 months ago

ghost commented 10 months ago
500 Uncaught exception:
Traceback (most recent call last):
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\connectionpool.py", line 468, in _make_request
    self._validate_conn(conn)
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\connectionpool.py", line 1097, in _validate_conn
    conn.connect()
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\connection.py", line 658, in connect
    assert_fingerprint=self.assert_fingerprint,
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\connection.py", line 793, in _ssl_wrap_socket_and_match_hostname
    tls_in_tls=tls_in_tls,
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\util\ssl_.py", line 471, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls, server_hostname)
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\util\ssl_.py", line 515, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\gevent\_ssl3.py", line 120, in wrap_socket
    _session=session)
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\gevent\_ssl3.py", line 312, in __init__
    raise x
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\gevent\_ssl3.py", line 308, in __init__
    self.do_handshake()
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\gevent\_ssl3.py", line 666, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\connectionpool.py", line 803, in urlopen
    **response_kw,
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\connectionpool.py", line 492, in _make_request
    raise new_e
urllib3.exceptions.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\flask\app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\flask\app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\flask\app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\flask\app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "C:\Users\defaultuser\Downloads\youtube-local\youtube\search.py", line 77, in get_search_page
    polymer_json = get_search_json(query, page, autocorrect, sort, filters)
  File "C:\Users\defaultuser\Downloads\youtube-local\youtube\search.py", line 56, in get_search_json
    content = util.fetch_url(url, headers=headers, report_text="Got search results", debug_name='search_results')
  File "C:\Users\defaultuser\Downloads\youtube-local\youtube\util.py", line 304, in fetch_url
    use_tor=use_tor)
  File "C:\Users\defaultuser\Downloads\youtube-local\youtube\util.py", line 272, in fetch_url_response
    decode_content=False, retries=retries)
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\_request_methods.py", line 115, in request
    **urlopen_kw,
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\_request_methods.py", line 143, in request_encode_url
    return self.urlopen(method, url, **extra_kw)
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\poolmanager.py", line 443, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\connectionpool.py", line 890, in urlopen
    **response_kw,
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\connectionpool.py", line 890, in urlopen
    **response_kw,
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\connectionpool.py", line 890, in urlopen
    **response_kw,
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\connectionpool.py", line 846, in urlopen
    method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "C:\Users\defaultuser\Downloads\youtube-local\python\lib\site-packages\urllib3\util\retry.py", line 515, in increment
    raise MaxRetryError(_pool, url, reason) from reason  # type: ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='www.youtube.com', port=443): Max retries exceeded with url: /results?search_query=test&pbj=1&sp=CAASBggAEAAYAEICCABIAOoDAA%3D%3D (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1091)')))

Any ideas?

user234683 commented 10 months ago

Are you on a corporate network or do you have any custom certificates? Was the software ever working before (older version, older windows version) or is this your first time trying to run it?

ghost commented 9 months ago

No, and yes; worked before, but older versions do not work anymore also.

retested and the problem seems to have fixed itself.