Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: TLS versions above 1.2 not supported by shipped libmpv-2 #520

Open
keeakita opened this issue Jan 3, 2025 · 10 comments
Open

Windows: TLS versions above 1.2 not supported by shipped libmpv-2 #520

keeakita opened this issue Jan 3, 2025 · 10 comments

Comments

@keeakita
Copy link

keeakita commented Jan 3, 2025

Supersonic: v0.13.2
Windows: 11 23H2 22631.4602
Navidrome: 0.54.3 (734eb30a)
I use supersonic on a few different platforms with my own Navidrome instance. It works just fine on Linux and MacOS, but for some reason I'm unable to start playback on Windows 11. Pressing the play button will change the play icon to pause for a few seconds, but then it will revert to the play icon and no song will start.

What makes this even weirder is that I just tried the Navidrome demo server and playback works. I've verified that it's not related to file formats; I can play mp3s from the demo server but not my own server. I've also played around with selecting different engines in the output selector (sdl vs openal) and turning off server transcoding with no luck.

Is there any way I can collect logs or get more info? Launching the installed version from Powershell / cmd doesn't seem to be giving me any output.

@dweymouth
Copy link
Owner

Hmm, that is weird. My guess just based on the description here would be some kind of firewall issue. But unfortunately there isn't a way for you to get logs on Windows right now unless you build from source, because for some reason Windows doesn't allow a console to be attached to a program once it's "packaged" as a GUI app, and Supersonic logs to the console. I really need to set it up to log to a file instead on Windows. I'll ping you here once I've done that and you can test with the latest Github Actions build

@dweymouth
Copy link
Owner

I've added logging to a file for Windows. If you download and run the build here https://github.com/dweymouth/supersonic/actions/runs/12611691028 it should generate a supersonic.log file in its root config directory C:\Users\<yourname>\AppData\Roaming\supersonic\supersonic.log. If you can try to playback one of the songs from your server and see if there are any error messages logged, that would be helpful with debugging, since I haven't been able to reproduce this on my end (I can play songs from both Navidrome demo and my personal server on Windows)

@dweymouth dweymouth added the needs-info An issue that needs more information label Jan 4, 2025
@keeakita
Copy link
Author

keeakita commented Jan 5, 2025

Thanks for the work on this! Unfortunately it looks like the logs are missing playback info:

2025/01/04 16:51:24 Starting supersonic...
2025/01/04 16:51:24 Using config dir: C:\Users\taylo\AppData\Roaming\supersonic
2025/01/04 16:51:24 Using cache dir: C:\Users\taylo\AppData\Local\supersonic
2025/01/04 16:51:24 failed to load theme file "": open C:\Users\taylo\AppData\Roaming\supersonic\themes: The system cannot find the file specified.
2025/01/04 16:54:09 Running shutdown tasks...

I've been trying to avoid having to set up the dev env myself but I think that's probably the best course for now. Let me see if I can poke around there.

Also let me check if there's any logs on the server that might be interesting, since I haven't done that yet.

@keeakita
Copy link
Author

keeakita commented Jan 5, 2025

Oh, that's what's happening

reverse-proxy-1  | time="2025-01-05T01:02:14Z" level=debug msg="http: TLS handshake error from 172.18.0.1:35130: tls: client offered only unsupported versions: [303 302 301]"

What's really weird to me about this though: I'm able to connect to the server and populate metadata. How come there are two different TLS specs in use here?

@dweymouth
Copy link
Owner

MPV vs the Go http client I guess? The stream urls are passed directly to MPV for playback. Are you able to invoke mpv from the command line with one of the stream URLs?

@dweymouth
Copy link
Owner

I realized with some semi-recent refactoring, I stopped logging playback errors, so a commit is incoming to add them back

@dweymouth
Copy link
Owner

One possibility - maybe the version of libmpv-2.dll which is packaged with Supersonic is too old (admittedly it is old, I pulled it from a different project and haven't changed it in 2 years since I started Supersonic). If you're able to find an updated libmpv-2.dll or mpv-2.dll, possibly from mpv's sourceforge page(?) (rename to libmpv-2.dll if required) and drop it in, maybe it would solve it?

@keeakita
Copy link
Author

keeakita commented Jan 5, 2025

Oh, is that where it's from? I noticed that the windows build action is pulling a pretty recent version of openssl and mpv from mingw, is there a way we could just pull the dll from there? Should be at /mingw64/bin/libmpv-2.dll

Let me do a quick test

@dweymouth
Copy link
Owner

IIRC, the one from mingw isn't statically built, and depends on a few dozen other little DLLS, which are all present in the mingw installation, but would all need to be distributed together when packaging. Especially since portable mode is supported, having a single monolithic DLL was preferable.

@keeakita
Copy link
Author

keeakita commented Jan 5, 2025

Ok, so I've unblocked myself in the mean time by allowing TLS 1.2 on my Navidrome server and everything is working. When I have more time later I'm happy to try to take a stab at getting a new libmpv compiled, though I have to admit C toolchains on windows aren't my forte

@keeakita keeakita changed the title Can't start playback on Windows on one specific server Windows: TLS versions above 1.2 not supported by shipped libmpv-2 Jan 5, 2025
@dweymouth dweymouth added os:windows and removed needs-info An issue that needs more information labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants