Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yesterday: OK, Today: Error and then "unexpected error" and in log "unexpected exception when adding integration" when re-adding integration #661

Closed
MYG63 opened this issue Jun 29, 2023 · 23 comments

Comments

@MYG63
Copy link

MYG63 commented Jun 29, 2023

Please check Services, Known Bug / Issues and Troubleshooting over here first: https://github.com/fuatakgun/kia_uvo/blob/master/README.md
Region and Brand of car
EU, Kia, Soul EV, MY 2020
Version of the integration
2.10.2

Describe the bug
A clear and concise description of what the bug is.

Yesterday the integration worked. Today the integration stopped working and car-device was unavailable. Then I tried to re-add the integration in HA. This is not possible.

Debug logs if an error occurred

2023-06-29 09:36:44.964 DEBUG (SyncWorker_10) [hyundai_kia_connect_api.KiaUvoApiEU] hyundai_kia_connect_api - get_stamp 2023-06-29 05:02:58.607000+00:00 120000 76 998 76.88631513333333
2023-06-29 09:37:00.123 ERROR (MainThread) [custom_components.kia_uvo.config_flow] Unexpected exception
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 198, in login
device_id = self._get_device_id(stamp)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1104, in _get_device_id
_check_response_for_errors(response)
File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 108, in _check_response_for_errors
raise error_code_mappingresponse["resCode"]
hyundai_kia_connect_api.exceptions.RequestTimeoutError: Undefined Error - notNull Violation: devices.device_id cannot be null

To Reproduce
YES, just go to "add integration" and enter the credentials. These error again occurs.

Expected behavior
Just install integration

@2xdehelft
Copy link

Same problem here...

@Matze-aaa
Copy link

Matze-aaa commented Jun 29, 2023

Same problem, thanks for opening an issue and the description
Kia connect server via kia app is working.

@arjanhs
Copy link

arjanhs commented Jun 29, 2023

Having the same issue today also

@snieuwen
Copy link

Same here, suddenly stopped working overnight with same error.

@kletsah
Copy link

kletsah commented Jun 29, 2023

Same here, stopped working @ 4 am West-European time zone

@TazUk
Copy link

TazUk commented Jun 29, 2023

With the integration previously configured and working I now see all sensors as unavailable and get the following logged error:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/kia_uvo/coordinator.py:166
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 14:01:01 (1 occurrences)
Last logged: 14:01:01

[140240714115600] Server returned: 'Invalid request body - Invalid parameter.'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 205, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1910, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1950, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/config/custom_components/kia_uvo/services.py", line 49, in async_handle_force_update
    await coordinator.async_force_update_all()
  File "/config/custom_components/kia_uvo/coordinator.py", line 158, in async_force_update_all
    await self.async_check_and_refresh_token()
  File "/config/custom_components/kia_uvo/coordinator.py", line 166, in async_check_and_refresh_token
    await self.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/VehicleManager.py", line 123, in check_and_refresh_token
    self.token: Token = self.api.login(self.username, self.password)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 198, in login
    device_id = self._get_device_id(stamp)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1104, in _get_device_id
    _check_response_for_errors(response)
  File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 110, in _check_response_for_errors
    raise APIError(f"Server returned: '{response['resMsg']}'")
hyundai_kia_connect_api.exceptions.APIError: Server returned: 'Invalid request body - Invalid parameter.'

@mjmeierhoefer
Copy link

The integration stopped working after upgrade to Home Assistant Supervisor 2023.06.4.
This update required a restart for changing configuration structure of homeassistant.

2023-06-29 16:22:14.275 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Hyundai Europe myemailaddress' for kia_uvo integration not ready yet: Config Not Ready: Server returned: 'Invalid request body - Invalid parameter.'; Retrying in background 2023-06-29 16:22:20.036 ERROR (MainThread) [custom_components.kia_uvo.coordinator] Unexpected error fetching kia_uvo data: Server returned: 'Invalid request body - Invalid parameter.' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/kia_uvo/coordinator.py", line 107, in _async_update_data await self.async_check_and_refresh_token() File "/config/custom_components/kia_uvo/coordinator.py", line 166, in async_check_and_refresh_token await self.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/VehicleManager.py", line 120, in check_and_refresh_token self.initialize() File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 64, in initialize self.token: Token = self.api.login(self.username, self.password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 198, in login device_id = self._get_device_id(stamp) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1104, in _get_device_id _check_response_for_errors(response) File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 110, in _check_response_for_errors raise APIError(f"Server returned: '{response['resMsg']}'") hyundai_kia_connect_api.exceptions.APIError: Server returned: 'Invalid request body - Invalid parameter.' 2023-06-29 16:22:30.672 ERROR (MainThread) [custom_components.kia_uvo.coordinator] Unexpected error fetching kia_uvo data: Server returned: 'Invalid request body - Invalid parameter.' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/kia_uvo/coordinator.py", line 107, in _async_update_data await self.async_check_and_refresh_token() File "/config/custom_components/kia_uvo/coordinator.py", line 166, in async_check_and_refresh_token await self.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/VehicleManager.py", line 120, in check_and_refresh_token self.initialize() File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 64, in initialize self.token: Token = self.api.login(self.username, self.password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 198, in login device_id = self._get_device_id(stamp) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1104, in _get_device_id _check_response_for_errors(response) File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 110, in _check_response_for_errors raise APIError(f"Server returned: '{response['resMsg']}'") hyundai_kia_connect_api.exceptions.APIError: Server returned: 'Invalid request body - Invalid parameter.'

@kletsah
Copy link

kletsah commented Jun 29, 2023

The integration stopped working after upgrade to Home Assistant Supervisor 2023.06.4. This update required a restart for changing configuration structure of homeassistant.

2023-06-29 16:22:14.275 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Hyundai Europe myemailaddress' for kia_uvo integration not ready yet: Config Not Ready: Server returned: 'Invalid request body - Invalid parameter.'; Retrying in background 2023-06-29 16:22:20.036 ERROR (MainThread) [custom_components.kia_uvo.coordinator] Unexpected error fetching kia_uvo data: Server returned: 'Invalid request body - Invalid parameter.' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/kia_uvo/coordinator.py", line 107, in _async_update_data await self.async_check_and_refresh_token() File "/config/custom_components/kia_uvo/coordinator.py", line 166, in async_check_and_refresh_token await self.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/VehicleManager.py", line 120, in check_and_refresh_token self.initialize() File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 64, in initialize self.token: Token = self.api.login(self.username, self.password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 198, in login device_id = self._get_device_id(stamp) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1104, in _get_device_id _check_response_for_errors(response) File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 110, in _check_response_for_errors raise APIError(f"Server returned: '{response['resMsg']}'") hyundai_kia_connect_api.exceptions.APIError: Server returned: 'Invalid request body - Invalid parameter.' 2023-06-29 16:22:30.672 ERROR (MainThread) [custom_components.kia_uvo.coordinator] Unexpected error fetching kia_uvo data: Server returned: 'Invalid request body - Invalid parameter.' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 283, in _async_refresh self.data = await self._async_update_data() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/kia_uvo/coordinator.py", line 107, in _async_update_data await self.async_check_and_refresh_token() File "/config/custom_components/kia_uvo/coordinator.py", line 166, in async_check_and_refresh_token await self.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/VehicleManager.py", line 120, in check_and_refresh_token self.initialize() File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/VehicleManager.py", line 64, in initialize self.token: Token = self.api.login(self.username, self.password) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 198, in login device_id = self._get_device_id(stamp) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 1104, in _get_device_id _check_response_for_errors(response) File "/usr/local/lib/python3.11/site-packages/hyundai_kia_connect_api/KiaUvoApiEU.py", line 110, in _check_response_for_errors raise APIError(f"Server returned: '{response['resMsg']}'") hyundai_kia_connect_api.exceptions.APIError: Server returned: 'Invalid request body - Invalid parameter.'

Mine already stopped before I did the upgrade, so that might be the wrong conclusion that it broke after the upgrade.

@TazUk
Copy link

TazUk commented Jun 29, 2023

@kletsah I'm confident this isn't upgrade related as my system was last restarted / upgraded 2 days prior to the failure.

@kletsah
Copy link

kletsah commented Jun 29, 2023

@TazUk Yes, that was also my conclusion responding to @mjmeierhoefer :)

@fuatakgun
Copy link
Member

Kia probably had changed or added a new security layer on their servers and we need to work it backwards.

@rolandsteinmeyer
Copy link

Also stopped working here today. Have not made any changes to HA recently. UVO App still works. I have also tried with bluelinky CLI mode (https://github.com/Hacksore/bluelinky) which I used before finding this integration.

This also does no longer work and throws this error

error: @EuropeController.login: sign in with EuropeanBrandAuthStrategy failed with error Error: @EuropeanBrandAuthStrategy.login: Cannot find the argument userId in https://prd.eu-ccapi.kia.com:8080/web/v1/user/integration/auth?&locale=en (...) Just as a hint that there may have been changes at kia.

@Maaxion
Copy link

Maaxion commented Jun 29, 2023

This seems related Hyundai-Kia-Connect/hyundai_kia_connect_api#348

Fair to say everyone in EU at least is affected.

Also if you have the same error, please just tag the original issue with a reaction. Replying I have the same issue just clutters the actual discussion around resolvng the issue. This makes it harder and take longer to fix the actual problem. Having dozens of people say "Me too, same error" is not productive, it is already known that the error affects or will affect most users.

@Zaphod360
Copy link

A little bit of potentially useful info. My UVO app is not working however the Kia Connect app is working? Don't know if that is relevant?

@mariadumitruiulian
Copy link

same here

@bbeijl
Copy link

bbeijl commented Jun 30, 2023

Same problem here.

@finnok
Copy link

finnok commented Jun 30, 2023

'Unexpected Error' problem here too .. removed and tried to re-add integration

@McMoobud
Copy link

Same, tried removing and restarting and now can't re-add the add on

@fuatakgun
Copy link
Member

resolving here, check open issues first.
#660

@coditmarc
Copy link

UVO Connect is no longer working and confirmed by KIA Netherlands. KIA Connect is the new Android App. Which might mean that the API that is being used might have changed as well.

@fuatakgun
Copy link
Member

Please let's keep the comment stream clean as much as possible so in case something important pops up, we don't miss it.

I am working on this and trying to figure out what has changed in the login flow.

Also checking other repositories if they have a solution in place.

Me too style comments are not helpful, while i understand the frustration here, let's be patient.

@dkwabek
Copy link

dkwabek commented Jul 1, 2023

same problem here since 2 days

@MYG63
Copy link
Author

MYG63 commented Jul 10, 2023

Problem seems to be fixed in the new version v2.10.4
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests