icefields / Power-Ampache-2

second version of my popular ampache Android app
GNU General Public License v3.0
47 stars 2 forks source link

[Bug] Array error when loading smart playlist #76

Closed stebe closed 3 months ago

stebe commented 3 months ago

I'm currently testing PA2 and so far I'm liking it as a replacement to DSub to access my Ampache server on my phone.

When I a load large playlist, in this case a smart playlist of 600 songs I get the eror "For input string: "Array". I would like to download the songs for offline use. The download button does not start a download after this error shows, it will on smaller playlists. The play button does work. Here are two screenshots with the error message and the debugging output.

Screenshot_20240403_132304_Power Ampache 2

Screenshot_20240403_134034_Power Ampache 2

I'm currently running Ampache 6 with the patch6 repo. PA2 is 0.40-rc1 (40) - DB: 80

icefields commented 3 months ago

Hello, thanks for using Power Ampache 2 and thanks for the bug report. It looks like some (maybe malformed) data is not getting parsed properly. I can see the method in question is getSongsFromPlaylist(). I will work on putting some safety nets during the data parsing, expect a tentative patch included in the next release (tomorrow probably). I already changed the way large playlists are loaded, in the next release it will be more smooth. To be clear, when you say The play button does work. do you mean following this bug or it doesn't work at all anywhere in the app? If the first case is true, I think I already know where to look.

stebe commented 3 months ago

The songs that are loaded do play fine. Just the download button doesn't seem to start any download when there is that error. I do have anonymous debug logging enabled. I wonder if you get those.

Looking forward to the next release. Each RC release shows a lot of improvement.

icefields commented 3 months ago

Ok cool, thanks, I think I know where to look for the play button issue, and I know the general function where that error happens. The stack trace from the remote debug log hopefully will give me a more precise indication of where the error is. This said, I was going to ask you to enable anonymous debugging, but the server I'm using to log the errors is currently down. I'll let you know when it's back up. PS. Thanks for acknowledging all the work that goes into this app :)

icefields commented 3 months ago

it's back up, if you try again I'll get the error remotely. thanks

icefields commented 3 months ago

I just uploaded a new release on Github, added some safety nets in the parsing, and disabled the download button while the playlist is loading. I didn't take into account huge playlists, like 500+ songs, in the initial UX, thanks for the bug report. Let me know if your problem persists.

stebe commented 3 months ago

This is working great for me now with the latest release.