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
[Bug]: Frontend loads sometimes slow #1124
Comments
Found out that these "hangs" are only there if you reload/load: If you load/reload another page, e.g. http://homeassistant:8099/#/settings/settings If you reload http://homeassistant:8099/# again, it is very slow again... Maybe this information helps... |
http://homeassistant:8099/#/settings/settings reloads very fast and you can switch to every tab (devices, OTA) very fast. -> Maybe a timing issue in the devices tab? If I use ingress, everything behaves the same, but a bit worse. |
Hi, thanks for detailed issue description. Let me check |
I've made few optimisations, it should get better from today release or dev branch |
Hi, try to switch to the latest dev branch https://www.zigbee2mqtt.io/advanced/more/switch-to-dev-branch.html#switch-to-the-dev-branch |
Hi, I recorded a video of this behavior. It is still there and only on the device tab!: Maybe it helps you to see something. More findings:
Can you delay the switching of protocols (HTTP 101) to /api / websocket for a second or until all assets HTML, CSS, JS, pics ...) are fully loaded/rendered? Seb a workaround would be if you can set the start tab that will be presented if you load the base URL. |
I've checked, it seem there are some issues with ingress. It prevents caching and streams content as plain text, without any compression. |
Ok, but the video I made was without ingress. I enabled direct access through port 8099. The issue is there as well. I wanted to see weather ingress is responsible for this behavior as well. That’s why I used 8099 without ingress. In Ingress everything is ok as well if you use the ingress link to the OTA tab and you switch to devices. If you access devices directly —> Problem. A workaround would be if it is possible to select a main tab that is opened with the main URL. |
If you want to take a look„live“ we could use e.g. teamviewer or ms teams. |
I installed he Edge version of zigbee2mqtt add-on and no change, still loading and never loads. I am available for a teams call if you are willing to do some troubleshooting. |
Something must be different between the OTA page and the devices page and their behavior while loading the page… Can you tell me where these pages are saved in the file path. Maybe I can play with them… |
how did you managed to open it without ingress? |
Okay, I've changed frontend port to |
I forked it and added the port: If you add this via HA, you can use Port 8099 with the add-on as well as via ingress. |
I did and could see the frontend, but with the same issue "loading, please wait" on the devices tab. |
can you send me screenshot from chrome dev tools? network tab. and btw do you have any devices joined your z2m? |
No devices yet joined. |
Oh, this is confusing spinner, it should show just empty table header. In your case if you join a device you'll be able so see devices table. I've removed this spinner in latest dev commit |
Here is the first one via ingress: noticeable: If I open the devices tab --> at first all devices are offline. After 30 seconds or so they are online. But if you - after loading the devices tab -> devices offline - switch over to any other tab and switch right back to devices, the devices are online right away.. If this is OK that way, I will add the other... |
@nurikk Is there a way to get rid of the pics in the devices, just to check if it changes something (this is most noticeable difference between devices and OTA-Tab)? But I don't know what is the most effective way how to do that. I am able to change a files in the docker container. |
Can you send me HAR dump from direct connection? using |
I'm running bare-metal and have the slow loading frontend. |
Hi, can you install this app? https://github.com/vi/websocat#installation and also network HAR dump from chrome dev tools |
Should be fixed now, can you check on latest dev branch? |
WOW! Thank you for all of your hard work. It indeed is fixed, and fast! |
We still have small issue with hassio addon |
@nurikk Hi, I was not too well the other days. Sorry that I didn't respond. There are two (quite) smaller issues left in the HA addon:
I tried to understand you code a bit and two things I was wondering about:
Is this file ignored or the port internally used?
The HA addon seems to use Alpine Linux 3.14 (3.15 is out but not used in HA / for the docker-package so far). 3.14 = Node.js 14.17.0, 3.15 = nodejs 16.13 (LTS) / nodejs-current 17.0. Thx anyway for fixing the strong delay / reload issue! Seb |
0.6.57 loading slow again |
I cannot confirm this. Still working good…
Version installed:
0.6.57
tteckster ***@***.***> schrieb am So. 5. Dez. 2021 um 20:01:
… 0.6.57 loading slow again
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1124 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APZTA7T7EA2OBQD76ZQOVOLUPOZHNANCNFSM5JC75UZQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
I'm definitely back to a minute or more to load. |
can you send me HAR report from chrome dev tools? |
|
the file is 0 bytes size.
|
fixed, thanks |
0.6.58 fixed my problem! Thanks |
Is this issue sorted as I have to stay on stable branch due to lack of time. Maybe someone with running z2m on bare metal can confirm? As I was pulling my hair off - it wasn't easy to find that issue. Glad it's addressed. |
I can confirm this version also solved my problems in loading the frontend. Nice job and thanks. |
Yes, but the ingress bug is still happening. So I will close this issue, because it is not about it. |
Slow me again. |
What happened?
Hi,
I am using the HA-Addon.
I got some UI issues when loading the frontend. Other people seems to have it, too: zigbee2mqtt/hassio-zigbee2mqtt#236
I tried to see, if direct access to the port fixes that (by adding port 8099 to the add-on configuration).
Here the rendering is OK, but every second time or so it takes very long to load...
The following file seems to be the cause:
http://homeassistant:8099/scripts/vendor.49fee1be1555be7ec8f9.js
and sometimes the css files...
If it doesn't work, a reload takes forever to load (still spinning):
What browsers are you seeing the problem on?
Chrome
Relevant stacktrace
? Please provide some info how to get this.. If a state.json.zip is needed, I can provide it.
Did you donwload state.json.zip?
I will not attach state.json.zip
The text was updated successfully, but these errors were encountered: