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.59k stars 29.91k forks source link

Unhashable type list when upgrading or restoring from backup #101383

Closed t-n closed 11 months ago

t-n commented 11 months ago

The problem

I get "TypeError: unhashable type: 'list'" when I try to upgrade from 2023.10.0b2, it completes the update but crashes on startup and I have to revert to an older VM snapshot to get it started again. I get the same error when trying to restore the latest snapshot in a new blank VM.

image

What version of Home Assistant Core has the issue?

core-2023.10.0b3+

What was the last working version of Home Assistant Core?

core-2023.10.0b2

What type of installation are you running?

Home Assistant OS

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

t-n commented 11 months ago

I just tried upgrading to 2023.10.0b7 with the same error. Everything seems to be working and no errors showing before starting the upgrade

joostlek commented 11 months ago

This is because of a bug in telldus live integration. This is fixed later on. Strange that your backup doesn't restore. The bug is in every 2023.10 instance until 2023.10.b9 (iirc). So if you restore a backup pre-2023.10, on 2023.10.b9 you should be good.

The fix would be to remove some entries from your .storage/config_entriessomething file. So if that first plan can't work for whatever reason we can manually try this way

t-n commented 11 months ago

Thanks for pointing me in the right direction, after removing all traces of telldus live it now works again!

If anyone else has the same issue: I removed the telldus live integration from the UI and started the update which again failed but this time due to the "deleted_entities" in the core.entity_registry file. After removing all telldus entries from that section as well and restarting ha core it now started again and I could restart the update procedure (this time to 2023.10.0b9).

Would it be possible to log more info as to which integration that causes config issues like these so one knows where to start? :)

joostlek commented 11 months ago

Well, in this case it's caused by setting the unique_id of an entity to a list of items, which doesn't work. So I am currently checking if we can avoid a system to get in this place in the first place.