mzedd / LMS-ARD-Audiothek-Plugin

GNU General Public License v3.0
5 stars 1 forks source link

browsing plugins folder structure through LMS frontend results in reference error in LMS server.log #7

Closed bungh0l10 closed 3 years ago

bungh0l10 commented 3 years ago

Hi,

I received following error in LMS server.log while browsing through your plugins folders using LMS frontend:

[21-04-14 05:32:57.9920] Slim::Networking::IO::Select::__ANON__ (130) Error: Select task failed calling Slim::Web::HTTP::processHTTP: Not a SCALAR reference at /usr/share/perl5/Slim/Web/HTTP.pm line 1825.
; fh=Slim::Web::HTTP::ClientConn=GLOB(0x8a55c18)

This only pops up in LMS server.log while using the LMS frontend. Not while using squeezebox hardware itself nor iPeng9.

mzedd commented 3 years ago

Hi bungh0l10,

can you tell me in which folder this happens? Or is this shown for all folders?

bungh0l10 commented 3 years ago

Hi mzedd,

it unfortunately applies to all folders. It doesn't break any functionality as far as I can see but the error pops up within server log.

mzedd commented 3 years ago

Hmm, i can't see this error popping up with the latest release from the 3rd party repo on my LMS. Could you provide the whole log file? If possible run your LMS with the option "--debug plugin.ardaudiothek=info".

bungh0l10 commented 3 years ago

server.log

mzedd commented 3 years ago

Thank you :) I think the issue is related to LMS v8.2. My testing server still runs on v8.1.1. I will investigate this.

bungh0l10 commented 3 years ago

Sure, THANK YOU for providing this great plugin to the community! Keep it up.

mzedd commented 3 years ago

I cannot reproduce this error on LMS v8.2 (i used logitechmediaserver-git package from the AUR for testing). Since it is not interfering with the functioning of the plugin my strategy now is to wait for an official release of v8.2 and see if the error message pops on other users setups. Maybe this is related to your system, maybe not. I cannot tell right now.

bungh0l10 commented 3 years ago

Fair enough.

Just FYI. I updated to latest 8.2 nightly and your plugin updated to 1.1.0 today. Same error appears now twice at a time within serverlog.

edit : I was able to reproduce error on two different rpis now, running latest and up to date RpiOS

mherger commented 3 years ago

Hi @bungh0l10 - please enable logging for network.http to see what is being called when this happens.

Does the issue depend on a particular player? Or whether there's a player or not?

bungh0l10 commented 3 years ago

server.log

Hi @mherger ,

I've enabled debug on network.http and plugin.ardaudiothek and attached server.log. The issue occurs regardless of the selected player, tried with SBR(s), Boom, Touch.

mherger commented 3 years ago

@mzedd I was able to reproduce the issue and found the culprit: on https://github.com/mzedd/LMS-ARD-Audiothek-Plugin/blob/5569a05790bf07f417eb40b0be74332722268510/ARDAudiothek/Plugin.pm#L122 you'll have to have an empty return value (return;). The web server is expecting an empty value when we're dealing with an async response. But as Perl does an implicit return of the last statement's result, this would be the result of calling homescreen() (which again only does an implicit return). By adding return; at the above line the message would go away.

bungh0l10 commented 3 years ago

Cool, I just gave it a try and edited my local Plugin.pm. Works like a charm, no further error messages. Thank you @mherger

mzedd commented 3 years ago

Hi, totally forgot about this issue. Just stumbled over it and saw the report of @mherger. Thank you for that. I already provided a small fix which will be included into the next official release.