# Spotify login error: \<ErrorType.UNABLE\_TO\_CONTACT\_SERVER: 8\>

**URL:** <https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979>\
**Category:** Misc\
**Created:** [May 31, 2021, 1:52pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979 "2021-05-31T13:52:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![blacklight](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/blacklight/32/669_2.png) [@blacklight](https://discourse.mopidy.com/u/blacklight)\
**Post date:** [May 31, 2021, 1:52pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/1 "2021-05-31T13:52:42Z")

</div>

I’ve been experiencing connection issues to Spotify for the past 4 hours:

```auto
May 31 15:40:29 turing mopidy[11198]: ERROR 2021-05-31 15:40:29,545 [11198:SpotifyEventLoop] spotify.session
May 31 15:40:29 turing mopidy[11198]: Spotify login error: <ErrorType.UNABLE_TO_CONTACT_SERVER: 8>
May 31 15:40:29 turing mopidy[11198]: INFO 2021-05-31 15:40:29,859 [11198:SpotifyBackend-8] mopidy_spotify.web
May 31 15:40:29 turing mopidy[11198]: Logged into Spotify Web API as 1166720951

```

It seems that the connection through libspotify fails, but the one through the web API succeeds.

As a result, I can see the list of playlists in my MPD client but I can’t load nor play any of the items.

I have tried to refresh my Spotify client ID/secret - still no luck.

Requests to [auth.mopidy.com](http://auth.mopidy.com) succeed, and Spotify works both from the desktop and mobile apps.

Is anybody else experiencing similar issues? Could it be related to a temporary outage of some local Spotify backend used by libspotify?

---

<div class="post-metadata">

**Author:** ![01tot10](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/01tot10/32/1640_2.png) [@01tot10](https://discourse.mopidy.com/u/01tot10)\
**Post date:** [May 31, 2021, 4:27pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/2 "2021-05-31T16:27:53Z")

</div>

I’m also having same issues as of today afternoon. I’m hoping it’s nothing too critical going on with libspotify.

---

<div class="post-metadata">

**Author:** ![jjok](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/jjok/32/448_2.png) [@jjok](https://discourse.mopidy.com/u/jjok)\
**Post date:** [May 31, 2021, 5:32pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/3 "2021-05-31T17:32:58Z")

</div>

It seems this has happened before.

> [@Spotify login error: ErrorType.UNABLE\_TO\_CONTACT\_SERVER: 8](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/1400/8):
>
> I have the same problem lately. My credentials are ok, my credit card info as well, my Spotify client works normally. Mopidy-spotify used to work until some weeks ago, and all the sudden I get the “ErrorType.UNABLE\_TO\_CONTACT\_SERVER: 8” error. Is anyone else in that situation?

---

<div class="post-metadata">

**Author:** ![blacklight](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/blacklight/32/669_2.png) [@blacklight](https://discourse.mopidy.com/u/blacklight)\
**Post date:** [May 31, 2021, 7:39pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/4 "2021-05-31T19:39:14Z")

</div>

The issue seems solved now, I just had to restart a bunch of Mopidy instances that had dead Spotify sessions and everything worked again.

I’ve seen this problem in the past, it was usually related to short-lived Spotify outages. The things that spooked me this time have been both the duration (libspotify failed to connect for at least 6 hours) and the fact that in the previous occurrences the Spotify apps also had login/session issues, while this time everything worked fine on the app side.

---

<div class="post-metadata">

**Author:** ![blacklight](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/blacklight/32/669_2.png) [@blacklight](https://discourse.mopidy.com/u/blacklight)\
**Post date:** [June 23, 2021, 8:48am UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/5 "2021-06-23T08:48:17Z")

</div>

The issue is back today, and according to my Mopidy logs it’s already been going on for almost 3 hours.

Is anybody else also experiencing these issues? These connection errors seem to be more common lately and they last for longer. I’m not sure if it’s due to some changes on the Spotify infra side. @kingosticks @jodal is there anything that can be done on the Mopidy side (e.g. have a way to manage fallback streaming servers) or everything that happens inside of libspotify is a black box?

---

<div class="post-metadata">

**Author:** ![stormtroopa](https://avatars.discourse-cdn.com/v4/letter/s/e47c2d/32.png) [@stormtroopa](https://discourse.mopidy.com/u/stormtroopa)\
**Post date:** [June 23, 2021, 9:07am UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/6 "2021-06-23T09:07:58Z")

</div>

I am encountering the same issue right now. It started about 4 weeks ago. Every now and then it’s not possible to stream from spotify while all native spotify players seem to work.

---

<div class="post-metadata">

**Author:** ![01tot10](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/01tot10/32/1640_2.png) [@01tot10](https://discourse.mopidy.com/u/01tot10)\
**Post date:** [June 23, 2021, 1:14pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/7 "2021-06-23T13:14:13Z")

</div>

I’m having the same starting from around 4h ago, similarly as what @blacklight said. Let’s see…

---

<div class="post-metadata">

**Author:** ![blacklight](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/blacklight/32/669_2.png) [@blacklight](https://discourse.mopidy.com/u/blacklight)\
**Post date:** [June 23, 2021, 2:03pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/8 "2021-06-23T14:03:12Z")

</div>

Things are working again now - the outage lasted approximately 6 hours according to my application logs.

I have also reached out to the Spotify support for explanations, and they again replied with “libspotify has been unsupported since 2012, we won’t investigate issues on that end”.

Do we have a way to control which servers are used for streaming, and in case configure a fallback? If not, may it be worth to investigate a possible migration from libspotify to LibreSpot? Every time I see one of these errors lasting more than a couple of hours I come to believe that it’s the ultimate nail in the coffin for libspotify…

---

<div class="post-metadata">

**Author:** ![0xA2](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/0xa2/32/2071_2.png) [@0xA2](https://discourse.mopidy.com/u/0xA2)\
**Post date:** [June 23, 2021, 2:47pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/9 "2021-06-23T14:47:55Z")

</div>

Hm… I still have the same issue here. Not sure when the issue started (at least 1h ago).

Hoping that it’s a regional thing, and that I’ll get a fix soon too.

For now I appreciate the interoperability of mopidy, which lets me not be fully reliant on spotify. 🎧

---

<div class="post-metadata">

**Author:** ![Xyo](https://avatars.discourse-cdn.com/v4/letter/x/67e7ee/32.png) [@Xyo](https://discourse.mopidy.com/u/Xyo)\
**Post date:** [June 23, 2021, 3:04pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/10 "2021-06-23T15:04:30Z")

</div>

Hey!  
I also have the same issue. Isn’t it connected to the fact that [https://ap.spotify.com](https://ap.spotify.com) is not reachable?  
Or: is it reachable for you or not?

Regards,  
Xyo

---

<div class="post-metadata">

**Author:** ![schalk](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@schalk](https://discourse.mopidy.com/u/schalk)\
**Post date:** [June 23, 2021, 3:07pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/11 "2021-06-23T15:07:12Z")

</div>

> [@Xyo](#):
>
> [https://ap.spotify.com](https://ap.spotify.com)

Same issue for me, been down all day with same error. I also cannot connect to [https://ap.spotify.com](https://ap.spotify.com/) in a browser

---

<div class="post-metadata">

**Author:** ![fmarzocca](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/fmarzocca/32/1095_2.png) [@fmarzocca](https://discourse.mopidy.com/u/fmarzocca)\
**Post date:** [June 23, 2021, 4:38pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/12 "2021-06-23T16:38:32Z")

</div>

Same issue here in Italy, since 5 hours ago.

---

<div class="post-metadata">

**Author:** ![Tech-Geek97](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/tech-geek97/32/2072_2.png) [@Tech-Geek97](https://discourse.mopidy.com/u/Tech-Geek97)\
**Post date:** [June 23, 2021, 8:30pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/13 "2021-06-23T20:30:00Z")

</div>

I have been having the same issues since this morning. But strace seems to think that the plugin has been disabled due to missing keys in my mopidy.conf but this exact config worked yesterday.

---

<div class="post-metadata">

**Author:** ![blacklight](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/blacklight/32/669_2.png) [@blacklight](https://discourse.mopidy.com/u/blacklight)\
**Post date:** [June 23, 2021, 10:08pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/14 "2021-06-23T22:08:33Z")

</div>

[Following the advice of Spotify’s support](https://twitter.com/SpotifyCares/status/1407702922855698436), I have [opened an idea](https://community.spotify.com/t5/Idea-Submissions/Developer-Official-alternative-to-libspotify/idi-p/5226658) on their board to get an official alternative to libspotify (although today I have experimented for the first time with LibreSpot while mopidy-spotify was down and I’ve also found it a good alternative).

Please upvote the idea if you’re also interested.

---

<div class="post-metadata">

**Author:** ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)\
**Post date:** [June 23, 2021, 11:01pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/15 "2021-06-23T23:01:11Z")

</div>

Could you please share a link to the idea

---

<div class="post-metadata">

**Author:** ![blacklight](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/blacklight/32/669_2.png) [@blacklight](https://discourse.mopidy.com/u/blacklight)\
**Post date:** [June 23, 2021, 11:20pm UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/16 "2021-06-23T23:20:57Z")

</div>

[[Developer] Official alternative to libspotify - The Spotify Community](https://community.spotify.com/t5/Idea-Submissions/Developer-Official-alternative-to-libspotify/idi-p/5226658) (also linked in the previous comment)

---

<div class="post-metadata">

**Author:** ![roosemberth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/roosemberth/32/2073_2.png) [@roosemberth](https://discourse.mopidy.com/u/roosemberth)\
**Post date:** [June 24, 2021, 6:13am UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/17 "2021-06-24T06:13:43Z")

</div>

I have not been able to use spotify since yesterday (around the time of [this post](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/5)). [https://ap.spotify.com](https://ap.spotify.com) is also unrecheable to me (from Switzerland).

---

<div class="post-metadata">

**Author:** ![MWWorks](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/mwworks/32/2052_2.png) [@MWWorks](https://discourse.mopidy.com/u/MWWorks)\
**Post date:** [June 24, 2021, 7:28am UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/18 "2021-06-24T07:28:53Z")

</div>

Also reporting this issue - I’m getting the same error for almost 24 hours now, and still can’t connect. Is Spotify actually working for anyone? Just wondering if there is some variance, or if it’s now broken for everyone?

---

<div class="post-metadata">

**Author:** ![dragos240](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.mopidy.com/dragos240/32/2075_2.png) [@dragos240](https://discourse.mopidy.com/u/dragos240)\
**Post date:** [June 24, 2021, 7:49am UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/19 "2021-06-24T07:49:41Z")

</div>

Broken for me too. Oddly enough, I’m no longer getting the login error (login seems successful), but `Session must be logged in and online to load objects` appears when trying to load a playlist.

EDIT: I’ve found a solution for now, albeit a hacky one. `ap.spotify.com` is where `pyspotify` tries to connect to the API. Often, this will return an IP address that can’t be reached. What I did was use `dig ap.spotify.com` to get various IP addresses for that A record and ping each one until I got packets back. Once I did that, I modified `/etc/hosts` and manually set `ap.spotify.com` to that working IP address. Example entry:

```auto
104.154.126.229	ap.spotify.com

```

This has resolved my problem for now until Spotify fixes this on their end.

---

<div class="post-metadata">

**Author:** ![Xyo](https://avatars.discourse-cdn.com/v4/letter/x/67e7ee/32.png) [@Xyo](https://discourse.mopidy.com/u/Xyo)\
**Post date:** [June 24, 2021, 8:51am UTC](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979/20 "2021-06-24T08:51:11Z")

</div>

Dirty trick. But **works!**

Thank you!

[Next page](https://discourse.mopidy.com/t/spotify-login-error-errortype-unable-to-contact-server-8/4979.md?page=2)
