navidrome / navidrome

🎧☁️ Modern Music Server and Streamer compatible with Subsonic/Airsonic
https://www.navidrome.org
GNU General Public License v3.0
10.48k stars 798 forks source link

Player gets unresponsive often #1511

Closed morbificagent closed 10 months ago

morbificagent commented 2 years ago

Hi together,

after a few days using navidrome now i have the problem that i cant press pause often as the player is unresponsive:

grafik

On the left side the turntable is rotating but the timecounter stops and i cant press the buttons like pause... after some seconds (~10s) everything is working again... BTW the music is running all the time even when this problem occurs. This happens every several minutes at my site (Win11 / Firefox)

Dnouv commented 2 years ago

@morbificagent, thank you for reporting the issue. Sorry but it looks like I am unable to reproduce the issue on my setup. I did try pausing the song a few times on Firefox (Win11); here is a vid attached of the steps I followed. Could you please provide some additional details on the issue, say, does it occur for only Firefox on your system, or a video of bug would be great. Feel free to comment. Thank you!

https://user-images.githubusercontent.com/61188295/145715777-278936d3-cc71-4a33-9b2c-fb2257bb990b.mp4

morbificagent commented 2 years ago

@Dnouv I have tested it in Firefox and Chrome now and the Problem remains. Here is a video about it. In this case the unresponsive time is at the beginning (it wont start even if im clicking on start several times, and at 3:41 of the Song til the end of it where i try to pause it. But its not allways at the start or the end of the song. Sometimes its somewhere in the middle, sometimes for some seconds sometimes for a minute...

https://user-images.githubusercontent.com/50199132/145774902-9eac02bb-c730-42bc-b454-784cfbf6285c.mp4

Dnouv commented 2 years ago

@morbificagent Thank you so much for the clip, and it looks like it is a bug in the player; I'll try to investigate it once more and let you know the results. Feel free to comment. Thank you!

vosscodes commented 2 years ago

I have this same problem fairly often - frequently enough that I was about to open an issue today. I'm not seeing it so frequently as every few minutes, but the web UI can lock up and go unresponsive like this seemingly at random. This happens in chrome and firefox on both mac and windows.

Dnouv commented 2 years ago

@vosscodes, thank you for reporting the issue; as the behavior is quite random, it is getting harder to reproduce, though please rest assured, I'm trying to recreate it. I'll add a fix as soon as the error source is found. Feel free to comment. Thank you!

l0l67 commented 2 years ago

I have the same issue, seems like it occurs more often on lower end devices (never had a problem on my Desktop while i get this issue multiple times a day on my work PC and laptop)

I have checked this with my Laptop, if it is in energy saving (cpu clock ~1ghz) the web ui hangs almost every few minutes and i need to restart the browser (other tabs still work) while on "power" mode (~4ghz) it works just fine

For reference: Desktop: ryzen 7 3800x with 8 cores 16 threads, 16gb ram (arch linux) Laptop: some i3 with 2 cores 4 threads, 8gb ram (arch linux) work pc: some i3, 16gb ram (windows) Browser on all 3: Firefox 95.0.2

Dnouv commented 2 years ago

Thank you for this vital info @l0l67; it is really of great help. I have been worried since last week, trying to reproduce this issue. Now we know the cause. However, it was not present in the previous versions; maybe some recent updates might have triggered this. @morbificagent, could you please confirm once after which updates this issue kicked in? Was it after the update to 0.47? Please feel free to comment. Thank you!

morbificagent commented 2 years ago

@Dnouv I started my server with 0.47 ;-)

Dnouv commented 2 years ago

Ohh, no worries, maybe @vosscodes might have experienced previous versions?

deluan commented 2 years ago

For those having this issue, can you please try with the latest dev build: https://nightly.link/navidrome/navidrome/workflows/pipeline/master (Docker: deluan/navidrome:develop

If you can't try a new build, you can also try disabling the activity panel: DevActivityPanel=false

Please let me know the result.

morbificagent commented 2 years ago

@deluan should i put DevActivityPanel=false in my navidrome.toml?

l0l67 commented 2 years ago

I didnt try the dev build yet due to lack of time but i did observe that this issue comes up regularly while loading larger sets of data at once.

For example: if i go on the songs tab and only 15 songs get loaded by default, it works just fine But if i go to a smart playlist wich loads 100 songs, then the web ui gets noticeably slower and eventually gets completely unresponsive (same with other tabs e.g. Album)

Edit: dont know what update caused it since i didnt use navidrome on multiple devices until recently

deluan commented 2 years ago

@deluan should i put DevActivityPanel=false in my navidrome.toml?

@morbificagent Sorry for the late reply. Yes it goes in the navidrome.toml, but this is a workaround. I think the latest develop build has it fixed, but I need someone to confirm it for me.

@l0l67 Please test it with the latest dev build.

morbificagent commented 2 years ago

DevActivityPanel=false is working for me...

Will test the dev build if I find some time ;-)

l0l67 commented 2 years ago

Devbuild works fine for me (could only test on 2 devices now, one had the problem wich seems to be resolved now) DevActivityPanel=false works also (same as above)

also loading times seem to be a bit faster, could be Placebo Effect tho ;)

anyways Great Work!

vosscodes commented 2 years ago

Ohh, no worries, maybe @vosscodes might have experienced previous versions?

Sorry for the delay - I can't be totally sure if it was or wasn't, but I don't recall it being present with an older container. The dev build is working great for me so far, though I also haven't used it on all devices yet.

This build seems to have resolved another issue where music sometimes would hitch briefly when changing window focus, and that does seem to have been from 0.47 rather than 0.45 (I think that's what I was on before, at least).

urlyb commented 2 years ago

I installed a dev build (0.47.0-SNAPSHOT (8c707b4e)) and it does work better with the large playlists. There were no problems with the UI until I manually triggered a scan (not a full scan). Based on the logs, scan completed in less than 4 seconds, but the UI became unresponsive and never recovered (I had to close the browser tab and open a new one).

vosscodes commented 2 years ago

Sorry to report that I'm having some issues using Windows web clients, in particular, after some time using the develop container.

  1. The web UI will hang at a blank screen and refuse to load until the container is restarted; this occurs seemingly overnight or after some unknown period of time where the app works very swiftly for many hours. I'll be sure to pull this up on other clients if I see it again.
  2. In one case (happening right now), the web page will load and work fluidly, but no music will actually play. I can see the album art spinning in the bottom left, and the meter animation bouncing next to the track title, but the time elapsed remains 0:00 and there is no sound.


Both issues 1 and 2 above will resolve (immediately, without even a page refresh) after the container is restarted. I have one other possibly related issue:

  1. I noticed that if I restart the container, and, on a Windows web client, click somewhere on the web UI before the app has fully loaded, the entire page will lock up in an unrecoverable way. This has happened to me in both Chrome and Firefox (fresh private windows - no addons), but it seems to be a very small percentage of the time, and I can't replicate it consistently.

Unfortunately, there were no logs indicating any issue in any of these cases - in fact, there were no unexpected logs at all. I have increased my log level in hopes of getting something more.

Edit: I'll also make a point to test DevActivityPanel=false this week :)

vosscodes commented 2 years ago

Not sure if we have enough info to say it's the same, but the behavior @urlyb noticed with a tab becoming unresponsive sounds similar to what I've seen in case 3.

DeMiro5001 commented 2 years ago

I have version 0.47.5 (86fe1e3b) installed in yunohost, i3/3G/500G. I also have netdata installed. When I play a song from my laptop (i3/8G/AMD graphics), everything is smooth, and cpu usage of the server is about 8% (netdata) But when I use a netbook (atom/2G/Integrated intel graphics), the frontend is frozen, the song plays for a while and then stops but the progress bar stays at 0, cpu usage of the netbook is 50% (mainly the browser, I tried chrome and opera with one tab only), and strangely the cpu usage of the server jumps to 40% for about 2 minutes. Here is the netdata graph Image1 Another thing, may be it's not related, in the browser console I get these messages :

Error with Permissions-Policy header: Unrecognized feature: 'interest-cohort'.
DevTools failed to load source map: Could not load content for https://mydomain.com/navidrome/app/3rdparty/workbox/workbox-routing.prod.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://mydomain.com/navidrome/app/3rdparty/workbox/workbox-sw.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://mydomain.com/navidrome/app/3rdparty/workbox/workbox-strategies.prod.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://mydomain.com/navidrome/app/3rdparty/workbox/workbox-navigation-preload.prod.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
DevTools failed to load source map: Could not load content for https://mydomain.com/navidrome/app/3rdparty/workbox/workbox-core.prod.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE
selfhoster1312 commented 1 year ago

I can reproduce this issue on the latest develop. However, it affects Firefox but not Chromium. Firefox hangs due to over 100% continued CPU usage.

With DevActivityPanel=false though, the problem seems to be gone. Firefox is still using a lot of CPU (~20% just to play music?) but it's not hanging anymore.

github-actions[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. The resources of the Navidrome team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

github-actions[bot] commented 6 months ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.