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

SSLError #63

Open
ftasbasi opened this issue Jan 17, 2023 · 1 comment
Open

SSLError #63

ftasbasi opened this issue Jan 17, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@ftasbasi
Copy link

ftasbasi commented Jan 17, 2023

Your environment

SDK Version: 1.3.0
Connect Server Version: 1.5.7
OS: macOS Ventura
Python Version: 3.9

What happened?

I was doing some update operations through my connect server but after a while my script started failing, when i try to debug my script i recognized that there is a SSLError

Here is my test script:
from onepasswordconnectsdk.client import ( Client, new_client_from_environment, new_client ) client_from_token: Client = new_client( "connect server url", "my connnect server bearer token") client_from_token.get_vaults()

What did you expect to happen?

I expect to list all vaults.

Steps to reproduce

  1. Run the simple script above on macOS Ventura with a 1password Connect Server

Notes & Logs

`Traceback (most recent call last):
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen
httplib_response = self._make_request(
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 386, in _make_request
self._validate_conn(conn)
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1042, in validate_conn
conn.connect()
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/urllib3/connection.py", line 414, in connect
self.sock = ssl_wrap_socket(
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/urllib3/util/ssl
.py", line 449, in ssl_wrap_socket
ssl_sock = ssl_wrap_socket_impl(
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/urllib3/util/ssl
.py", line 493, in _ssl_wrap_socket_impl
return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ssl.py", line 500, in wrap_socket
return self.sslsocket_class._create(
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ssl.py", line 1040, in _create
self.do_handshake()
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/ssl.py", line 1309, in do_handshake
self._sslobj.do_handshake()
ssl.SSLError: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:1129)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/requests/adapters.py", line 489, in send
resp = conn.urlopen(
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/urllib3/connectionpool.py", line 787, in urlopen
retries = retries.increment(
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='xxx.xxx.xxx', port=443): Max retries exceeded with url: /v1/vaults (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:1129)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/Users/furkan/PycharmProjects/testProject_1password/main.py", line 14, in
client_from_token.get_vaults()
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/onepasswordconnectsdk/client.py", line 363, in get_vaults
response = self.build_request("GET", url)
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/onepasswordconnectsdk/client.py", line 391, in build_request
response = self.session.request(method, url)
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/requests/sessions.py", line 587, in request
resp = self.send(prep, **send_kwargs)
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/requests/sessions.py", line 701, in send
r = adapter.send(request, **kwargs)
File "/Users/furkan/PycharmProjects/testProject_1password/env/lib/python3.9/site-packages/requests/adapters.py", line 563, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='xxx.xxx.xxx', port=443): Max retries exceeded with url: /v1/vaults (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:1129)')))`

@ftasbasi ftasbasi added the bug Something isn't working label Jan 17, 2023
@volodymyrZotov
Copy link
Contributor

Hi @ftasbasi👋. Thank you for reporting this!
We are going to investigate the logs you provided and come back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants