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

2024.2.0 not starting for unknown reason #109908

Closed
brave0d opened this issue Feb 7, 2024 · 24 comments · Fixed by #109966
Closed

2024.2.0 not starting for unknown reason #109908

brave0d opened this issue Feb 7, 2024 · 24 comments · Fixed by #109966

Comments

@brave0d
Copy link
Contributor

brave0d commented Feb 7, 2024

The problem

Just updated my docker container to latest version - 2024.2.0 from 2024.1.6 and getting the following error in docker logs:

2024-02-07 20:33:26.421 ERROR (MainThread) [root] Uncaught exception
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 221, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/runner.py", line 188, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 684, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in setup_and_run_hass
    hass = await bootstrap.async_setup_hass(runtime_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 203, in async_setup_hass
    await async_from_config_dict(config_dict, hass) is not None
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 319, in async_from_config_dict
    await async_load_base_functionality(hass)
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 296, in async_load_base_functionality
    await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1354, in async_initialize
    entries[entry_id] = config_entry
    ~~~~~~~^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1148, in __setitem__
    self._domain_unique_id_index.setdefault(entry.domain, {})[
TypeError: unhashable type: 'list'

container keeps restarting.

I guess it might be some custom integration I have enabled, but no idea which one. The information is so vague, so I cannot even know where to dig.

What version of Home Assistant Core has the issue?

2024.2.0

What was the last working version of Home Assistant Core?

2024.1.6

What type of installation are you running?

Home Assistant Container

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

@thecode thecode added this to the 2024.2.1 milestone Feb 7, 2024
@joostlek
Copy link
Member

joostlek commented Feb 7, 2024

Do you have hikvision_next installed?

@kst84
Copy link

kst84 commented Feb 7, 2024

I have exactly the same issue after pulling the 2024.2.0 image.

@vampywiz17
Copy link

same problem. Yes, hikvision_next are installed.

@msaphoto06
Copy link

Same problem.
Back to 2024.1.5

@joostlek
Copy link
Member

joostlek commented Feb 7, 2024

The hikvision_next config entries should be removed and someone should create an issue at hikvision_next repository

@joostlek
Copy link
Member

joostlek commented Feb 7, 2024

@joostlek

Do you have hikvision_next installed?

😮 wow, how do you know? I do have it...

We got this issue during beta, but the guy didn't need the integration anymore and I didn't have time to file an issue

@brave0d
Copy link
Contributor Author

brave0d commented Feb 7, 2024

@DarkWolf7
Copy link

I also had a similar error with my Home Assistant, but I am not using hikvision. I see that it's an ip camera integration... I am using a custom integration for my doorbell which is Eufy home: https://github.com/fuatakgun/eufy_security

Here are my logs, for what they're worth:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 221, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main
    exit_code = runner.run(runtime_conf)
                ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/runner.py", line 188, in run
    return loop.run_until_complete(setup_and_run_hass(runtime_config))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/base_events.py", line 684, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in setup_and_run_hass
    hass = await bootstrap.async_setup_hass(runtime_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 203, in async_setup_hass
    await async_from_config_dict(config_dict, hass) is not None
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 319, in async_from_config_dict
    await async_load_base_functionality(hass)
  File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 296, in async_load_base_functionality
    await asyncio.gather(
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1354, in async_initialize
    entries[entry_id] = config_entry
    ~~~~~~~^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1148, in __setitem__
    self._domain_unique_id_index.setdefault(entry.domain, {})[
TypeError: unhashable type: 'list'``` 

@alanburchill
Copy link

Same issues this is my log...

2024-02-08 10:14:51.561 ERROR (MainThread) [root] Uncaught exception
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/usr/src/homeassistant/homeassistant/main.py", line 221, in
sys.exit(main())
^^^^^^
File "/usr/src/homeassistant/homeassistant/main.py", line 209, in main
exit_code = runner.run(runtime_conf)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/runner.py", line 188, in run
return loop.run_until_complete(setup_and_run_hass(runtime_config))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/asyncio/base_events.py", line 684, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in setup_and_run_hass
hass = await bootstrap.async_setup_hass(runtime_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 203, in async_setup_hass
await async_from_config_dict(config_dict, hass) is not None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 319, in async_from_config_dict
await async_load_base_functionality(hass)
File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 296, in async_load_base_functionality
await asyncio.gather(
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1354, in async_initialize
entries[entry_id] = config_entry
~~~~~~~^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1148, in setitem
self._domain_unique_id_index.setdefault(entry.domain, {})[
TypeError: unhashable type: 'list'

@GroteGehaktBal
Copy link

Same issue here, I do also have hikvision_next in custom components

@jcarr
Copy link

jcarr commented Feb 8, 2024

I have the same issue, however I do not have hikvision integrations.

@thefunkygibbon
Copy link

thefunkygibbon commented Feb 8, 2024

same issue . I have the next add-on
why is ha made in such a way that a custom integration can stop the whole system booting up correctly. surely having some kind of boot process which if a integration doesn't load it is simply dropped and ignored from the boot process .

moved the integration elsewhere but still failing on boot. error parts of logs are as follows but can't see anything in it pointing to anything I recognise

2024-02-08 07:23:09.910 ERROR (MainThread) [root] Uncaught exception Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 221, in <module> sys.exit(main()) ^^^^^^ File "/usr/src/homeassistant/homeassistant/__main__.py", line 209, in main exit_code = runner.run(runtime_conf) ^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/runner.py", line 188, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/asyncio/base_events.py", line 684, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in setup_and_run_hass hass = await bootstrap.async_setup_hass(runtime_config) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 203, in async_setup_hass await async_from_config_dict(config_dict, hass) is not None ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 319, in async_from_config_dict await async_load_base_functionality(hass) File "/usr/src/homeassistant/homeassistant/bootstrap.py", line 296, in async_load_base_functionality await asyncio.gather( File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1354, in async_initialize entries[entry_id] = config_entry ~~~~~~~^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1148, in __setitem__ self._domain_unique_id_index.setdefault(entry.domain, {})[ TypeError: unhashable type: 'list'

@robex2005
Copy link

Same issue, i'm using the docker image...

@joostlek
Copy link
Member

joostlek commented Feb 8, 2024

Everyone who uses the Hikvision, please stop posting as we know it's an issue. For the others, I'll cook up a script with which we can identify the integration you're struggling with

@joostlek
Copy link
Member

joostlek commented Feb 8, 2024

jq -r '.data.entries[] | select(.unique_id | type == "array") | {unique_id, domain}' /config/.storage/core.config_entries

@joostlek
Copy link
Member

joostlek commented Feb 8, 2024

If you execute that, it will note down integrations which have an unique_id setup incorrectly

@jcarr
Copy link

jcarr commented Feb 8, 2024

If you execute that, it will note down integrations which have an unique_id setup incorrectly

Mine was schlage

@joostlek
Copy link
Member

joostlek commented Feb 8, 2024

Do you use a custom integration for this?

@jcarr
Copy link

jcarr commented Feb 8, 2024

Do you use a custom integration for this?

I believe I am using a built in integration: https://github.com/home-assistant/core/tree/dev/homeassistant/components/schlage

@joostlek
Copy link
Member

joostlek commented Feb 8, 2024

Can you please confirm this? Does /config/custom_components/schlage exist?

Did you use a custom component for schlage before you migrated to core? When did you install schlage?

Cc @dknowles2

@emontnemery
Copy link
Contributor

emontnemery commented Feb 8, 2024

I think we may have to revert #107590 and come up with a non destructive solution which handles existing unhashable data.

Let's not revert, the change in #109966 should fix this issue 👍

@dknowles2
Copy link
Contributor

Can you please confirm this? Does /config/custom_components/schlage exist?

Did you use a custom component for schlage before you migrated to core? When did you install schlage?

Cc @dknowles2

I'm fairly confident the schlage integration has always set unique_id as a string. (Even the old custom integration...)

@joostlek
Copy link
Member

joostlek commented Feb 8, 2024

@jcarr Can you maybe post the output of the command so we know what the unique_id was?

@StephenShamakian
Copy link

StephenShamakian commented Feb 8, 2024

I'm having the same issue as well after attempting to upgrade to v2024.2.0 using a docker container image.

schlage was my culprit as well using the script above:

config_entries { "unique_id": [ "s****n@s*****t.com" ], "domain": "schlage" }

I do have a custom component for Schlage (I believe there was a reason for this?) (https://github.com/mcnutter1/homeasssitant-schlage)

root@Server:/mnt/zfs-nvme/docker/homeassistant# ls -lart custom_components/schlage/
total 89
-rw-rw-rw- 1 nobody users 3237 Jun 26 2023 init.py
-rw-rw-rw- 1 nobody users 2187 Jun 26 2023 config_flow.py
-rw-rw-rw- 1 nobody users 197 Jun 26 2023 const.py
-rw-rw-rw- 1 nobody users 3176 Jun 26 2023 lock.py
-rw-rw-rw- 1 nobody users 4990 Jun 26 2023 new_api.py
-rw-rw-rw- 1 nobody users 2620 Jun 26 2023 sensor.py
drwxrwxrwx 2 nobody users 3 Jun 26 2023 translations/
-rw-rw-rw- 1 nobody users 567 Jun 26 2023 strings.json
-rw-rw-rw- 1 nobody users 359 Jun 26 2023 manifest.json
drwxrwxrwx 4 nobody users 12 Jun 26 2023 ./
drwxr-xr-x 2 nobody users 8 Jun 26 2023 pycache/
drwxr-xr-x 18 nobody users 18 Feb 5 09:20 ../

@frenck frenck removed this from the 2024.2.1 milestone Feb 9, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.