Open agners opened 4 years ago
This actually looks to be fixed already by something.
I can replicate it on my prod instance by using NC URL, local worked there But on my dev instance, I can not replicate it even with using NC URL...
Tested with a 414MB snapshot, it does take time over the NC address, but on my dev it does complete, whereas with my prod instance it craps out after about 20MB transferred (or around 30s).
Chrome works perfectly in all scenarios.
What does "NC" mean?
I actually connect to my HomeAssistant instance using a URL which resolves to a IPv6 address, which is globally the same. I did download the Snapshot internally, so the connection was through a gigabit network. However, the snapshot is stored on an Arm system, I assume that this limited the performance to ~14MB/s.
I'll test 0.116 tonight and some other variations to see if that make a difference.
NC == Nabu Casa
0.116 will most likely not make a difference, since the frontend on the supervisor is a few days/weeks old. I'll see if I can update that later today/tomorrow so you can test that.
The issue is still present, it seems to be in the service worker (workbox) or in Firefox, this only affects the download if using https
NC remote ui can close connection if the client is to slow on receive the data and they going out of cache
Sure, but the serviceworker should not touch this request at all. And it works flawlessly with chrome/safari against the same URL
Further investigation showed that the problem is linked with the Service Worker is considered idle and aborts the download (switches to "Stopped" state in about:debugging
). The timeout is 30s by default, but can be configured with dom.serviceWorkers.idle_timeout
in about:config
. However, not really a solution.
In this Firefox bug report I did find a download example (with Service Worker in play) where a periodical ping is sent to the service worker to keep it alive: https://stat-info.cz/firefox-sw-readablestream.html. I guess this could be a way out as well.
And for completeness: No I do not use NC URL, connecting directly locally, but I am using https
(so Service Worker is in play).
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
Just retested since the related issue #10243 seems to be gone. However, it seems that this problem is still present using Firefox 96.
FWIW, still reproducible with Firefox 119.0.1.
Checklist
The problem
When using Firefox, the download aborts after ~400MB (the snapshot is 1GB). I tried 4 times, and 4 times the download aborted about the same time (~400MB, or pretty much exactly 30 second into the download). The same snapshot downloads fine on Chromium every time. I also noticed that on Firefox the filename is just
download
, whereas its has the complete name in Chromium (maybe related to the abort? This issue has been previously reported in #6088)Expected behavior
Download works fine on Firefox.
Steps to reproduce
Use Firefox to download a snapshot >500MB/which takes longer than 30s...
Environment
State of relevant entities
Problem-relevant configuration
Javascript errors shown in your browser console/inspector
Additional information