Closed haelduksf closed 7 months ago
HttpError::500 would indicate a server side error.
AmpacheError::405 would indicate an API call is not implemented by Ampache. However, as the server version is sent with each request, the server should use the correct Ampache API version and there haven't been any changes on the side of SubMusic.
If you want me to check your server while debugging, you can send me a message through the 'Contact Developer' option on the Connect IQ app store page for SubMusic. Always happy to help!
I think I solved this one actually. While I was troubleshooting earlier, I synced some playlists from another server to see if they'd work. When I changed the config to point to my own server, I left those playlists selected. Once I deselected them, the sync started working. Might be worth checking to see if the playlist exists before attempting to sync it, but I guess if I'm the first one to run into this, it's not a common problem.
If the playlist is not available, Ampache should return a 404 not found. If that is not the case, there might be a server problem with the Ampache 6.2.1 version.
IIRC SubMusic will handle a 404 not found and continue to the next playlist.
https://github.com/memen45/SubMusic/blob/master/source%2FSync%2FPlaylistSync.mc#L93
Here 404 HttpError and 404 AmpacheError is handled. All other API or HTTP errors will lead to an aborted sync indeed.
Are you able to replicate the issue
If you are able to reproduce, we can create an issue at the Ampache repository to resolve the issue!
Thanks a lot for your feedback!
Sorry, busy week for me, but I'll try to run that test this weekend!
I was able to reproduce the AmpacheError::405 by creating a 1-song playlist, turning on sync for that playlist, syncing, deleting it, then syncing again.
Great! Then Ampache is returning an incorrect error. It should return 404.
Do you happen to have server logs available to see exactly which request is returning the 405?
I do have the logs but I don't see any 405s. I wonder if it's coming from some intermediate step. Is there an easy way for me to pull the debug log from my watch to get more details?
Are you sure you have the correct logs? Apache will return HTTP 200 with json content in which the error code is included. So if you only have access logs, you will indeed see only HTTP 200 responses.
the errors are something in the method.
it's catching an error
and then returning the error as 405
something for me to fix, not submusic
set with acf09d7d022401108d86df21043d52270ef2a3c3 to fix up those errors
I've put in optional debugging for the api handler which will break and throw exceptions in the classes and lines so it's easier to identify
https://github.com/ampache/ampache/commit/392b1869de27631ebee7234b913f6c3faeed5515
Closing this issue as it is addressed in Ampache/Ampache repository. Thanks for your feedback!
My setup: Ampache 6.2.1 (in a docker container) nginx https proxy Vivoactive 5
Server test stalls at 75%, screen showing "Inlog OK No podcasts" I'm able to pull playlists and list the songs in the playlists, but the sync always fails with "AmpacheError::405"
I've tried falling back to the subsonic API but that doesn't work either- I get HttpError::500
As far as I can tell, the server is working fine. I'm using DSub on my phone and haven't experienced any issues. I'm happy to share the server location & provide testing credentials via DM.