daernsinstantfortress / cupra_we_connect

Cupra integration for Home Assistant
Apache License 2.0
49 stars 5 forks source link

Unexpected error when attempting to log in on v0.8.2 #62

Closed martenjacobs closed 1 month ago

martenjacobs commented 2 months ago

I'm getting an unexpected error when attempting to log in:

image

I've seen suggestions to install 0.8.2 on similar questions, but I'm already there:

image

Here's the relevant log:

Logger: custom_components.cupra_we_connect.config_flow
Bron: custom_components/cupra_we_connect/config_flow.py:75
integratie: Cupra WeConnect (documentatie, problemen)
Eerst voorgekomen: 22:13:05 (3 gebeurtenissen)
Laatst gelogd: 22:17:21

Unexpected exception during setup
Traceback (most recent call last):
  File "/config/custom_components/cupra_we_connect/config_flow.py", line 75, in async_step_user
    info = await validate_input(self.hass, user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/cupra_we_connect/config_flow.py", line 50, in validate_input
    await hass.async_add_executor_job(we_connect.login)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/weconnect_cupra/weconnect_cupra.py", line 166, in login
    self.__session.login()
  File "/usr/local/lib/python3.12/site-packages/weconnect_cupra/api/cupra/auth/my_cupra_session.py", line 47, in login
    response = self.doWebAuth(authorizationUrl)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/weconnect_cupra/api/cupra/auth/my_cupra_session.py", line 191, in doWebAuth
    raise APICompatibilityError('No user id provided')
weconnect_cupra.errors.APICompatibilityError: No user id provided
aperezva commented 2 months ago

@aperezva perhaps try another browser and also deactivate all ad-blockers

@RockingBurn thanks a lot. You gave me the Solution. I have accepted terms with another browser and after that integration is working

thanks again

madmic1314 commented 2 months ago

I can confirm going to the cupra website and accepting the T&Cs fixed this. Odd as the app was working on my phone today. You'll need to use a PC to do this and not a mobile device. Once accepted then either reboot HA or reload the integration.

AlexZ1402 commented 2 months ago

where can I find the terms and conditions to accept?

madmic1314 commented 2 months ago

where can I find the terms and conditions to accept?

When I went to the website https://cupraid.vwgroup.io/account on my laptop and logged in this was presented to me upfront. If you don't see it login and go to your profile section and see if it's accepted there under Privacy.

RockingBurn commented 2 months ago

@aperezva perhaps try another browser and also deactivate all ad-blockers

@RockingBurn thanks a lot. You gave me the Solution. I have accepted terms with another browser and after that integration is working

thanks again

No Problem! Cool it worked. Perhaps for other people too

dersch81 commented 2 months ago

Same here and with @BjoernWaechter hints it is working again! Thanks

amzaldua commented 2 months ago

Nothing is working for me.

IMG_5094

Este error se originó a partir de una integración personalizada.

Registrador: custom_components.cupra_we_connect.config_flow
Fuente: custom_components/cupra_we_connect/config_flow.py:75
integración: Cupra WeConnect (documentación, problemas)
Ocurrió por primera vez: 22:06:28 (2 ocurrencias)
Último inicio de sesión: 22:09:03

Unexpected exception during setup
Traceback (most recent call last):
  File "/config/custom_components/cupra_we_connect/config_flow.py", line 75, in async_step_user
    info = await validate_input(self.hass, user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/cupra_we_connect/config_flow.py", line 50, in validate_input
    await hass.async_add_executor_job(we_connect.login)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/weconnect_cupra/weconnect_cupra.py", line 166, in login
    self.__session.login()
  File "/usr/local/lib/python3.12/site-packages/weconnect_cupra/api/cupra/auth/my_cupra_session.py", line 47, in login
    response = self.doWebAuth(authorizationUrl)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/weconnect_cupra/api/cupra/auth/my_cupra_session.py", line 191, in doWebAuth
    raise APICompatibilityError('No user id provided')
weconnect_cupra.errors.APICompatibilityError: No user id provided
dacorde commented 2 months ago

Just if it helps. I use the other seat_connect integration for my Formentor, and I resolved it by changing the region (I put Germany) with the link in other posts above, then it generated new T&C to be agreed, and it worked in HA after.

amzaldua commented 2 months ago

It’s done. My solution was to log in to the https://cupraid.vwgroup.io/account website directly through the Hassio server using a Firefox integration (https://community.home-assistant.io/t/home-assistant-add-on-firefox/558672)

daernsinstantfortress commented 2 months ago

FYI, mine broke again following a restart this evening. I've had to re-consent a second time - log out of the official app, log back in and click "accept" on everything that pops up. My integration is working once again.

daernsinstantfortress commented 1 month ago

Going to close this as, for now at least, there is a serviceable workaround.

AlexZ1402 commented 1 month ago

Ich werde dies schließen, da es zumindest im Moment eine brauchbare Problemumgehung gibt.

🤣🤣🤣

lordyavin commented 1 month ago

Are you going to implement a notification/information the next time we have to accept the policies? Does someone know which of the many policies are mandatory to accept to have the API working?