halpz / HalpoPlayer

MIT License
30 stars 4 forks source link

[ISSUE] Unable to make any Requests to Navidrome Server #22

Open h0rzn opened 8 months ago

h0rzn commented 8 months ago

Thank you for sharing the source code for this app :)

I am unable to get any data from my Navidrome server: After putting in my credentials and server info, nothing seems to happen. If i swipe down in Albums/Artists-View nothing happens either.

Navidrome: 0.48.0(af5c2b5a) running in Docker

Log output of Navidrome

time="2024-03-21T21:11:17Z" level=warning msg="Missing required parameter \"v\"" requestId=ea2b13e48d30/SbyMIoDCe5-457285
time="2024-03-21T21:11:17Z" level=warning msg="API: Failed response" error=10 message="Missing required parameter \"v\"" requestId=ea2b13e48d30/SbyMIoDCe5-457285

Subsonic API Documentation describes v as required:

The protocol version implemented by the client, i.e., the version of the subsonic-rest-api.xsd schema used (see below).

Is my Navidrome outdated/broken or is this an App Issue? The App looks rather clean so far, unfortunately I was not able to sync and play any music so far.

h0rzn commented 8 months ago

Param is actually being set:

https://github.com/halpz/HalpoPlayer/blob/12a5ea4df90e8fed3750e840a8442d65e5c13191/HalpoPlayer/Network/SubsonicClient.swift#L15-L20

halpz commented 8 months ago

hmm it's strange, the version should be sent with the request, are you able to update your navidrome container to see if that solves it?

h0rzn commented 8 months ago

hmm it's strange, the version should be sent with the request, are you able to update your navidrome container to see if that solves it?

Upgraded to latest docker image with Navidrome 0.51.1 (6d253225). Issue persists. Reverse-Proxy tells me v-Param is either not being sent or doesn't reach Proxy: [...] RequestURI":"/rest/ping.view?\u0026f=json\u0026u=XXX\u0026p=XXX","TLS":null}" [...] (redacted) Bypassing Traefik and directly connecting to Navidrome-Container yields the same error.

Installed a docker Airsonic-Server and had the same problem. Amperfy worked with both servers/instances :(

It's no problem to me if you want to close this issue, as I seem to be the only one having it and I have no experience in Swift at all, so I cannot investigate this issue myself :( GL with your project though!

h0rzn commented 5 months ago

Found the problem! Certain special characters seemed to be the issue. Tested it out with a basic alphanumeric password and everything worked perfectly fine.

halpz commented 5 months ago

Ahh okay , I'll have a look and see if I can fix the encoding for those instances

halpz commented 5 months ago

What sort of characters makes it fail ?

h0rzn commented 5 months ago

Problem appeared with #, but $ for example worked just fine.

Hex encoding the password and prepending enc: allows a password with #. [...]/rest/ping.view?login&f=json&u=halpo-user&p=enc:31323323&v=1.16.1[...] (password is "123#")

...Off topic, but are PRs welcome?