Skip to content

Arch linux: spotify stuck offiline

Not downloaded yet

I have installed spotify on arch linux via yay. When I open spotify it says it is offline even when I have working internet connection and throws error code: 4

![screenshot1]

This is log of spotify:

spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by spotify)
/opt/spotify/spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /opt/spotify/spotify)
/opt/spotify/spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /opt/spotify/spotify)
/proc/self/exe: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /proc/self/exe)

I will not post output of spotify --show-console because it contains login tokens and sessions ids.

How can I fix this so spotify can work normally ?

Thank you for help

26 points34 comments
Open on Reddit
About this post
Posted
Archived
Score
26 · 84% up
Kind
Image
ID
jltdb9

Author

37
posts
56
comments
8
media
View profile

36 comments

If you use networkmanager check with nm-online if it shows offline. I had the same problem when connected via vpn, Spotify checks with networkmanager for internet connectivity. I had to disable the check in /usr/lib/NetworkManager/conf.d/20-connectivity.conf with

enabled=false

and restart NetworkManager.service

5 points

I still need to test better, but I think this solution fixed the issue for me.

On Linux Mint 19.3 NetworkManager uses the URL http://connectivity-check.ubuntu.com/ to check for connectivity, however, this URL is frequently timing out for me.

So, I disabled the connectivity checking feature and now Spotify is no longer reporting being offline.

1 points

/usr/lib/NetworkManager/conf.d/20-connectivity.conf

Finally, this drove me insane!
Not using a VPN (at least not at my systems level).
On debian nm-online showed me online.

i still got ahead and created this file (was not present), here is the full content:

[connectivity]
enabled=false

restart NetworkManager and bam, it worked!
Thank you very much.

1 points
unknown author

Thanks a million!!!

1 points

Hey, it only shows that there is no version information available on gnutls. Install Dunst and try again. It usually happens cuz spotify try to pop up notification and get frozen with the message system.

4 points

It works disabling the notification system on spotify also and if you dont wanna install dunst (or something) on your system.

3 points

I disabled notifications in spotify settings and issue remains.

1 points

I had Dunst installed before downloading spotify and still having this issue. Do I have to add some special settings to Dunst config ?

1 points

I was recently having general network issues, which included this. I finally just wiped NetworkManager and moved to netctl, which fixed everything. I like netctl better anyway.

2 points

Out of curiosity, what makes netctl better than NetworkManager (my current choice) or iwctl/iwd?

2 points

I just like it because it's simpler. The wifi chooser is terminal based. And it's an Arch project. :)

1 points

Same problem here. I found no solution, though. I had to move on to other services.

2 points

Install the package spotify-adblock-linux or it's -git version from the AUR.... and enjoy ad-free Spotify.

1 points

I was using the paid (premium) version, and it simply stopped working. Tried several solutions but non worked.

2 points

I was just having the same issue, on MX Linux (debian), however.

None of the proposed fixes worked for me. In the end, what somehow fixed it for me, was to release and renew the DHCP lease of my machine. I run adguard as a DNS-based ad blocker ... could be, that something didn't sync form the DHCP server.

Anyway, thought it may be worth a try for you, too!

2 points

How can one renew DHCP lease ?

1 points

I did it with sudo dhclient -r eth0 && sudo dhclient eth0. You may have to change the eth0 part to suit your interface. You can get a list of your interfaces with ip address show.

What caused the inability to connect to spotify was in the end -or so I assume, at least- a typo in the address of my DNS server.

2 points

This is also a problem with the snap version on Arch, btw

2 points
unknown author

Deleted before we saved it.

1 points

Hey yagarea! I had the exact same issue as you, but I've resolved it yesterday. I'm a hardcore user of Arch Linux, I've got about 6 devices running Arch (x86_64 & ARM) & Spotify broke for me in all Arch devices where I had it installed when I redeployed PiHole. (I like to block ads, but even if you don't want to block ads, this should still workout for you if you do it properly.)

I tried the NetworkManager tip which butwhatabout_ suggested, but sadly that didn't workout for me.

FYI: The issue is not with libcurl, infact it doesn't even matter.

Here's the problem that I faced.

Mine is a 200Mbps connection & strangely the speed dropped to 2Mbps after deploying PiHole. I dug a bit deeper since this was a big bummer for me in addition to Spotify not working. Then I realized what was wrong.

I had setup Quad9 as my upstream DNS & sadly, Quad9 is damn slow for me with my new ISP. The queries which PiHole allowed to passthrough were being queried to Quad9 which for me was slow/timingout. This resulted in the slower speeds.

I always install Spotify from AUR. This version checks for connectivity from the /usr/lib/NetworkManager/conf.d/20-connectivity.conf file as rightly pointed out by butwhatabout_ . Changing that to disabled however broke NetWorkManager for me & I wouldn't want to do that again since I was testing this out in my work laptop.

NetworkManager pings http://www.archlinux.org/check_network_status.txt for connectivity checks. Since Quad9 is slower for me with my new setup, it was always timing out & PiHole was always responding with the cached lists for Arch's connectivity checks. However, Spotify is not content with this & always showed Offline.

I discovered this awesome repo to check DNS performances for your connection https://github.com/cleanbrowsing/dnsperftest. Shoutout to cleanbrowsing for this helpful tool.

I ran their script & as I assumed, Quad9 DNS was timingout on me. The best results that I had was with Cloudflare DNS & then Google.

I then replaced Quad9 with Cloudflare in my PiHole config, redeployed my PiHole k8s deployment & voila! everything works as it should. Spotify works right off the bat in all my Arch devices, in my Android & FireTV Stick.

Now my speedtests show 340Mbps for my 200Mbps connection XD ;p. I'm listening to my fav tunes in Spotify as I write this post infact.

To Summarize:

  1. Use https://github.com/cleanbrowsing/dnsperftest to figure out which is the fastest DNS for you.
  2. Switch your upstream DNS in PiHole/router to the one that fastest for you.
  3. Groove to Spotify !

Sorry for the long post, but I hope this helps other Arch & Spotify users like me :)

2 points

None of the solutions above worked for me. (editing 20-connectivity.conf, leasing DHCP etc..)

Instead I just disabled network manager

sudo systemctl stop NetworkManager.service

and

sudo systemctl disable NetworkManager.service

You may try this if you are connected to your router over Wi-Fi with iwctl or any other service, since running multiple network services will cause them to conflict and make problems like this it may be good to disabled other network services.

2 points

Probably you are blocking ads through /etc/hosts? spotify won't like it.

1 points

No, I do not block ads. This issue spotify has after clean installation without any modifications.

1 points

It could be because of curl library, then. I thought it'd be unlikely even though the fact that curl version isn't the same as one for Debian on Arch. The log is also expected. I don't have a problem with curl 7.71 btw.

I don't like it but using spotify from flathub with flatpak might work.

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.