Kia Integration - setup problem

I’ve been using the Kia integration for several months without any problem.

I’ve been away from home for a couple of weeks, during which time the Kia app on my phone was upgraded to the new Kia app from the previous. It was a bit of a pain. I only mention this as that change might be relevant.

Roughly the same time the Kia integration seemed to fail on my HASS. I’ve tried deleting the integration and re-installing it but all it does when I key in the userid/password/pin at setup time is produce an ‘Unexpected Error’ message.

Looking at the log I see the following:

Traceback (most recent call last):
  File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 183, in login
    authorization_code = self._get_authorization_code_with_redirect_url(
        username, password, cookies
    )
  File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1169, in _get_authorization_code_with_redirect_url
    code = parse_qs(parsed_redirect.query).get("code")[0]
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/config/custom_components/kia_uvo/config_flow.py", line 148, in async_step_user
    await validate_input(self.hass, user_input)
  File "/config/custom_components/kia_uvo/config_flow.py", line 92, in validate_input
    token: Token = await hass.async_add_executor_job(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        api.login, user_input[CONF_USERNAME], user_input[CONF_PASSWORD]
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 188, in login
    authorization_code = self._get_authorization_code_with_form(
        username, password, cookies
    )
  File "/usr/local/lib/python3.13/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1232, in _get_authorization_code_with_form
    login_form_action_url = soup.find("form")["action"].replace("&", "&")
                            ~~~~~~~~~~~~~~~~~^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Has anybody had a problem similar to this and found a solution please?

** note: Updated with more information from the log, having log open when doing this allowed me to seem more messages **

Same problem,

known issue track here: Kia EU error - NoneType is not serializable · Issue #1277 · Hyundai-Kia-Connect/kia_uvo · GitHub

Hi Same here, problem started after change to new android app. Not possible to login again

Do you think there’s a solution?

I’ve looked at GitHub (issue 1277) but it’s very technical.
So I’ll resort to using the Mykia Android app…

you have to wait, there is no solution in place for general audience, it is still under discussion between devs.

or else, if you believe that you have the technical skills, go ahead and try it yourself.

Thank you for the responses. I had a look at github. I think I’ll wait a solution. Car on HASS is good, but not essential for me.

** 6/11/25 Update: Finally got time to try the process documented on Github. Worked perfectly, thank you.

Same problem,

Same, same…

Well, at lest I’m not alone with this issue.

Same problem,

Same problem since 2w back.

You have to follow the wiki to get your refresh token running a python script in your computer.

Then you need to put refresh token as your password and try again.

1 Like

Thanks, I followed the guide you mentioned

And then I put the refresh token as password and it worked!

1 Like

YES!! This worked for me too!!
Thank you so, so much!

1 Like

@DennisStraathof , Did you use the windows procedure? Because I’am trying that, but the script keeps waiting on “loging in”. Even after I allready have logged in.

1 Like

@BGau yes just the Windows procedure.

1 Like

Hi together, I use the windows procedure.
After login, I get this message:

:white_check_mark: Login successful! Element found.
An unexpected error occurred: ‘NoneType’ object has no attribute ‘group’
Cleaning up and closing the browser.

Chrome Browser was reset and browser data deleted

thanks for an idea

Please can you clarify what you mean by this? Can you direct me to which process you tried? Because I am having the same issue.

I used this Github item https://github.com/Hyundai-Kia-Connect/hyundai_kia_connect_api/wiki/Kia-Europe-Login-Flow

There are a number of processes documented in it. I followed the Linux graphical process.