skodaconnect / homeassistant-skodaconnect

Skoda Connect - A home assistant plugin to add integration with your car
Apache License 2.0
232 stars 28 forks source link

Login fails #107

Closed MarcoGos closed 2 years ago

MarcoGos commented 2 years ago

Describe the bug After reboot of HA, the Skoda Connect integration fails to connect. The error in the log is: ERROR (MainThread) [skodaconnect.connection] Login failed for , Cannot connect to host identity.vwgroup.iologin:443 ssl:default [Name does not resolve] I'm not sure if this has anything to do with me changing internet provider yesterday (other gateway ip address). Removing the integration and re-installing it also fails.

Latest working release 1.0.66

Debug logs 2022-02-11 12:20:09 INFO (MainThread) [skodaconnect.connection] Init Skoda Connect library, version 1.1.18 2022-02-11 12:20:09 DEBUG (MainThread) [skodaconnect.connection] Using service https://msg.volkswagen.de 2022-02-11 12:20:09 INFO (MainThread) [skodaconnect.connection] Initiating new login 2022-02-11 12:20:09 DEBUG (MainThread) [skodaconnect.connection] Starting authorization process for client skoda 2022-02-11 12:20:09 DEBUG (MainThread) [skodaconnect.connection] Got redirect to signin-service 2022-02-11 12:20:09 DEBUG (MainThread) [skodaconnect.connection] Start authorization for user 2022-02-11 12:20:10 DEBUG (MainThread) [skodaconnect.connection] Found dynamic credentials form, extracting attributes 2022-02-11 12:20:10 DEBUG (MainThread) [skodaconnect.connection] JSON: {'clientLegalEntityModel': {'clientId': 'f9a2359a-b776-46d9-bd0c-db1904343117@apps_vw-dilab_com', 'clientAppName': 'ŠKODA App & Portal', 'clientAppDisplayName': 'ŠKODA App & Portal', 'legalEntityInfo': {'name': 'ŠKODA', 'shortName': 'SKODA', 'productName': 'ŠKODA ID', 'theme': 'skoda', 'defaultLanguage': 'cs', 'termAndConditionsType': 'DEFAULT', 'legalProperties': {'revokeDataContact': 'DPOffice@skoda-auto.cz', 'imprintText': 'IMPRINT', 'countryOfJurisdiction': 'CZ'}}, 'imprintTextKey': 'imprint.link.text'}, 'template': 'loginAuthenticate', 'hmac': '151037f7a089f01e01309b4f3ed0d3403a68fc1bd8d65067ee984468a2872a0c', 'useClientRendering': True, 'emailPasswordForm': {'email': '', 'password': None}, 'error': None, 'relayState': 'bf78aef0c73a9d482475abad630ec03be00f6be7', 'nextButtonDisabled': False, 'enableNextButtonAfterSeconds': 0, 'postAction': 'login/authenticate', 'identifierUrl': 'login/identifier'} 2022-02-11 12:20:10 DEBUG (MainThread) [skodaconnect.connection] Finalizing login 2022-02-11 12:20:10 ERROR (MainThread) [skodaconnect.connection] Login failed for , Cannot connect to host identity.vwgroup.iologin:443 ssl:default [Name does not resolve]

TomAafloen commented 2 years ago

I just logged in to GitHub to report the exact same issue, but you beat me to it :-)

I think it may be a missing slash here (io is a top domain name, iologin is not):

Cannot connect to host identity.vwgroup.iologin:443 ssl:default [Name does not resolve]

Farfar commented 2 years ago

I'm working on this already. Will try to make a more robust login since it seems VW Group makes minor changes frequently now.

TomAafloen commented 2 years ago

Great to hear. I really appreciate this plugin!

dominikamann commented 2 years ago

I have the same issue. Thanks for your effort!

Farfar commented 2 years ago

Please test latest release, should work! Be aware though, I see that certificate for Skoda Connect API has expired and if you still have issues, verify if that's the root cause. I don't know how fast Skoda will resolve certificate problem but hopefully fast.

dominikamann commented 2 years ago

Fixed! Thank you!

sca075 commented 2 years ago

Wonderful job thanks really much for the super fast reaction on this!

Farfar commented 2 years ago

I caught it early since I've been debugging and working on another issue so the resolution was near at hand :) Hopefully there won't be any more changes for a while since I don't think the current login handling is entirely robust.

MarcoGos commented 2 years ago

Thank you @Farfar for your quick solution.

TomAafloen commented 2 years ago

Thanks for fixing it so quick!