warwickh / plugin.audio.subsonic

Kodi plugin to stream music from Subsonic.
MIT License
61 stars 13 forks source link

Connection Error on Madsonic #13

Closed tomtom30 closed 1 year ago

tomtom30 commented 7 years ago

Hi, I'am using kodi 17 and madsonic 6.2.9xxx with https connection and self signed certificate but i have connection error on launch. In server log I have login failed bug I'am sure that my user/pass is good. I saw that the rest api are not really the same so i think the bug is here ( xml/json i think) Can you help ?

PS : Je suis francais si ca peut simplifier les choses :)

warwickh commented 2 years ago

Any Madsonic users that could confirm this or help to resolve?

jcharaoui commented 2 years ago

@warwickh I use Airsonic and have the same problem. I can help debug.

saggy2 commented 2 years ago

I am on subsonic and I have the same problem. My guess is that this plugin no more works!

warwickh commented 2 years ago

Which version of the plugin are you using? The Matrix version is definitely working. I haven't done any work on the Leia version but I can probably help solve your issues. Could you please post the relevant part of your logs.

saggy2 commented 2 years ago

I am on kodi 19.3. tried on windows and Nvidia Shield both, same issue. Its connection error always. Server works fine with DSUB, subsonic app etc. otherwise. Tell me how to find the logs you want. I am on windows right now.

warwickh commented 2 years ago

Could you please add advancedsettings.xml with the following to your userdata folder and see what the logs are saying (log is in .kodi/temp).

`

1

`

warwickh commented 2 years ago

Userdata is in %APPDATA%\Kodi\userdata for Windows Log is in %APPDATA%\Kodi\kodi.log

saggy2 commented 2 years ago

here is the log. ( only one download allowed) https://tinyurl.com/y9qdko37

saggy2 commented 2 years ago

were you able to download the log? sorry just curious

warwickh commented 2 years ago

Yes, I downloaded the log, but it doesn't have the debug information.
Disabled debug logging due to GUI setting Could you check the debug settings inside Kodi and and try again.

warwickh commented 2 years ago

Maybe could you give me some other information about your music server, and what settings you have used in the plugin.

saggy2 commented 2 years ago

seems debug on on now- see this one: https://tinyurl.com/y7zz2h8x

saggy2 commented 2 years ago

I have Sonos and DLNA disabled on my subsonic server. Server version is 6.1.6 (latest). plugin has standard server/port/user/pass that is known to work and also using defaults that were on the demo server. Demo server always works with you plugin interestingly. settings.xml is below:

(I also tried version 16)

settings version="2" setting id="subsonic_url">https://subsonic.xxxx.com setting id="port">4443 setting id="username">admin setting id="password">xxxxxx setting id="albums_per_page" default="true">50 setting id="tracks_per_page" default="true">100 setting id="download_folder" default="true" /> setting id="transcode_format_streaming" default="true" /> setting id="bitrate_streaming" default="true">0 setting id="apiversion" default="true">1.15.0 setting id="insecure">true setting id="useget">true setting id="legacyauth">true setting id="cachetime" default="true">15 Settings

saggy2 commented 2 years ago

Hi @warwickh any luck?

warwickh commented 2 years ago

I still don't have a good debug log containing any useful info. I'm setting up a test environment to figure out what's happening with your logging. It's worth checking your certificate on your Subsonic server. Kodi won't accept a cert with the wrong domain name. See https://github.com/warwickh/plugin.audio.subsonic/issues/27 While you're waiting you could try connecting over http and see if you get a different result.

saggy2 commented 2 years ago

Hi @warwickh Thank you for the reply. I already tried the HTTP connection and that too is not working. I made sure "allow self signed cert" was enabled (for HTTPS). However no luck at all, hence I dont think cert is the issue here.

jcharaoui commented 2 years ago

Yeah for the record, when I tested, I had a valid (Let's Encrypt) certificate on the HTTPS endpoint.

warwickh commented 2 years ago

OK, I've created a new branch so I can add some extra logging. Could you please remove your addons/plugin.audio.subsonic folder as well as your userdata/addon_data/plugin.audio.subsonic folder then from the addons folder run git clone -b troubleshoot https://github.com/warwickh/plugin.audio.subsonic.git and then re-add your url and login details Once I make some change, you will just need to go to the addons/plugin.audio.subsonic folder and type git pull to update

saggy2 commented 2 years ago

ok I have done all this and ready for your changes

saggy2 commented 2 years ago

So I just discovered that your plugin works for HTTP settings if I completely disable the HTTPS (port 4443) listening on the server. Also noticed that even if I login using HTTP on browser, server forcefully redirects me to HTTPS port. My guess is this may be causing issues with your plugin.

warwickh commented 2 years ago

OK, could you please do a git pull to get the latest changes and create a new log please.

saggy2 commented 2 years ago

ok . here it is. please note this is with 1) HTTPS disabled on server, 2) debug logging enabled. https://tinyurl.com/y7rsj8ol just so you know, kodi plugin stopped working after the git pull.

warwickh commented 2 years ago

Sorry you were a bit too quick for me and I used a deprecated code. Could you please git pull again and send another log. Thanks.

saggy2 commented 2 years ago

done. plugin is now working. please note server still has https completely disabled https://tinyurl.com/yb2t4wny

warwickh commented 2 years ago

OK thanks. Could you try with https enabled now.

saggy2 commented 2 years ago

Here it is https://tinyurl.com/y7l3w6o9 FYI plugin has stopped working as soon as HTTPS listening was enabled on the server.

saggy2 commented 2 years ago

forgot to mention that when I enable HTTPS on server and switch kodi plugin to HTTPS with self signed certificate, now the library loads however trying to play a file crashes my kodi

warwickh commented 2 years ago

can you connect on http:// port 4040 from a web browser? Could you please send the log of the crash.

warwickh commented 2 years ago

Maybe do a git pull first

saggy2 commented 2 years ago

done. kodi loads library but crashes on playing. Errors seem to tell it needs SSL certificate like you said earlier https://tinyurl.com/yas3xcnq

warwickh commented 2 years ago

OK, so this is probably the limitation of kodi that I mentioned earlier. The plugin can work around it, but Kodi doesn't allow this to be switched off. You will need to make sure that the domain in the SSL cert matches the server name in your kodi config. A host file entry will work to resolve this if you aren't in a position to change the cert.

saggy2 commented 2 years ago

its late night here in EAST coast. I am going to setup an LB/letsencrypt tomorrow and will try again then and update here.

warwickh commented 2 years ago

No problem. I've made a change you could test with your current config before changing anything. Just do a git pull to try it.

saggy2 commented 2 years ago

Sorry was not feeling well yesterday. I tried with git pull on the branch and no change - it is able to browse the server library but unable to play anything on HTTPS while the 1) server has HTTPS enabled and client has 1) accept self signed cert enabled . This is all without proper HTTPS cert/url. I can share the log when you are online. I have yet to test with my server having proper cert.

saggy2 commented 2 years ago

Just FYI- @warwickh You were right all along. proper SSL cert is a must else kodi plugin wont work. once I setup Traefik/letsencrypt cert, everything was a breeze. Both on android shield and windows.

warwickh commented 2 years ago

Hey, that's great. Thanks for the update.