Announcements

Spotify error code 4 with ExpressVPN on Ubuntu 18.04

Reply

Spotify error code 4 with ExpressVPN on Ubuntu 18.04

Newbie

Plan

Premium

Country

 Norway (but being connected to different VPN servers)

Device

Lenovo-G70-80

Operating System

Ubuntu 18.04 LTS

Spotify version

1.0.80.474.gef6b503e-7

 

My Question or Issue

 Hi!

 

I'm using Express VPN, and when I'm connected through the Firefox browser app, or connecting through

expressvpn connect [COUNTRY]

Spotify reports Error 4, not detecting internet connection. Everything works fine when using the server i registered through the network settings, but problem is that network lock won't work this way, so I'd prefer using the terminal.

 

I already tried reinstalling Spotify, clearing the catch, connecting to different european servers and starting Spotify with

spotify --ap=194.132.162.227

while being connected to european servers. None of this worked.

 

Is there anything that could help?

3 Replies

Re: Spotify error code 4 with ExpressVPN on Ubuntu 18.04

Newbie

This issue seems to appear only when the app is installed via snap.

If you have installed the Spotify app from the software center or using the snap command then remove it by running: 

$ sudo snap remove spotify

Afterwords, follow the instructions to install the app as a "Debian package" from: https://www.spotify.com/download/linux/

 

Re: Spotify error code 4 with ExpressVPN on Ubuntu 18.04

Newbie

https://linuxconfig.org/how-to-install-spotify-on-ubuntu-18-04-bionic-beaver-linux

 

Install Spotify as Debian package

 

If from any reason the first installation method fails you can attempt to install Spotify using apt command. Start by including Spotify's repository into a local apt sources list:

$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0DF731E45CE24F27EEEB1450EFDC8610341D9410
$ sudo add-apt-repository "deb http://repository.spotify.com stable non-free"

Once ready install Spotify using the below command:

 
$ sudo apt install spotify-client

 

Re: Spotify error code 4 with ExpressVPN on Ubuntu 18.04

Visitor

I have also been experiencing this issue on Ubuntu 18.04 LTS with ExpressVPN.

The fixes about reinstalling Spotify as a Debian package didn't work for me, I still ran into the "error code 4, not detecting internet connection" issue when using the VPN.

 

I managed to solve the issue for me by temporarily disabling the "Spoof my location" security setting in ExpressVPN (this spoofs your HTML5 geolocation).

After doing this, the desktop app was then able to connect successfully to the internet.

I then re-enabled this setting and so far the app has still been working fine even after a few reboots.

 

I can only speculate here, but perhaps that ExpressVPN setting meant that Spotify was unable to correctly confirm my region and this is what caused the connection issue.

Regardless of how/why it worked for me, I thought I'd share in case it's useful for anyone else facing this issue.

 

SUGGESTED POSTS