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
73.37k stars 30.64k forks source link

Scripts becoming unavailable after upgrade to 2024.8.0 #123468

Closed acenuke closed 2 months ago

acenuke commented 2 months ago

The problem

After the upgrade, the scripts were there for a few minutes, then all became unavailable (the UI does not list them anymore). The code is still available in scripts.yaml. If I restart HAOS, they come back for a few minutes then are unavailable again. I tried to create a brand new script from the UI and same behaviour. No idea what to do and I can't find anything in the log

What version of Home Assistant Core has the issue?

core-2024.8.0

What was the last working version of Home Assistant Core?

core-2024.7.4

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Core

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?

Nothing in the logs

Additional information

No response

RKCKBN commented 2 months ago

Similar issue here, but only with UI for actionable notifications, other scripts are visiable and editable via UI.

Haulund83 commented 2 months ago

Same problem

bedeberger commented 2 months ago

IMHO this issue should relate to https://github.com/home-assistant/frontend/issues because the affected scripts are working, but not editable in the frontend.

acenuke commented 2 months ago

IMHO this issue should relate to https://github.com/home-assistant/frontend/issues because the affected scripts are working, but not editable in the frontend.

Maybe it is, but when it becomes available, you cannot even look for the script device/entity, so you can't call it. Any automation that tries to call the script fails, because the script does not seem to exist anymore in core. So not an UI issue only

bedeberger commented 2 months ago

already solved I guess https://github.com/home-assistant/frontend/issues/21631

acenuke commented 2 months ago

already solved I guess home-assistant/frontend#21631

Actually, not really related. I do not use notifications at all in that script. It just turns off a bunch of devices. On another note, I did a full reboot of my Raspberry Pi instead of restarting just HA (I should have started with that....), and the scripts are still there after several hours.

For the other people having the same issue as me, can you try a full reboot of your HAOS/VM/container to see if it fixes the issue for you as well?

bedeberger commented 2 months ago

ok, sorry, it is a different issue, please ignore my comments :-/

acenuke commented 2 months ago

ok, sorry, it is a different issue, please ignore my comments :-/

All good. We all try to identify issues and solve them for the HA community

mib1185 commented 2 months ago

please provide the home-assistant.log after the scripts are gone again. Just to be sure - you mean they are not just invisibel, they are really gone - so not even shown in the Developer Tools States Tab?

acenuke commented 2 months ago

please provide the home-assistant.log after the scripts are gone again. Just to be sure - you mean they are not just invisibel, they are really gone - so not even shown in the Developer Tools States Tab?

It happened again, so the reboot made it last a bit longer, but the issue is still happening.

From a dashboard search, I can't find the entity script.good_night (I normally can), but I can see it and call it from the developer tools. When I call it that way, it reappears in search and in the GUI for some time

I attached my logs, but I don't see anything related to this

home-assistant_2024-08-09T21-08-00.450Z.log

home-assistant[bot] commented 2 months ago

Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (script) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `script` 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 script` 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)


script documentation script source (message by IssueLinks)

mib1185 commented 2 months ago

I attached my logs, but I don't see anything related to this home-assistant_2024-08-09T21-08-00.450Z.log

i agree - there is nothing helpful in this log. please enable debug logging for the script platform and set the default severity to info by adding the following to your configuration.yaml:

logger:
  default: info
  logs:
    homeassistant.components.script: debug

now reboot HA again and wait until the issue occur again. While waiting for the issue, please screenshot the details of script.good_night from the Developer Tools States Tab and another screenshot when the issue persists.

acenuke commented 2 months ago

Sorry for the delay, I was away this weekend.

Here is the log after the script disappeared (did not find anything in the logs, even after enabling the script logger): After script disappeared - Script log ON - home-assistant_2024-08-12T03-42-38.041Z.log

I also attached screen shots before and after, showing the script in the UI (and the disappearance), and from the dev tool page: Script visible Script visible from dev tab

when the script disappeared: Script disappeared from UI Script still visible from dev tab Script can be found anymore when searching for it

Let me know if you need me to provide anything else

mib1185 commented 2 months ago

There were several bug fixes in the frontend around the script overview page in 2024.8.1. Please re-check with latest HA core version 2024.8.1

acenuke commented 2 months ago

Those logs were with 2024.8.1. it's still happening

mib1185 commented 2 months ago

please restart HA in safe mode and check if the issue still occur, thx :+1:

mib1185 commented 2 months ago

anyway, based on the provided logs and the issue description this looks very much like a frontend issue, so please report it in the frontend repository, thx :+1: