[Ubuntu] Spotify Linux Error Code 7 – Not logging in/Signing up

Quickest solution to Spotify not working on Linux, with error code 7.

First, let’s clear installation.

  1. You can install it from the Software center,
I have Spotify already installed.

2. if it work it works. If it doesn’t and shows a error. Open the terminal and type in the command snap changes

$ snap changes
ID   Status  Spawn               Ready               Summary
45   Error   today at 13:08 IST  13:10 IST  Install "spotify" snap

3. Get the ID of the snap process running the install command for the Software Center and we are going to abort it and run another install command. When installed, you will see this.

$ sudo snap abort 45
$ snap install spotify 
spotify 1.1.10.546.ge08ef575-19 from Spotify* installed

4. You can also install Spotify’s test build from apt, check that out here.

Add Spotify’s testing repository:

echo deb http://repository.spotify.com testing non-free | sudo tee /etc/apt/sources.list.d/spotify.list

Install Spotify 0.9.17

sudo apt-get install spotify-client-0.9.17

Now, let’s talk about the error.

You open Spotify and start to login or sign up into the service and you are hit with a error code 7. Let’s solve it before getting into much deeper.

$ killall spotify
$ sudo apt install nscd
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  nscd
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 78.1 kB of archives.
After this operation, 451 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu bionic/universe amd64 nscd amd64 2.27-3ubuntu1 [78.1 kB]
Fetched 78.1 kB in 4s (20.7 kB/s)       
Selecting previously unselected package nscd.
(Reading database ... 213059 files and directories currently installed.)
Preparing to unpack .../nscd_2.27-3ubuntu1_amd64.deb ...
Unpacking nscd (2.27-3ubuntu1) ...
Setting up nscd (2.27-3ubuntu1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/nscd.service → /lib/systemd/system/nscd.service.
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
ureadahead will be reprofiled on next reboot
Processing triggers for systemd (237-3ubuntu10.31) ...

When installed, nscd is installed. NSCD is needed to flush/clean out the entries in the DNS cache. It’s perfectly safe to run. After all, we are just restarting it. For MacOS users, you can use this command.

$ sudo service nscd restart 
$ sudo /etc/init.d/nscd restart
[ ok ] Restarting nscd (via systemctl): nscd.service.

Now, restart and it should work. It did for me. I was using the FB login sign in option on Xubuntu 18.04, with now Spotity working without any spots.

What else might have helped?

If it doesn’t work try copying the link that opens when you use the Facebook option to sign in, and use a incognito or private browsing window to sign in into your preferred browser. That should get it working.

Clearing the cache of your browser as well as Spotify also helps!

Comment down below what helped you fix this,
Live in the mix, folks!

0 comments

  1. thank you so much, this finally solved my problem, error #30 on a freshly set up Linux Debian 10 where I installed spotify via snap.
    So happy to have my music back!

  2. okay, one more thing which might be interesting to others… my Spotify installation via snap (Debian 10.5 with gnome) was extremely buggy. The GUI froze all the time so I decided to re-install it “the old way” (i.e. adding the spotify repository to sources.list as described here and on the spotify website https://www.spotify.com/ca-en/download/linux/ – it’s “stable” now 😉 )

    After starting up, the login screen appeared and I got the same error message again, stating that I’m using a proxy. Restarting the ncsd service as described here helped with that and I was able to log in. The GUI didn’t freeze yet – fingers crossed things are working better this time!

    1. Thanks for adding more information, let me know if you find a concrete solution for this or any other workarounds. I be happy to update the blog and credit it back to you!

Leave a Reply

Your email address will not be published. Required fields are marked *