mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #1456] CLI Application freezes when trying to connect #654
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#654
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Timboooh on GitHub (Jan 24, 2025).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/1456
Description
I'm using the example command listed in the usage section of the README.
Librespot starts up as usual and is detected properly in the Spotify Desktop Client.
When I try to connect the librespot application freezes, and can't be terminated using the CTRL+C shortcut.
I've tried it on my home network and also on LTE using an Android Hotspot.
Version
How to reproduce
librespot --verbose --name librespotLog
Host (what you are running
librespoton):Thanks in advance for your help. Please ask if you need more information.
@photovoltex commented on GitHub (Jan 24, 2025):
Seems like it's getting stuck while opening the TCP connection to the access point. I suppose you can reproduce the issue reliable?
This sounds a bit similar to #1437. Could you check your cpu usage when you run into the issue?
An just some possible ways to get it working, which don't solve the underlying issue:
oauthinstead ofzeroconf(see https://github.com/librespot-org/librespot/wiki/Options#oauth)devversion@Timboooh commented on GitHub (Jan 24, 2025):
I think you're right thinking it's TCP:
CPU of librespot stays low (around min. 0.1% to max. 1.3%) when idle, shortly jumps to around 2.5% when connecting and then quickly goes back down to the same usage as the idle state. RAM usage stays low aswell.
Enabling OAuth doesn't seem to work (oauth.log). Using this method the player also doesn't show up in the spotify clients.
Using Dev branch doesn't seem to make a difference (tried both with and without oauth) (dev.log)
@kingosticks commented on GitHub (Jan 24, 2025):
Are you sure you don't have a firewall blocking port 4070?
@Timboooh commented on GitHub (Jan 24, 2025):
I feel stupid now, I was connected though my company's VPN which was probably blocking the TCP connections.
Disconnecting it seems to work
Sorry for taking up your time 🙃 , closing this issue
@kingosticks commented on GitHub (Jan 24, 2025):
I used to have this exact same problem when I forgot I was connected through a VPN. And I sorted it with https://github.com/librespot-org/librespot/pull/1350 but that's weirdly not helping you.
edit: maybe the connection itself is established OK but then the Spotify handshake communication is blocked - we've no timeout for that. We could add logging, or move the timeout to also include the handshake. These things should be made easier to debug.