epoupon / lms

Lightweight Music Server. Access your self-hosted music using a web interface.
http://lms-demo.poupon.dev
GNU General Public License v3.0
1.14k stars 62 forks source link

LMS crashes when accessed with Audinaut or Subtracks Android Apps - Node already has a value #225

Closed rluetzner closed 2 years ago

rluetzner commented 2 years ago

I've had some trouble getting Android Apps to work in combination with my LMS instance.

I'm aware that neither Audinaut nor Subtracks have been tested. I stumbled over these while looking for FOSS Apps on F-Droid and if possible I would rather use these than anything proprietary. DSub is of course an alternative, but also gave me trouble at the start (but no crashes).

In case of Subtracks the crash is consistently reproducible and will crash the server as well as the client. After opening Subtracks a few times (or navigating quickly enough to a submenu) I'm able to queue music and listen to it without further issues. The following log line pops up whenever the server process crashes:

[2022-May-17 11:03:13.572] 1 - [error] - [API_SUBSONIC] Error while processing request 'getCoverArt', params = [{c=subtracks}, {id=-1}, {p=*REDACTED*}, {size=256}, {u=REDACTED}, {v=1.13.0}, ], code = 0, msg = 'Parameter 'id': bad value'
172.18.0.4 - - [2022-May-17 11:03:13.573] "HEAD /rest/getCoverArt.view?u=REDACTED&p=REDACTED&v=1.13.0&c=subtracks&id=-1&size=256 HTTP/1.1" 200 174
[2022-May-17 11:03:15.652] 1 - [error] - [API_SUBSONIC] Error while processing request 'getCoverArt', params = [{c=subtracks}, {id=-1}, {p=*REDACTED*}, {size=256}, {u=REDACTED}, {v=1.13.0}, ], code = 0, msg = 'Parameter 'id': bad value'
172.18.0.4 - - [2022-May-17 11:03:15.652] "HEAD /rest/getCoverArt.view?u=REDACTED&p=REDACTED&v=1.13.0&c=subtracks&id=-1&size=256 HTTP/1.1" 200 174
172.18.0.4 - - [2022-May-17 11:03:19.950] "GET /rest/getAlbumList2.view?u=REDACTED&p=REDACTED&v=1.13.0&c=subtracks&size=300&offset=0&type=alphabeticalByArtist HTTP/1.1" 200 59489
terminate called after throwing an instance of 'LmsException'
  what():  Node already has a value

The same happens with Audinaut, although here at least the client handles the error and does not crash itself:

172.18.0.4 - - [2022-May-17 11:08:47.453] "GET /rest/getUser.view?u=REDACTED&p=REDACTED&v=1.13.0&c=Audinaut&username=REDACTED HTTP/1.1" 200 394
terminate called after throwing an instance of 'LmsException'
  what():  Node already has a value

I mainly wanted to use Subtracks, because out of all the FOSS Apps it showed the most promise of working smoothly with LMS. DSub is listed as compatible and tested, but gave me trouble initially as well. I've since been able to get it to work, but I've not spent tons of time playing around with it.

If you're not going to support Subtracks that's fine by me, but the error message seems like something that should be easy to find and figure out.

epoupon commented 2 years ago

Hi! Thanks for reporting this, it looks like a regression of #184. I managed to reproduce it locally, so I guess it should be not that difficult to fix this.

epoupon commented 2 years ago

Ok I have fixed this but I find subtracks is very laggy (lot of freezes in the UI when browsing albums for example) Is that the case also for you?

rluetzner commented 2 years ago

I've observed something similar, although at the time I thought that might be related to a slow response from my network. If I find the time I'll look into this more closely and report back. Thanks for looking into and fixing this. 😃

Sahnvour commented 2 years ago

@epoupon Thanks for the fix, I have the same issue with Ultrasonic. Any plans of releasing a new version (or a hotfix) soon ?

epoupon commented 2 years ago

Hi! I am not far from finishing #193, I think/hope it should be a matter of days now.

rluetzner commented 2 years ago

Thank you. It's working as expected now.

I'm not noticing any major UI slowdowns with Subtracks, although scrolling through a huge library requires a lot of requests, i.e. there's no predictive fetching of artists or albums, instead the next page seems to be loaded when I've reached the end of the last. I can live with that.

I did have some trouble with the update though as the new Docker container did not load my SQLite DB correctly. Everything works fine now after I've deleted the DB and started from scratch. I would open a new ticket, but couldn't find any hints in the logs. The container just kept restarting. I was also not attached to any of the metadata, so it's no trouble for me.


Edit: it's most likely the same issue as #228 .

epoupon commented 2 years ago

Yes indeed, sorry for that. By recreating the the DB have a workaround for the scan issue (but the bug is still here... working on it)