flopp999 / SkodaConnect-Domoticz

2 stars 0 forks source link

Plugin unable to login to skodaconect api #4

Closed dobber81 closed 2 years ago

dobber81 commented 2 years ago

Skoda has new updated password login form. About 4 days ago the plugin stopped working. No changes to username or password has been made on my side. The credentials still work when used on skodaconnect website. Got the info on this update from another git repo: https://github.com/lendy007/skodaconnect/commit/95eab8177884ae50e47262c632a31dc68ec268e0

2022-02-01 10:02:24.134 Skoda: Traceback (most recent call last): 2022-02-01 10:02:24.134 File "/usr/local/lib/python3.7/dist-packages/skodaconnect/connection.py", line 357, in _signin_service 2022-02-01 10:02:24.134 for t in responseSoup.find('form', id='credentialsForm').find_all('input', type='hidden'): 2022-02-01 10:02:24.134 AttributeError: 'NoneType' object has no attribute 'find_all' 2022-02-01 10:02:24.134 2022-02-01 10:02:24.134 During handling of the above exception, another exception occurred: 2022-02-01 10:02:24.134 2022-02-01 10:02:24.134 Traceback (most recent call last): 2022-02-01 10:02:24.134 File "/home/pi/domoticz/plugins/SkodaConnect-Domoticz/plugin.py", line 69, in main 2022-02-01 10:02:24.134 await connection.doLogin() 2022-02-01 10:02:24.134 File "/usr/local/lib/python3.7/dist-packages/skodaconnect/connection.py", line 136, in doLogin 2022-02-01 10:02:24.134 return await self._authorize('skoda') 2022-02-01 10:02:24.134 File "/usr/local/lib/python3.7/dist-packages/skodaconnect/connection.py", line 207, in _authorize 2022-02-01 10:02:24.134 location = await self._signin_service(req, authissuer, authorizationEndpoint) 2022-02-01 10:02:24.134 File "/usr/local/lib/python3.7/dist-packages/skodaconnect/connection.py", line 366, in _signin_service 2022-02-01 10:02:24.134 raise SkodaAuthenticationException("Invalid username") 2022-02-01 10:02:24.134 skodaconnect.exceptions.SkodaAuthenticationException: Invalid username 2022-02-01 10:02:24.134 2022-02-01 10:02:24.134 Skoda: <class 'skodaconnect.exceptions.SkodaAuthenticationException'> 2022-02-01 10:02:24.134 Skoda: Something went wrong when access Skoda API

flopp999 commented 2 years ago

Hi thanks for letting me know. I will take a lock at this as soon as I got time.

flopp999 commented 2 years ago

Can this be some error with Skoda server? Are you still getting error?

dobber81 commented 2 years ago

Still same error. No changes from my side at all. The error occured at the same time as the people in the link I referred to.

2022-03-02 15:52:28.557 Status: Skoda: Initialized version 0.28, author 'flopp999' 2022-03-02 15:52:36.350 Skoda: Traceback (most recent call last): 2022-03-02 15:52:36.350 File "/usr/local/lib/python3.7/dist-packages/skodaconnect/connection.py", line 357, in _signin_service 2022-03-02 15:52:36.350 for t in responseSoup.find('form', id='credentialsForm').find_all('input', type='hidden'): 2022-03-02 15:52:36.350 AttributeError: 'NoneType' object has no attribute 'find_all' 2022-03-02 15:52:36.350 2022-03-02 15:52:36.350 During handling of the above exception, another exception occurred: 2022-03-02 15:52:36.350 2022-03-02 15:52:36.350 Traceback (most recent call last): 2022-03-02 15:52:36.350 File "/home/pi/domoticz/plugins/SkodaConnect-Domoticz/plugin.py", line 69, in main 2022-03-02 15:52:36.350 await connection.doLogin() 2022-03-02 15:52:36.350 File "/usr/local/lib/python3.7/dist-packages/skodaconnect/connection.py", line 136, in doLogin 2022-03-02 15:52:36.350 return await self._authorize('skoda') 2022-03-02 15:52:36.350 File "/usr/local/lib/python3.7/dist-packages/skodaconnect/connection.py", line 207, in _authorize 2022-03-02 15:52:36.350 location = await self._signin_service(req, authissuer, authorizationEndpoint) 2022-03-02 15:52:36.350 File "/usr/local/lib/python3.7/dist-packages/skodaconnect/connection.py", line 366, in _signin_service 2022-03-02 15:52:36.350 raise SkodaAuthenticationException("Invalid username") 2022-03-02 15:52:36.350 skodaconnect.exceptions.SkodaAuthenticationException: Invalid username 2022-03-02 15:52:36.350 2022-03-02 15:52:36.350 Skoda: <class 'skodaconnect.exceptions.SkodaAuthenticationException'> 2022-03-02 15:52:36.350 Skoda: Something went wrong when access Skoda API

flopp999 commented 2 years ago

What version of SkodaConnect do you have?

dobber81 commented 2 years ago

SkodaConnect-Domoticz 0.28 skodaconnect 1.1.10, the one in requirements.txt.

flopp999 commented 2 years ago

Can you update SkodaConnect to 1.1.19 and see if you get rid of the errors. I just tried 0.28 and 1.1.19 and it works

dobber81 commented 2 years ago

That was it! A bit annoying that the git I referred to was actualy the library that I had to update to get it working again :) Please change the requirements.txt to the correct version and all should be good.

flopp999 commented 2 years ago

I don't use the plugin anymore so I have not been working with this plugin for a long time, that's why it is not updated. I have now updated requirements.txt Thanks for testing

flopp999 commented 2 years ago

I have now updated the plugin to 0.29 with updated reqiurements.txt