Hyundai-Kia-Connect / kia_uvo

A Home Assistant HACS integration that supports Kia Connect(Uvo) and Hyundai Bluelink. The integration supports the EU, Canada and the USA.
MIT License
398 stars 84 forks source link

Unknown Error in HA integration #749

Closed mute2014 closed 8 months ago

mute2014 commented 8 months ago

Hi there

In the Home Assistant integration I am unable to login.

What I did. Checked Credentials, logged in and out in the App and Webbrowser. Everything is OK. I aswell have an account for Genesis, since 6 Months. So I should be on the new Servers.

Error in HA:

Logger: custom_components.kia_uvo.config_flow Source: custom_components/kia_uvo/config_flow.py:63 Integration: Hyundai / Kia Connect (documentation, issues) First occurred: 12:48:27 (3 occurrences) Last logged: 12:53:47

Unexpected exception

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 234, in login
    authorization_code = self._get_authorization_code_with_redirect_url(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1174, in _get_authorization_code_with_redirect_url
    parsed_url = urlparse(response["redirectUrl"])
                          ~~~~~~~~^^^^^^^^^^^^^^^
KeyError: 'redirectUrl'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/config/custom_components/kia_uvo/config_flow.py", line 159, in async_step_user
    await validate_input(self.hass, user_input)
  File "/config/custom_components/kia_uvo/config_flow.py", line 63, in validate_input
    token: Token = await hass.async_add_executor_job(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 239, in login
    authorization_code = self._get_authorization_code_with_form(
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1198, in _get_authorization_code_with_form
    login_form_action_url = soup.find("form")["action"].replace("&", "&")
                            ~~~~~~~~~~~~~~~~~^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable
cdnninja commented 8 months ago

What region? Genesis isn't supported in most.

mute2014 commented 8 months ago

I should be in Europe Region. If thats not supportet, any roadmap.to.do.so?

cdnninja commented 8 months ago

Other threads exist talking about this. It needs someone to work through it with traffic sniffing. Ideally someone who has the car and can code. Currently no one has the skills and car to do this.

mute2014 commented 8 months ago

I cant code but i can pcap on my computer (website) or firewall (app from mobile) and share the data?

cdnninja commented 8 months ago

Lets continue this ins #682