Stuck on "loading data" screen (Need help diagnosing)

When I log into HASS 2021.12.7, the “loading data” screen never goes away. Verified on multiple macos computers, chrome, firefox, safari, iOS app, iOS safari, cleared cache and tried incognito mode where possible. I have a Chrome browser window that was already at the lovelace screen and it still works, but on another computer I attempted to refresh that page and got the same behavior. All automations and integrations are still working. Homekit integration is still working so I can control my devices. I just can’t log in on to a new session.

The logs I know about don’t show anything at all about failure to log in, and this is a configuration that didn’t have this problem until recently.

I am running HASS from a container on a Raspberry Pi 4Gb booting Ubuntu 21 64-bit from a USB 500Gb SSD. The volume mounted as /config in the container is a restored copy of the volume from a backup. I chown/chgrp, and chmod it so that root owns everything and it is all readable/writable.

I’ve had similar problems before, and so I checked the solutions from those times: timezones, accessing by ip instead of hostname, and did a full sweep of my entities list to make sure there are no invalid zombies.

Is there an additional log I can enable somehow, or some flag I can set that I can use to diagnose this problem?

Has anything changed recently that helps you look in the right place? Upgraded to a new version of HA? Component updated? If you get “loading data” it implies that it is running (as witnessed by your HomeKit working) but that something on the page itself might be amiss, like a custom Lovelace component (perhaps one that uses JS?). If you have SSH you could start to disable some of those things until you get a clean load.

I added zwave integrations recently, but this problem started after that was up and working. I did update to the newest HASS. I just tried disabling the zwave integration (and shut down the zwave server) but still get the same problem. I have not tried rolling back to a previous HASS version.

I would roll back and see if everything is stable, then you can look around your custom components and config to see if you can pinpoint anything.

Are you able to SSH into it and look at the logs to shed any light on the problem?

I rolled back to 12.1 and no dice, will try a november build, they definitely used to work.

I can view the logs through the docker container, or by looking in the mounted config volume, but there is nothing in them different than anything that’s ever been there (which is precious little). Is there something else I can enable or some specific log somewhere I’m looking for. I don’t know what I’m looking for even.

I don’t run on a docker installation so I don’t know what you are able to access, but if your HomeAssistant.log file is clean then that was what I was referring to.

Have you tried on multiple browsers in and out of private mode?

You could try moving all of the folders under the config/custom_components to a temporary place and see if things come up. Sure, it will throw a lot of errors because of the config items added for components that don’t exist, but otherwise it should start.

When I went back to 11.2, I was able to open a window that went to lovelace, but subsequent windows still wouldn’t load. I have a weird impression that the first session into a newly started server can connect completely, I can’t articulate why I feel this might be the case. So I rolled forward again to “stable”, then made my first session a fresh run of the iOS app. The problem seems to have resolved completely. Seems I say, I don’t trust it. LOL. I’ll see if I can do a diff on the backup I made just before trying the rollback.

What happens if you try it in a private window of your browser?

I’m wrong, it’s not resolved. Directory diffs don’t show anything interesting. Incognito browsers same thing, other browser apps, same thing (just verified again).

Working to completely rebuild the configuration from scratch now.

Typically the reason data won’t load is because there is a problem with the websocket connection. You haven’t mentioned yet whether you are accessing Home Assistant directly, or going through a proxy? Are you using SSL?

I’m using local network connection. No proxy, and no certs configured.

I think I found the problem (by trial and error). I have been using a custom_component integration for 2 years that does not support multiple entities by default, so I had to modify the source to allow multiples. Changes in HASS ( haven’t tracked down when) made the integration stale - specifically both were registering the same service name, but the domain name is now used somewhere in HASS and the only artifact of the mismatch was the ui not loading.

So, in order to use multiple instances of this integration, I used “integration-1” and “integration-2” as the custom_component name. Each has its own copy of the custom component source code, because the manifest has to match the component name:

    "domain": "integration-1",

but the setup function in the integration was calling:

    hass.services.register("integration", "se...

Changing this to:

    hass.services.register("integration-1", "se...

Fixed the problem. The default logging does not show this error, as it’s issued as a warning instead of a failure.

1 Like

Resurrecting this a bit. I had the same issue (stuck on loading data). Turns out a custom component (nuvo_serial) wasnt installed on my local instance, and my local instance was referencing entities from a remote instance (thru remote home assistance integration). When the remote instance was not available, and the local instance tried using those remote entities, it was hanging on the http requests, hence the stuck on loading data problem. The fix for me was to install the nuvo_serial integration in the local instance and all was well. But I believe a more robust fix is for HA to not be so dependent on custom component “dependencies.”

FYI: I had the same problem with the “loading data” screen, but only via ethernet cable. Wifi access was working properly. Turns out that the access to my fritzbox 7490 was also quite slow and I faced much longer loading times via cable then wifi. Solution was to turn of my NAS (which is way to slow in the fritzbox) and turn off the power mode of the 4 ethernet ports. After enabling the “green mode” (100 Mbit/s) the access to HA is again super fast. So I recommend to check your fritzbox as well if you face long loading times.

I recently gave HA a new IP address on the LAN. This also led to Loading Data unresponsiveness. Looked for hours throughout multiple days to solve the issue. Turned out to not be in loaded components, but in existing tokens. I solved it by editing .storage/auth. At the bottom it contains a bunch of tokens, which I removed all with a text editor. Then restarted HA and logged in again. That worked and finally got past the Loading Data issue.

Hi, undertaking multiple changes at once caused an error for me. changing the config yaml and then thinking “let’s apply some updates whilst I’m in here…… “
The update logically caused a restart and then the GUI failed to open , ‘loading data’ forever.
I tried #ha core restart —safe-mode

No difference.

The way to spot what was going on was to look on the log first, …\home-assistant.log

(Needed to have Samba access via my laptop to open the text file on the NUC).

That showed an error with Invalid config ‘recorder’
I had been messing about with that… badly…! Deleted auto-purge, bad syntax line from config.yaml…

Restart. GUI fixed. Lesson learnt. Home assistant always very reliable so I was a bit blasé with it.
Don’t change multiple things at once before restart/update,+ better backups,+samba, +ssh to get out of scrapes. that’s what I learnt… :slight_smile: