core: Shark IQ Integration can't be added - Unexpected error

The problem

Trying to add the Shark IQ Integration to my HA instance (via the Integration UI) always results in the same error message: “Unexpected error”

image

I’ve attached a stacktrace from the error log of HA core.

I’ve also followed the troubleshooting section of the integration documentation and turned off all adblockers - without luck.

What version of Home Assistant Core has the issue?

core-2021.11.5

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

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2021-11-26 22:51:03 ERROR (MainThread) [homeassistant.components.sharkiq] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/sharkiq/config_flow.py", line 54, in _async_validate_input
    info = await validate_input(self.hass, user_input)
  File "/usr/src/homeassistant/homeassistant/components/sharkiq/config_flow.py", line 32, in validate_input
    await ayla_api.async_sign_in()
  File "/usr/local/lib/python3.9/site-packages/sharkiqpy/ayla_api.py", line 97, in async_sign_in
    self._set_credentials(resp.status, await resp.json())
  File "/usr/local/lib/python3.9/site-packages/sharkiqpy/ayla_api.py", line 73, in _set_credentials
    raise SharkIqAuthError(login_result["error"]["message"])
TypeError: string indices must be integers

Additional information

Submitting the form with a wrong username/password results in the exact same error and stacktrace.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 29 (3 by maintainers)

Most upvoted comments

@ github-actions bot - get that stale label outta here. We’re about to resolve it.

Hi everyone, we recently merged a PR to dev on this repo that updates the API endpoints used by the SharkIQ integration. If you’re running a development release of Home Assistant this should be available to you now. The maintainer of the upstream dependency has no recent Github activity, so we are moving to a fork of the original integration and have multiple maintainers of the fork so we can prevent this integration from becoming stale with no ability to merge changes again.

If you have issues or fixes that have not been addressed yet, please open an issue pr PR in https://github.com/JeffResc/sharkiq and we’ll get fixes merged into Home Assistant as quickly as possible.

Currently we do not have support for automatically refreshing the token, but it should be a fairly easy fix. If anyone would like to submit a PR we could use the help as myself and the other maintainers are still trying to get existing PRs migrated over from the legacy repo. Discussion for the token refresh issue at https://github.com/JeffResc/sharkiq/issues/5

On that note, @Draes we are working on migrating a PR from the original integration that brings EU support into the main integration, so hopefully soon you will be able to just use the integration that ships with Home Assistant core.