Announcements
The Spotify Stars Program: Celebrating Values Week!

Help Wizard

Step 1

NEXT STEP

Ubuntu 20.04-1 Crashes when "add source" for local songs

Solved!

Ubuntu 20.04-1 Crashes when "add source" for local songs

Plan

    Premium

Country

    Australia

 

Device

    Desktop

AMD R5 3600

AMD Powercolor RX580 8GB

Thermaltake Tough Ram 16Gb 3200MHz

Operating System

    Ubuntu 20.04-1

 

My Question or Issue

    When I attempt to "add a source" for local files Spotify will crash. You can see the file manager for a split second before both Spotify and it crashes/disappears. Have tried:

Reinstalling
https://community.spotify.com/t5/Desktop-Linux/Linux-Local-files-do-not-play-on-Ubuntu-16-04-SOLVED/...
https://community.spotify.com/t5/Help-Desktop-Linux-Windows-Web/Unable-to-Add-a-Directory-to-Play-Lo...

 

This is the Spotify dump for when I click on the "add source" button

 

Gtk-Message: 17:17:50.151: Failed to load module "gail"
Gtk-Message: 17:17:50.151: Failed to load module "atk-bridge"
Gtk-Message: 17:17:50.153: Failed to load module "canberra-gtk-module"
MESA-LOADER: failed to open radeonsi (search paths /snap/spotify/42/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open kms_swrast (search paths /snap/spotify/42/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast (search paths /snap/spotify/42/usr/lib/x86_64-linux-gnu/dri)
failed to load swrast driver
MESA-LOADER: failed to open radeonsi (search paths /snap/spotify/42/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: radeonsi
MESA-LOADER: failed to open kms_swrast (search paths /snap/spotify/42/usr/lib/x86_64-linux-gnu/dri)
failed to load driver: kms_swrast
MESA-LOADER: failed to open swrast (search paths /snap/spotify/42/usr/lib/x86_64-linux-gnu/dri)
failed to load swrast driver

Reply
37 Replies

Running arch linux here running spotify 1.1.42.622.gbd112320. Each time I hit the "Add A Source" button the app segfaults.

Here is a backtrace of the codedump: https://pastebin.com/851vX7RA
When running with strace, the output to stdout is:
$ strace -o spotify.strace --follow-forks 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)
strace: decode_nlattr: [xlat 0x55feb2e0e360, dflt "AF_???", decoders 0x7ffdf8053940] size is zero (going to pass nla_type as decoder argument), but opaque data
(0x7ffdf8053a00) is not - will be ignored
strace: decode_nlattr: [xlat 0x55feb2e0e360, dflt "AF_???", decoders 0x7ffdf8053940] size is zero (going to pass nla_type as decoder argument), but opaque data
(0x7ffdf8053a00) is not - will be ignored
strace: decode_nlattr: [xlat 0x55feb2e0e360, dflt "AF_???", decoders 0x7ffdf8053940] size is zero (going to pass nla_type as decoder argument), but opaque data
(0x7ffdf8053a00) is not - will be ignored
... same lines repeated ...
segmentation fault (core dumped) strace -o spotify.strace --follow-forks spotify

I can easily produce the strace output, however it's too big to paste here or on pastebin.

The last lines in strace of the offending thread in my case is:

 

584550 read(118, "\330\217f\365c\"\3341Ie\301\370\5tt\f\3&R\226\357\320d\234-\206\10r\252\313l\330"..., 12288) = 12288
584550 read(118, ">\245\324`\3335\vf\333\253\232\276\311\214\306\236\v\207\253l\330Pn\317mZwt\341\220\217["..., 4096) = 4096
584550 lseek(118, 561152, SEEK_SET) = 561152
584550 read(118, "m\227\372\352\26%P#\f\336\331Mco\356\273\376\306\327c\347\366\25\204g\256\216B\234\270/\351"..., 12288) = 12288
584550 read(118, "\304\247D(\327B\344\37nF\332\2\n\247\3165#}@\17\305\221fj3!\2179\313S1B"..., 4096) = 2560
584550 lseek(118, 576000, SEEK_SET) = 576000
584550 lseek(118, 576000, SEEK_SET) = 576000
584550 lseek(118, 576000, SEEK_SET) = 576000
584550 lseek(118, 576000, SEEK_SET) = 576000
584550 lseek(118, 576000, SEEK_SET) = 576000
584550 lseek(118, 576000, SEEK_SET) = 576000
584550 lseek(118, 576000, SEEK_SET) = 576000
584550 stat("/etc/localtime", {st_mode=S_IFREG|0644, st_size=3536, ...}) = 0
584550 lseek(118, 576000, SEEK_SET) = 576000
584550 lseek(118, 576000, SEEK_SET) = 576000
584550 close(118) = 0
584550 write(32, "\0", 1) = 1
584550 futex(0x7fa604ff7358, FUTEX_WAIT_PRIVATE, 0, NULL <unfinished ...>
584550 <... futex resumed>) = ?
584550 +++ killed by SIGSEGV (core dumped) +++

 

Attached is the strace file, note the offending thread appears to be 584550 in my case.

I am on Ubuntu 20.04.1 installed last saturday. I have this crash on Spotify installed from snap or from the ppa. Spotify crash with a SIGSEV after clicking "Add a source" on in the Local Files settings.

I launched gdb and here is the top of the stack trace:

Thread 1 "spotify" received signal SIGSEGV, Segmentation fault.
__GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:67
67 ../nptl/pthread_mutex_lock.c: No such file or directory.
(gdb) bt
#0 __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:67
#1 0x00007fffeec9536f in XrmQGetResource () from /lib/x86_64-linux-gnu/libX11.so.6
#2 0x00007fffeec70c4a in XGetDefault () from /lib/x86_64-linux-gnu/libX11.so.6
#3 0x00007fffee3151a8 in ?? () from /lib/x86_64-linux-gnu/libcairo.so.2
#4 0x00007fffee317c44 in ?? () from /lib/x86_64-linux-gnu/libcairo.so.2
#5 0x00007fffee2edf99 in cairo_surface_get_font_options () from /lib/x86_64-linux-gnu/libcairo.so.2
#6 0x00007fffee2a4502 in ?? () from /lib/x86_64-linux-gnu/libcairo.so.2
#7 0x00007fffee2a7605 in ?? () from /lib/x86_64-linux-gnu/libcairo.so.2
#8 0x00007fffee2fc7d6 in cairo_show_glyphs () from /lib/x86_64-linux-gnu/libcairo.so.2
#9 0x00007fffee3cbc1b in ?? () from /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0
#10 0x00007fffee3cc093 in ?? () from /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0
#11 0x00007fffee256d7e in pango_renderer_draw_glyphs () from /lib/x86_64-linux-gnu/libpango-1.0.so.0
#12 0x00007fffee3cc2c8 in pango_cairo_show_glyph_string ()
from /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0

 

I thought it was some dependencies missing but looking online it seems there's a bug in spotify itself. But if it really is a dependency issue, it should be included in the snap and the ppa.

The full stack trace is as an attachment.

 

 

Quick follow-up on my attempt to add local files in other ways than using the GUI: You can copy config files from an older version of spotify to a newer version, including the local file sources. This however requires you to have an older version installed to generate them, which you could just use instead of the newer broken one then.
More details here: https://www.reddit.com/r/truespotify/comments/j9o8pm/help_needed_adding_local_file_sources_directly_...

This reply out of that reddit-thread made it work for me.

The spotify PPA still contains the old version. I was able to work around this by installing that instead of the clearly busted newer version. I'm on Pop_OS 20.04.

sudo apt install spotify-client=1:1.1.10.546.ge08ef575-19


sudo apt install spotify-client=1:1.1.10.546.ge08ef575-19

" E: Version '1:1.1.10.546.ge08ef575-19' for 'spotify-client' was not found "

 

seems like that version has now been removed, so it is no longer possible to install a version of Spotify that works with GNOME.😣 Please fix the issue or return the old version!!!

 Hey @yikkayaya 

 

There is a directory containing deb packages of spotify clients. Maybe you should try one of the older ones listed here.


Hopefully it'll work for you 🙂

SebastySpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Thanks, rolling back to 1.1.25.501 fixed the problems for me.

I reverted to the version from February, but local files setting doesn't stay active. The setting turns itself off, and local files don't play while it's turned on ("This file cannot be found. if it exists locally, you can try to import it"). The files show up fine though, and play in external media players. (Mint 20)

As mentioned in the Reddit thread, the local source paths are stored in watch-sources.bnk.

 

If you have a backup of an old Spotify profile with working local files, and can live without adding new sources (for now), restoring an earlier version of that file worked for me, e.g.:

 

cp ~/backup/spotify/watch-sources.bnk ~/.config/spotify/Users/<username>-user/

 

Thanks everyone, it worked for me as well with a backup watch-sources.bnk.
If you installed from snap, the file to be replaced is not in .config but in :
~/snap/spotify/<snapshot number>/.config/spotify/Users/<username>-user

1.1.26 from https://repository-origin.spotify.com/pool/non-free/s/spotify-client/ worked for me finally, on Pop_OS 20.20

For me, with 1.1.26 I can add the the local files, but not that version nor in newer version I can play the files. I get errror: Spotify can't play this right now. If you have the file on your computer you can import it.

Pop OS 20.10

So I copied watch_sources.bnk from an older version of Spotify and it does show the new location in the newer version of the application. However, when I download songs, they're still stored under ~/.cache/spotify (I compared the size of both folders). Can someone help me with this? By the way, the new folder is on a second hard drive, if that matters.

 

Edit: Actually, the problem was indeed the fact that it was on a second hard drive because when I made another folder on the same drive, it magically worked! It doesn't seem to be a permission issue either! Kinda defeats the purpose of changing save location..

It seem's there's another thread about this topic.
https://community.spotify.com/t5/Desktop-Linux/Spotify-Client-crashes-when-adding-a-directory-to-loc...

I have this exact same problem on Spotify installed with flatpak on Fedora 33.

same thing here.

Checking the spotify generated log shows songs that I added to my local files from my other laptop(running linux mint). But nothing about the crash.

 

Log looks like:

09:36:06.550 E [local_file_resource.cpp:80      ] Track spotify:local:::Radiohead+-+Fake+Plastic+Trees+_+Live:286: Local file failed
09:36:06.550 E [offline_manager_impl.cpp:3191   ] Offline track error: sync_error_offline_file_failed (7002) (spotify:local:::Radiohead+-+Fake+Plastic+Trees+_+Live:286)
09:36:06.551 I [track_resources_state.cpp:394   ] Track spotify:track:2kRFrWaLWiKq48YYVdGcm8 identifying complete parts.
  Token: 1
  File: eea8ff587eed41c46207ccc0e56610e65abdc450 @320000 bps
  Key: missing
  Head-file: N/A
  Images:
  - Complete: normal, small, large, 

 

The latest Spotify client still crashes on my Ubuntu 20.04 machine, but I managed to configure what I want on it.

 

There's a Docker container with an old Spotify client https://hub.docker.com/r/syncomm/spotify/. Modify the docker-spotify.sh in the url to mount a directory you want to configure, and execute the script. You can add the directory to sources, and then close the GUI to save watch-sources.bnk.

 

Once you copy "/home/spotify/.config/spotify/Users/[username]-user/watch-sources.bnk" on Docker to local "~/snap/spotify/current/.config/spotify/Users/[username]-user/watch-sources.bnk` and open a local Spotify client, it will have what you want.

Suggested posts