Rigellute / spotify-tui

Spotify for the terminal written in Rust 🚀
MIT License
17.33k stars 518 forks source link

no device is found #310

Closed verajosemanuel closed 4 years ago

verajosemanuel commented 4 years ago

installed spotifyd and spt. run spotifyd

 ps -ef | grep spotify
jose     11868     1  0 12:40 ?        00:00:00 spotifyd
jose     11885 11656  0 12:40 pts/4    00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn spotify

run spt (installed via snap)

2020-02-24_12-42

Rigellute commented 4 years ago

Could be that you've logged in to a different account using spotifyd compared to the account used to create the client credientials for spotify-tui?

verajosemanuel commented 4 years ago

Nop

er0k commented 4 years ago

I have the same issue on debian buster

$ uname -srv
Linux 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26)

$ spotifyd --version
spotifyd 0.2.24

$ spt --version
spotify-tui 0.15.0

I get "No devices found" in spotify-tui.

However, if I start spotifyd and then use the Spotify client on my phone, the spotifyd device shows in the Android client. Once I switch to the spotifyd device with the Android client, the spotifyd device appears in spotify-tui and I can use it normally. So, it seems like there may be an issue with autodiscovery between spotifyd and spotify-tui?

Rigellute commented 4 years ago

Hmm... spotify-tui calls the devices endpoint from the spotify api and displays that list.

Is it possible that the spotifyd client is not active when spotify-tui goes to this devices screen? We could implement some polling on that endpoint (currently the request is only made when that screen is first shown).

Spinnerthing commented 4 years ago

I wonder if the issue is related to spotifyd, I have been having issues with spotifyd not being viewable as a device with either the spotify web client or spt, but if I use the official spotify client on linux it can see spotifyd device and once that has seen it then spotifyd is visible to both the web client and spt.

pablodz commented 4 years ago

You need a spotify client open, maybe your phone, TV or other device. Premium is necessary.

Spinnerthing commented 4 years ago

Actually for me it was a fail regarding config for spotifyd, it was in discovery mode because the username/password was not set. (Because it was not reading the conf file where I'd put it due to a typo)

Spinnerthing commented 4 years ago

@er0k your issue sounds like a config fail in spotifyd, when it doesn't have a valid username/password then it has a discovery mode which needs an official client to make it then become discoverable to spotify tui and even the web client.

nachocarballeda commented 4 years ago

You need a spotify client open, maybe your phone, TV or other device. Premium is necessary.

I solve the same issue with this reply :¬|

Rigellute commented 4 years ago

Closing as @ZurMaD and @nachocarballeda are correct. Premium is necessary to control playback

breuerfelix commented 4 years ago

same issue here.
i have the spotifyd daemon run at startup as a system service.

when i start spotify tui right after system start it is able to detect the device. if i wanna hear music some hours later it is not able to detect my spotifyd again even though it is running fine. i can start listening on that via smartphone. AFTER i hit start on the smartphone it shows up when pressing d again on spotify tui.

Seems like some idling problem to me. any advices ?

datkush420 commented 4 years ago

I'm having the same issue as outlined above by @breuerfelix. The devices menu "d" is empty. If I open spotify on my phone and select my computer, go back to terminal and hit "d" again, the list populates and I can play music.

breuerfelix commented 4 years ago

@Rigellute maybe reopen this issue again ? :)

Spinnerthing commented 4 years ago

@breuerfelix I don't think these are issues with spotify-tui but spotifyd, @datkush420 issue sounds more like a config issue with spotifyd going in to discovery mode.

For you @breuerfelix maybe try open a bug report with spotifyd about it not being discoverable after a while of inactivity. When I had my issues I found a similar sort of problem was being discussed there too.

breuerfelix commented 4 years ago

@Spinnerthing i don't think the problem is spotifyd not being discoverable.
My Smartphone (fresh start or start from idle) is doing really fine with discovering the daemon on my computer :)

Spinnerthing commented 4 years ago

@breuerfelix interesting to hear, maybe post a new bug report with that all of that relevant information if you can't find another bug relating to it? This issue people experienced in this bug report, me included, before was not a bug.

datkush420 commented 4 years ago

I can open the official Spotify client on any device (tablets, phones, laptops, android, ios, mac, windows, linux, etc.) and immediately see spotifyd named "rhArchLinux". Spotify-tui is the only client that can't see it. I don't see how this is an issue with spotifyd when spotify-tui is the only client having trouble seeing it.

--EDIT-- it was the spotityd config after all. The wiki said to specify an audio device to stream audio to "device = alsa_audio_device" which I had set as "pulse" but spotifyd was giving a panic "pulseaudio sink does not support specifying a device name". As soon as I removed that line it worked immediately.

Thanks for the help :)

Spinnerthing commented 4 years ago

@datkush420 I am glad to hear it's resolved. The discovery mode of spotifyd does easily cause confusion with spotify-tui.

marcelbuesing commented 4 years ago

Quote from spotify API docs:

Connect Web API relies on local network connections to discover and interact with some devices.

For example, when:

As a result, some devices that appear in the Connect picker within the Spotify application may not always be visible or available on the Connect Web API Endpoints.

https://developer.spotify.com/documentation/web-api/guides/using-connect-web-api/

Is there some way to programmatically do the same as the Spotify clients do for network device discovery, I assume it's something related to mdns?

UdittLamba commented 3 years ago

You need a spotify client open, maybe your phone, TV or other device. Premium is necessary.

that's what spotifyd is for...

dxtr85 commented 2 years ago

I have both daemon and spotify-tui built from source. TUI does not detect daemon, I can not even connect from my phone (daemon is seen from my phone).

dxtr@W540:~/projects/spotifyd$ ./target/release/spotifyd --version spotifyd 0.3.3 dxtr@W540:~/projects/spotifyd$ ../spotify-tui/target/release/spt --version spotify-tui 0.25.0

TornaxO7 commented 2 years ago

You need a spotify client open, maybe your phone, TV or other device. Premium is necessary.

This should be added to the README in my opinion or I was just blind.

Anyways, is it possible to hear music without having the spotify-client running?

mirachh commented 7 months ago

Same problem. Any solution?

TornaxO7 commented 7 months ago

@mirachh I highly recommend spotify-player since it's easier to setup and actively maintained.

mirachh commented 7 months ago

Thanks...

jaketae commented 7 months ago

Here's something that worked for me on macOS.

  1. Install spotifyd and spotify-tui
  2. Set up spotifyd (documentation)
  3. Start spotifyd via brew services start spotifyd
  4. Run spt; spotifyd should now show up as an available device