pe-st / garmin-connect-export

Download a copy of your Garmin Connect data, including stats and GPX tracks.
MIT License
364 stars 75 forks source link

SSL Certificate verify fails #41

Closed VeloSteve closed 4 years ago

VeloSteve commented 4 years ago

Apologies if this is just a short-term glitch on Garmin's side, but in case there is something that needs fixing, here's my report.

I use the exporter almost daily, and it has never failed in over two months. Today it seems to have a problem with SSL verification. Things I tried:

A clip from the console window is below:

[ERROR] Failed to reach url https://sso.garmin.com/sso/signin?webhost=https%3A%2 F%2Fconnect.garmin.com&locale=en_US&rememberMeShown=true&generateNoServiceTicket =false&id=gauth-widget&service=https%3A%2F%2Fconnect.garmin.com%2Fmodern%2F&conn ectLegalTerms=true&redirectAfterAccountCreationUrl=https%3A%2F%2Fconnect.garmin. com%2Fmodern%2F&displayNameShown=false&redirectAfterAccountLoginUrl=https%3A%2F% 2Fconnect.garmin.com%2Fmodern%2F&source=https%3A%2F%2Fconnect.garmin.com%2Fen-US %2Fsignin&rememberMeChecked=false&generateExtraServiceTicket=true&openCreateAcco unt=false&showPassword=true&createAccountShown=true&embedWidget=false&initialFoc us=true&gauthHost=https%3A%2F%2Fsso.garmin.com%2Fsso&globalOptInChecked=false&cs sUrl=https%3A%2F%2Fstatic.garmincdn.com%2Fcom.garmin.connect%2Fui%2Fcss%2Fgauth- custom-v1.2-min.css&locationPromptShown=true&globalOptInShown=true&mobile=false& clientId=GarminConnect&generateTwoExtraServiceTickets=false&consumeServiceTicket =false, error: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verif y failed (_ssl.c:590)> Traceback (most recent call last): File "D:\GitHub\garmin-connect-export\gcexport.py", line 1057, in main(sys.argv) File "D:\GitHub\garmin-connect-export\gcexport.py", line 859, in main login_to_garmin_connect(args) File "D:\GitHub\garmin-connect-export\gcexport.py", line 494, in login_to_garm in_connect connect_response = http_req_as_string(URL_GC_LOGIN) File "D:\GitHub\garmin-connect-export\gcexport.py", line 273, in http_req_as_s tring return http_req(url, post, headers) File "D:\GitHub\garmin-connect-export\gcexport.py", line 247, in http_req response = OPENER.open(request, data=post) File "C:\Python27\lib\urllib2.py", line 431, in open response = self._open(req, data) File "C:\Python27\lib\urllib2.py", line 449, in _open '_open', req) File "C:\Python27\lib\urllib2.py", line 409, in _call_chain result = func(*args) File "C:\Python27\lib\urllib2.py", line 1240, in https_open context=self._context) File "C:\Python27\lib\urllib2.py", line 1197, in do_open raise URLError(err) urllib2.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate ve rify failed (_ssl.c:590)>

pe-st commented 4 years ago

I just tried on macOS with Python 2.7.17 and Python 3.7.7 and it still works for both versions.

Let's hope it's a glitch for you and it works again now, otherwise you could verify if you're on the latest 2.7.x version? To my knowledge it is 2.7.18.

VeloSteve commented 4 years ago

I was on Python 2.7.11. Updating to 2.7.18 fixed it.

It seems strange that it only failed today, but I can't complain.

Thank you!