[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!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s