googleads / googleads-python-lib

The Python client library for Google's Ads APIs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SSL: CERTIFICATE_VERIFY_FAILED error

zisha opened this issue · comments

commented

We've been using the Python google-ads library for a while now from behind our corporate firewall and it was working fine until yesterday.

Last time it worked was yesterday 7/25/22 at 12:30pm EDT then at 1:30pm we started getting the following error:

Exception: HTTPSConnectionPool(host='accounts.google.com', port=443): Max retries exceeded with url: /o/oauth2/token (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1131)'))) at 2022-07-26 17:43:49 HTTPSConnectionPool(host='accounts.google.com', port=443): Max retries exceeded with url: /o/oauth2/token (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1131)')))
Traceback (most recent call last):
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/urllib3/connectionpool.py", line 1040, in validate_conn
conn.connect()
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/urllib3/connection.py", line 414, in connect
self.sock = ssl_wrap_socket(
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/urllib3/util/ssl
.py", line 449, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(
File "/opt/rh/rh-python38/root/usr/local/lib/python3.8/site-packages/urllib3/util/ssl
.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/ssl.py", line 1040, in _create
self.do_handshake()
File "/opt/rh/rh-python38/root/usr/lib64/python3.8/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1131)

Our security people are saying that nothing changed on our end. Was there any change in that time period on Google's end?

Hello. Given that there hasn't been a library release within the timeframe in which you noticed and reported this issue, I don't expect this is a library-related issue. You're probably right that a reasonable avenue to investigate is whether any changes occurred on the side of the API itself, but you should get in touch w/ Ad Manager support to initiate that discussion.