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

Spotify Connect fails #576

Open
jakubstrama opened this issue Sep 12, 2024 · 10 comments
Open

Spotify Connect fails #576

jakubstrama opened this issue Sep 12, 2024 · 10 comments

Comments

@jakubstrama
Copy link

Describe the bug
Spotify Connect does not work anymore

HiFiBerryOS version
20230404

HiFiBerry sound card
DAC2 HD

To Reproduce
Steps to reproduce the behaviour:

  1. Open any Spotify client
  2. try to connect to Hifiberry via Spotify Connect
  3. Status displays connecting
  4. Log in via ssh to linux.
  5. run "systemctl status spotify.service"
  6. It displays : hifiberry vollibrespot[1248]: [Vollibrespot] : Connecting to AP "ap-gew4.spotify.com:443"

Expected behaviour
It should be possible to connect via Spotify Connect

Browser (if applicable)

  • MacOs Spotify app
  • iOS Spotify app

Additional context
This issue on librespot indicates, that Spotify does not support authentication via username/password anymore. Maybe it is somehow related.
librespot/issues/1308

@rum0s
Copy link

rum0s commented Sep 12, 2024

I have the same issue. Switched to spotifyd for now.

@jakubstrama
Copy link
Author

spotifyd

Do you run it alongside hifiberry-os on RaspberryPi? If so, would you share any details?

@rum0s
Copy link

rum0s commented Sep 12, 2024

spotifyd

Do you run it alongside hifiberry-os on RaspberryPi? If so, would you share any details?

Yes. I disabled spotify connect as described in the blog and activated spotifyd via extensions. Afterwards I entered my credentials.

@gjvg56
Copy link

gjvg56 commented Sep 13, 2024

I also have this problem with SpotifyConnect. For me it is under an older version of HifiberryOS . I'm afraid to change to HifiBerry64 where I could use SpotifyD. Or should I try this ?

@rum0s
Copy link

rum0s commented Sep 13, 2024

I also have this problem with SpotifyConnect. For me it is under an older version of HifiberryOS . I'm afraid to change to HifiBerry64 where I could use SpotifyD. Or should I try this ?

This is what I did. I upgraded to HifiberryOS64 from a older version from 2023. Just use a second SD card and give it a try.

@gjvg56
Copy link

gjvg56 commented Sep 13, 2024

This is what I did. I upgraded to HifiberryOS64 from a older version from 2023. Just use a second SD card and give it a try.

Works like a charm. At first it didnt work, cos in HifyberryOS64 I logged in with spotify-credentials..not needed for the Deamon !!

@diederikdq
Copy link

diederikdq commented Sep 13, 2024

Hi
This is discussed here https://support.hifiberry.com/hc/en-us/community/posts/21348779832605-Spotify-Connect-doesn-t-work-anymore-HifiberryOS-20230404?page=1. Chances are your issue will most likely have to do with the /etc/hosts file where ap-gew4.spotify.com is set to resolve to 104.199.65.124 . But that IP won't work.

So either comment out the line:
nano /etc/hosts and change 104.199.65.124 ap-gew4.spotify.com into #104.199.65.124 ap-gew4.spotify.com
OR
fix it via the code where it got set.
nano /usr/lib/systemd/system/spotify.service and remove the line ExecStartPre=/opt/hifiberry/bin/set-host-ip ap-gew4.spotify.com 104.199.65.124
then remove the current wrong resolved host by nano /etc/hosts and remove line 104.199.65.124 ap-gew4.spotify.com
then reboot.

Repo wise, th is solved here: #577 but it will be for the 64 version I guess.

@maxbundscherer
Copy link

maxbundscherer commented Sep 15, 2024

Hi This is discussed here https://support.hifiberry.com/hc/en-us/community/posts/21348779832605-Spotify-Connect-doesn-t-work-anymore-HifiberryOS-20230404?page=1. Chances are your issue will most likely have to do with the /etc/hosts file where ap-gew4.spotify.com is set to resolve to 104.199.65.124 . But that IP won't work.

So either comment out the line: nano /etc/hosts and change 104.199.65.124 ap-gew4.spotify.com into #104.199.65.124 ap-gew4.spotify.com OR fix it via the code where it got set. nano /usr/lib/systemd/system/spotify.service and remove the line ExecStartPre=/opt/hifiberry/bin/set-host-ip ap-gew4.spotify.com 104.199.65.124 then remove the current wrong resolved host by nano /etc/hosts and remove line 104.199.65.124 ap-gew4.spotify.com then reboot.

Repo wise, th is solved here: #577 but it will be for the 64 version I guess.

This manual fix worked for me. Now I can use Spotify Daemon again. I have a Raspberry Pi 3 and have updated to the new HifiBerryOS-64 Alpha. Spotify apparently no longer works with older versions of HifiBerryOS. This should be taken into account for further updates.

Unfortunately, the Spotify Connect doesn't work, so I can't establish a local connection.

Update: Sometimes Spotify Connect also works now.

@hyperbart
Copy link

Thank you @diederikdq .
I came here after 2 hours of Googling and fumbling with Spotify connect not working, thinking it was an issue on my part because I had a switch of ISP last week.

Removed the set IP from the service unit file and from the hosts file, everything works again.

And now I am also aware a new version of HifiberryOS is coming up and this explains why the version I was running didn't get any updates anymore. What a night :) .

@jakubstrama
Copy link
Author

Hi This is discussed here https://support.hifiberry.com/hc/en-us/community/posts/21348779832605-Spotify-Connect-doesn-t-work-anymore-HifiberryOS-20230404?page=1. Chances are your issue will most likely have to do with the /etc/hosts file where ap-gew4.spotify.com is set to resolve to 104.199.65.124 . But that IP won't work.

So either comment out the line: nano /etc/hosts and change 104.199.65.124 ap-gew4.spotify.com into #104.199.65.124 ap-gew4.spotify.com OR fix it via the code where it got set. nano /usr/lib/systemd/system/spotify.service and remove the line ExecStartPre=/opt/hifiberry/bin/set-host-ip ap-gew4.spotify.com 104.199.65.124 then remove the current wrong resolved host by nano /etc/hosts and remove line 104.199.65.124 ap-gew4.spotify.com then reboot.

Repo wise, th is solved here: #577 but it will be for the 64 version I guess.

This indeed solved this issue. Thanks iederikdq.

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

7 participants