robinostlund / homeassistant-volkswagencarnet

Volkswagen Carnet Component for home assistant
GNU General Public License v3.0
328 stars 60 forks source link

[BUG] User appears unauthorized #483

Closed MrGravgaard closed 9 months ago

MrGravgaard commented 1 year ago

Before you post a new issue - you must first check the following (and check the boxes with an "X" below)

[ x ] 1.) Can you login using the smartphone app We Connect (not We Connect ID or We Connect GO) and interact with your car? [ x ] 2.) Please make sure that you can login into https://vwid.vwgroup.io/ and make sure that any "Terms and Conditions" are all checked [ x ] 3.) I do not have MFA enabled.

Environment

Volkswagencarnet release with the issue: Last working homeassistant-volkswagencarnet release (if known): Home Assistant Core release with the issue: 2023.6.1 Operating environment (Home Assistant OS/Supervised/Container/Core/venv): Home Assistant OS Car model and year:ID.5 Country where the car was bought: DK Valid We Connect subscription: Yes Have you verified that the We Connect service works via VW´s portal?: Yes

Steps to Reproduce

As son as I tries to install te plugin from the UI and I authenticate, it fails.

I have explicit changed the password and tested it in the car and on their website to be sure that I got the right login. But it keep telling me that the login is wrong.

Expected behavior

I expect it to authenticate just like the car accepts the login ingormation and the vw site accepts the login.

Screenshots

Everything is enabled at VW regardin concent and cloud access. image

Traceback/Error logs

Debug information - all JSON responses from logfile

2023-06-09 20:27:43.775 ERROR (MainThread) [volkswagencarnet.vw_connection] Login failed for VW account, User appears unauthorized 2023-06-09 20:27:43.776 ERROR (MainThread) [volkswagencarnet.vw_connection] User appears unauthorized Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_connection.py", line 328, in _login raise e File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_connection.py", line 305, in _login raise Exception("User appears unauthorized") Exception: User appears unauthorized

2023-06-09 20:28:53.662 ERROR (MainThread) [volkswagencarnet.vw_connection] Login failed for VW account, login.errors.password_invalid 2023-06-09 20:28:53.663 ERROR (MainThread) [volkswagencarnet.vw_connection] login.errors.password_invalid Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_connection.py", line 305, in _login raise Exception("User appears unauthorized") Exception: User appears unauthorized During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_connection.py", line 323, in _login raise AuthenticationException(error_msg) volkswagencarnet.vw_exceptions.AuthenticationException: login.errors.password_invalid

Additional context

"component.volkswagencarnet.config.step.select_instruments.data.resources":"Resources to monitor","component.volkswagencarnet.config.step.reauth_confirm.data.description":"Re-authenticate with your We Connect account. Make sure to accept any new EULA in the We Connect portal (https://www.portal.volkswagen-we.com/) before proceeding. ","component.volkswagencarnet.config.step.reauth_confirm.data.email":"Email","component.volkswagencarnet.config.step.reauth_confirm.data.password":"Password","component.volkswagencarnet.config.abort.already_configured":"Car with this VIN is already configured","component.volkswagencarnet.config.abort.reauth_successful":"Re-authentication was successful","component.volkswagencarnet.config.error.cannot_connect":"Could not login to Volkswagen We Connect, please check your credentials and verify that the service is working","component.volkswagencarnet.config.error.cannot_update":"Could not query update from Volkswagen We Connect","component.volkswagencarnet.config.error.unknown":"An unknown error occurred","component.volkswagencarnet.config.progress.task_login":"Logging in to We Connect","component.volkswagencarnet.config.progress.task_update":"Fetching vehicles"}}},{"id":48,"type":"result","success":true,"result":{"resources":{}}}]

This section seems to sendt something wrong: "component.volkswagencarnet.config.step.reauth_confirm.data.email":"Email","component.volkswagencarnet.config.step.reauth_confirm.data.password":"Password". Those are ofcourse not my authentication.

Debug information: volkswagencarnet.txt

jdbrookes commented 1 year ago

Seeing the same this morning after updating Home Assistant to 2023.6.1 - however I suspect a VW service issue.

shift-del1 commented 1 year ago

Same here no change in my cobfiguration since weeks, no restart, so must be a service issue. Unacceptable, that you pay for a service and the quality is so poor...

MrGravgaard commented 1 year ago

It is weird. I got my ID.5 yesterday. I have been able to register users, load them in the car, install apps on the phones and what not.

Nothing has failed. Only this.

unverbraucht commented 1 year ago

I'm not sure it's a server problem, I've been seeing this issue for a few days now. The we connect app has started working again, so the backend seems to be up.

MrGravgaard commented 1 year ago

I stil have the problem. It persists only on HA. Any other platform/app and my car works fine with my credentials. I have also tried my wife's credentials. Same issue and only in HA.

brechtvhb commented 1 year ago

Having the same problem, also on HA 2023.06.1

brechtvhb commented 1 year ago

Nevermind. Fixed in my case by logging on at https://www.portal.volkswagen-we.com/ and consenting to spam me with nothing.

MrGravgaard commented 1 year ago

It still doesn't work for me. I have consented to everything and all other apps work along with auth to the car.

brechtvhb commented 1 year ago

Nevermind. Fixed in my case by logging on at https://www.portal.volkswagen-we.com/ and consenting to spam me with nothing.

Which consent is that? The cookie banner right in the beginning? Or is there any other option to consent that is they key point to solving this problem?

Thankful for any hint!

When I logged in to the website it asked me if they could spam me by e-mail/phone and 2 other things.

totoberg123 commented 1 year ago

My integration stopped working this morning. Couldn't find what was wrong since the WeConnect-app on Android worked fine.

Signing in on https://www.portal.volkswagen-we.com/ and consenting with marketing emails fixed the issue for me!

I only signed in, the consent page showed up right after that. There was no need to navigate or search for it.

shosaco commented 1 year ago

Doesn't work and I don't know why. Accepted all cookie banners, marketing mails, logged out and in of mobile app, tried private mode.

MrGravgaard commented 1 year ago

It still doesn't work. After my upgrade to the latest HA I get a new error in the error log:

Home Assistant 2023.7.0 Supervisor 2023.07.1 Userinterface 20230705.0 - latest

Logger: volkswagencarnet.vw_connection Source: /usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_connection.py:367 First occurred: 14.07.26 (1 occurrences) Last logged: 14.07.26

'NoneType' object is not subscriptable Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_connection.py", line 280, in _login raise e File "/usr/local/lib/python3.11/site-packages/volkswagencarnet/vw_connection.py", line 269, in _login post_action = re.search('"postAction":\s"([^"\'])"', d.string)[1]


TypeError: 'NoneType' object is not subscriptable
gwilford commented 1 year ago

I'm seeing the same log erros as reported above "user appears unauthorised" and the EULA suggestion today.

I've had an issue with the integration before which was EULA-related and fixed by logging in as advised. I also had an issue a few weeks back that appeared to be VW back-end related as app and web were also affected but this time around, VW web and app are fine, logging in and out is fine and doesn't ask for EULA acceptance.

The only thing that appears to not be working is the HA integration. I tried restarting the integration a few times and reconfiguring (user/pass) and restarting HA from scratch to no avail. 2023.7.1 and latest version of WeConnect via HACS.

davull commented 1 year ago

Had the same issue. I could resolve it by logging out of the "we connect" app and log in again, accept the consent screen. Then restart the HA integration and it works.

brechtvhb commented 1 year ago

I'm screwed again. After updating HA, this integration is no longer working. Things that previously worked for me are no longer helping (logging in, accepting TOS, etc).

gwilford commented 1 year ago

Had the same issue. I could resolve it by logging out of the "we connect" app and log in again, accept the consent screen. Then restart the HA integration and it works.

Thank you. Worked for me. Looks like the mobile app and web have independent EULA acceptance/consent workflows

MrGravgaard commented 1 year ago

What is the “we Connect” app to you? My "We Connect" app is renamed and I have now a Volkswagen app and a MinVolkswagen (MyVolksvagen).

I Think the Volkswagen app is the ID Connect app and the MinVolkswagen(MyVolkswagen) app is the we Connect app ...

gwilford commented 1 year ago

What is the “we Connect” app to you? My "We Connect" app is renamed and I have now a Volkswagen app and a MinVolkswagen (MyVolksvagen). I Think the Volkswagen app is the ID Connect app and the MinVolkswagen(MyVolkswagen) app is the we Connect app ... Med venlig hilsen / Best Regards Christian Gravgaard Gravgaard & Co A: Transformervej 29, 2860 Søborg T: +45 2829 2997 W: gravgaard.cohttps://www.gravgaard.co/

I'm using Android/Play Store in the UK and the app is called "We Connect". I see there's a "My Volkwagen" app in the store but I don't have it installed.

davull commented 1 year ago

On iOS the app is called "Volkswagen We Connect": https://apps.apple.com/de/app/volkswagen-we-connect/id656549103?l=en-GB

MrGravgaard commented 1 year ago

Okay. As soon as I login to this app I am redirected to the Volkswagen app. I got a new concent before the redirect though.

It is a bit confusing. Now I have 3 apps:

It didn't help with the logout/login workaround though. But I'll try it again.

brechtvhb commented 1 year ago

After logging out and in in the app several times it suddenly asked me for consent again. After that the integration started working again ... till next time I upgrade HA i guess.

Logging in into the app was also a horrible exprience it took up to 2 minutes just to log in.

shosaco commented 11 months ago

Car model and year:ID.5

Only through this issue did I just find out that this integration is not working for ID cars, but you (and me) should use this integration. After re-reading the introductory text of this integration here, it clearly states the same:

For the new electric vehicles such as the ID series this component does not work.

The other mentioned app works fine for me. May this fixed your problem, @MrGravgaard ?

robinostlund commented 9 months ago

Old issue, closing.