home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.73k stars 29.98k forks source link

Shark IQ integration can't install #126424

Open whacko1 opened 1 day ago

whacko1 commented 1 day ago

The problem

I had the Shark IQ integration working for a while and started seeing unexpected runs of the vacuum. It seemed there was some kind of issue between the iPhone app and HA integration and there must have been some kind of "ghost" schedule. So I figured I'd uninstall the Shark IQ integration and reinstall it.

Unfortunately, I am now unable to reinstall the integration. I get an access_token error in the logs. But the saved password does work on my Shark app on my phone, so I don't think this is a password issue.

I'm wondering if I didn't completely uninstall the integration and now it can't reinstall?

I am not an HA expert, so please try to "explain it to me like I'm five years old."

What version of Home Assistant Core has the issue?

core-2024.9.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Shark IQ

Link to integration documentation on our website

https://www.home-assistant.io/integrations/sharkiq/

Diagnostics information

I don't think I can do this because it's at install time, so the integration can't turn on debug logging.

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.sharkiq
Source: components/sharkiq/config_flow.py:57
integration: sharkiq (documentation, issues)
First occurred: 7:30:27 AM (1 occurrences)
Last logged: 7:30:27 AM

Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sharkiq/config_flow.py", line 57, in _validate_input
    await ayla_api.async_sign_in()
  File "/usr/local/lib/python3.12/site-packages/sharkiq/ayla_api.py", line 106, in async_sign_in
    self._set_credentials(resp.status, await resp.json())
  File "/usr/local/lib/python3.12/site-packages/sharkiq/ayla_api.py", line 84, in _set_credentials
    self._access_token = login_result["access_token"]
                         ~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'access_token'

Logger: homeassistant.components.sharkiq
Source: components/sharkiq/config_flow.py:70
integration: sharkiq (documentation, issues)
First occurred: 7:30:27 AM (1 occurrences)
Last logged: 7:30:27 AM

'access_token'

Additional information

No response

home-assistant[bot] commented 1 day ago

Hey there @jeffresc, @funkybunch, mind taking a look at this issue as it has been labeled with an integration (sharkiq) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `sharkiq` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign sharkiq` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


sharkiq documentation sharkiq source (message by IssueLinks)

mib1185 commented 1 day ago

You can enable the debug logging before trying to setup the Shark IQ. To do so

now try again to setup the Shark IQ integration, afterwards download the full log (Settings -> System -> Logs) and provide it here.

armccoy commented 19 hours ago

I'm having the same issue trying to get SharkIQ working again. Here's my log from the instructions above:


2024-09-23 08:21:25.786 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-23 08:21:25.793 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration iphonedetect which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2024-09-23 08:21:43.849 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/themes", "/config/themes", True)])`; This function will be removed in 2025.7 at custom_components/hacs/base.py, line 1182: self.hass.http.register_static_path(f"{URL_BASE}/themes", self.hass.config.path("themes")), please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:21:43.871 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/frontend", "/config/custom_components/hacs/hacs_frontend", False)])`; This function will be removed in 2025.7 at custom_components/hacs/frontend.py, line 54: hass.http.register_static_path(f"{URL_BASE}/frontend", locate_dir(), cache_headers=False), please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:21:43.888 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles/iconset.js", "/config/custom_components/hacs/iconset.js", True)])`; This function will be removed in 2025.7 at custom_components/hacs/frontend.py, line 57: hass.http.register_static_path(, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:21:43.903 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.components.frontend. This is deprecated and will stop working in Home Assistant 2024.9, it should be updated to import functions used from frontend directly at custom_components/hacs/frontend.py, line 68: hass.components.frontend.async_register_built_in_panel(, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:21:43.941 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' calls hass.http.register_static_path which is deprecated because it does blocking I/O in the event loop, instead call `await hass.http.async_register_static_paths([StaticPathConfig("/hacsfiles", "/config/www/community", True)])`; This function will be removed in 2025.7 at custom_components/hacs/base.py, line 1162: self.hass.http.register_static_path(, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:08.417 ERROR (MainThread) [homeassistant.components.mqtt.client] Failed to connect to MQTT server due to exception: [Errno -5] Name has no usable address
2024-09-23 08:22:25.033 WARNING (MainThread) [zigpy.application] Zigbee channel 15 utilization is 96.20%!
2024-09-23 08:22:25.042 WARNING (MainThread) [zigpy.application] If you are having problems joining new devices, are missing sensor updates, or have issues keeping devices joined, ensure your coordinator is away from interference sources such as USB 3.0 devices, SSDs, WiFi routers, etc.
2024-09-23 08:22:28.177 WARNING (MainThread) [homeassistant.components.bluetooth_le_tracker.device_tracker] No Bluetooth LE devices to track!
2024-09-23 08:22:32.585 WARNING (MainThread) [homeassistant.helpers.frame] Detected that custom integration 'hacs' accesses hass.helpers.event. This is deprecated and will stop working in Home Assistant 2024.11, it should be updated to import functions used from event directly at custom_components/hacs/base.py, line 630: self.hass.helpers.event.async_track_time_interval(, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:32.826 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:32.995 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:33.043 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:33.068 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:33.202 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:34.067 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:34.120 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:34.443 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:34.467 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:34.538 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 08:22:34.607 WARNING (MainThread) [homeassistant.util.json] json_loads was called from hacs, this is a deprecated function which will be removed in HA Core 2025.8. Use homeassistant.util.json.json_loads instead, please create a bug report at https://github.com/hacs/integration/issues
2024-09-23 09:07:32.848 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 362, in data_received
    messages, upgraded, tail = self._request_parser.feed_data(data)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "aiohttp/_http_parser.pyx", line 563, in aiohttp._http_parser.HttpParser.feed_data
aiohttp.http_exceptions.BadHttpMessage: 400, message:
  Pause on PRI/Upgrade:

    b''
      ^
2024-09-23 09:47:20.037 ERROR (MainThread) [homeassistant.components.sharkiq] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sharkiq/config_flow.py", line 57, in _validate_input
    await ayla_api.async_sign_in()
  File "/usr/local/lib/python3.12/site-packages/sharkiq/ayla_api.py", line 106, in async_sign_in
    self._set_credentials(resp.status, await resp.json())
  File "/usr/local/lib/python3.12/site-packages/sharkiq/ayla_api.py", line 84, in _set_credentials
    self._access_token = login_result["access_token"]
                         ~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'access_token'
2024-09-23 09:47:20.086 ERROR (MainThread) [homeassistant.components.sharkiq] 'access_token'
2024-09-23 09:51:57.214 DEBUG (MainThread) [homeassistant.components.sharkiq] Initialize connection to Ayla networks API
2024-09-23 09:51:57.462 ERROR (MainThread) [homeassistant.components.sharkiq] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sharkiq/config_flow.py", line 57, in _validate_input
    await ayla_api.async_sign_in()
  File "/usr/local/lib/python3.12/site-packages/sharkiq/ayla_api.py", line 106, in async_sign_in
    self._set_credentials(resp.status, await resp.json())
  File "/usr/local/lib/python3.12/site-packages/sharkiq/ayla_api.py", line 84, in _set_credentials
    self._access_token = login_result["access_token"]
                         ~~~~~~~~~~~~^^^^^^^^^^^^^^^^
KeyError: 'access_token'
2024-09-23 09:51:57.517 ERROR (MainThread) [homeassistant.components.sharkiq] 'access_token'