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: TLSV1_ALERT_PROTOCOL_VERSION #16

Open
pe-st opened this issue Oct 13, 2018 · 1 comment
Open

SSL: TLSV1_ALERT_PROTOCOL_VERSION #16

pe-st opened this issue Oct 13, 2018 · 1 comment

Comments

@pe-st
Copy link
Owner

pe-st commented Oct 13, 2018

Two or three weeks ago the login still worked, but today the request to

https://connect.garmin.com/modern/activities?ticket=XXXX

fails with

[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)

Complete traceback:

Authenticating...Traceback (most recent call last):
  File "./gcexport.py", line 890, in <module>
    main(sys.argv)
  File "./gcexport.py", line 708, in main
    login_to_garmin_connect(args)
  File "./gcexport.py", line 436, in login_to_garmin_connect
    http_req(URL_GC_POST_AUTH + 'ticket=' + login_ticket)
  File "./gcexport.py", line 180, in http_req
    response = OPENER.open(request, data=post)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 431, in open
    response = self._open(req, data)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 449, in _open
    '_open', req)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1240, in https_open
    context=self._context)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib2.py", line 1197, in do_open
    raise URLError(err)
urllib2.URLError: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)>
pe-st added a commit that referenced this issue Oct 15, 2018
@pe-st
Copy link
Owner Author

pe-st commented Oct 15, 2018

The problem goes away if I'm using the most recent Python 2.7.15 (installed with Homebrew) instead of the stock Python 2.7.10 of macOS Sierra or High Sierra (macOS Mojave should be fine).

Also make sure you don't start the script with ./gcexport.py, as this uses /usr/bin/python as specified on the script's first line (/usr/bin/python is the stock python). Use python gcexport.py instead.

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

No branches or pull requests

1 participant