Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
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?
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/
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
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.
I don't have the same type of VPN, but I have a somewhat botched setup with an IPv6 VPN and regulas DSL access for IPv4. This means among other things that Linux may be confused as to how well the different types of Internet connectivity works.
What I've seen is that (despite at least IPv4 Internet working perfectly) NetworkManager suddenly may decide that my cnnectivity is "limited" (it changes its SysTray icon from a wired net to a question mark), and when that happens, Spotify goes offline. When it thinks connectivity returns, Spotify returns online as well.
What connectivity NetworkManager believes it has is checked with "nmcli networking connectivity", when tis sys "full" Spotify is OK. If you run "nmcli networking connectivity check" you force a full re-check, most of the times it will find that connectivity indeed is "full" so this is a way to return Spotify to normal operation.
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game and get…