Closed mingcenwei closed 1 year ago
This seems to be an issue with xch to atomically swap directories:
Which filesystem are you using? :) The mountpoint for that directory can be shown with df /home/username/.local/share/spotify-launcher
.
I use ZFS:
$USER> df -- ~/.local/share/
Filesystem 1K-blocks Used Available Use% Mounted on
pool_name/data/default/home 407179392 180318080 226861312 45% /home
$USER> findmnt -- /home
TARGET SOURCE FSTYPE OPTIONS
/home pool_name/data/default/home zfs rw,relatime,xattr,posixacl
Thanks, I've filed this as a bug in the xch crate https://github.com/WanzenBug/xch/issues/3 :)
Hi, I have stumbled on the similar issue, but not on on ext4. However there is ecrptfs involved.
$ spotify-launcher
[2023-01-19T09:08:20Z INFO spotify_launcher::config] Loading configuration file at "/home/lechu/.config/spotify-launcher.conf"
[2023-01-19T09:08:20Z INFO spotify_launcher::apt] Downloading release file...
[2023-01-19T09:08:20Z INFO spotify_launcher::apt] Downloading signature...
[2023-01-19T09:08:20Z INFO spotify_launcher::apt] Verifying pgp signature...
[2023-01-19T09:08:20Z INFO spotify_launcher::apt] Signature verified successfully!
[2023-01-19T09:08:20Z INFO spotify_launcher::apt] Downloading package index...
[2023-01-19T09:08:20Z INFO spotify_launcher::apt] Verifying with sha256sum hash...
[2023-01-19T09:08:20Z INFO spotify_launcher::apt] Downloading deb file for "spotify-client_1.1.84.716.gc5f8b819-2_amd64.deb" version="spotify-client" ("1:1.1.84.716.gc5f8b819-2")
[2023-01-19T09:09:05Z INFO spotify_launcher::apt] Verifying with sha256sum hash...
[2023-01-19T09:09:08Z INFO spotify_launcher] Extracting to "/home/lechu/.local/share/spotify-launcher/install-new"...
[2023-01-19T09:09:09Z INFO spotify_launcher] Setting new directory active
Error: Failed to update directories "/home/lechu/.local/share/spotify-launcher/install" and "/home/lechu/.local/share/spotify-launcher/install-new"
Caused by:
0: Could not exchange paths: Invalid argument
1: Invalid argument
$ df -- ~/.local/share [10:14:38]
Filesystem 1K-blocks Used Available Use% Mounted on
/home/lechu/.Private 354243944 193455908 142720224 58% /home/lechu
$ findmnt -- /home [10:15:20]
TARGET SOURCE FSTYPE OPTIONS
/home /dev/nvme0n1p7 ext4 rw,relatime
$ findmnt -- /home/lechu [10:15:26]
TARGET SOURCE FSTYPE OPTIONS
/home/lechu /home/lechu/.Private ecryptfs rw,nosuid,nodev,relatime,ecryptfs_fnek_sig=4c81295950b749ff,ecryptfs_sig=49faa0643ea930d6,ecryptfs_cipher=aes,ecryptfs_key_bytes=16,ecryptfs_unlink_si
I've uploaded a 0.5.0 release that tries to do an atomic swap and if this fails it deletes the active install
directory and then moves install-new
to install
. This should work on all filesystems.
Let me know if this works for you. :)
It shows a warning, but works fine now.
$ spotify-launcher [20:54:03]
[2023-01-20T19:54:15Z INFO spotify_launcher::config] Loading configuration file at "/home/lechu/.config/spotify-launcher.conf"
[2023-01-20T19:54:15Z INFO spotify_launcher::apt] Downloading release file...
[2023-01-20T19:54:15Z INFO spotify_launcher::apt] Downloading signature...
[2023-01-20T19:54:15Z INFO spotify_launcher::apt] Verifying pgp signature...
[2023-01-20T19:54:15Z INFO spotify_launcher::apt] Signature verified successfully!
[2023-01-20T19:54:15Z INFO spotify_launcher::apt] Downloading package index...
[2023-01-20T19:54:15Z INFO spotify_launcher::apt] Verifying with sha256sum hash...
[2023-01-20T19:54:15Z INFO spotify_launcher::apt] Downloading deb file for "spotify-client_1.1.84.716.gc5f8b819-2_amd64.deb" version="spotify-client" ("1:1.1.84.716.gc5f8b819-2")
[2023-01-20T19:54:54Z INFO spotify_launcher::apt] Verifying with sha256sum hash...
[2023-01-20T19:54:54Z INFO spotify_launcher::extract] Extracting to "/home/lechu/.local/share/spotify-launcher/install-new"...
[2023-01-20T19:54:57Z INFO spotify_launcher::extract] Atomically swapping new directory at "/home/lechu/.local/share/spotify-launcher/install-new" with "/home/lechu/.local/share/spotify-launcher/install"...
[2023-01-20T19:54:57Z WARN spotify_launcher::extract] Failed to swap "/home/lechu/.local/share/spotify-launcher/install-new" with "/home/lechu/.local/share/spotify-launcher/install": Could not exchange paths: Invalid argument: Invalid argument
spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by spotify)
/home/lechu/.local/share/spotify-launcher/install/usr/share/spotify/spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /home/lechu/.local/share/spotify-launcher/install/usr/share/spotify/spotify)
/home/lechu/.local/share/spotify-launcher/install/usr/share/spotify/spotify: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /home/lechu/.local/share/spotify-launcher/install/usr/share/spotify/spotify)
[libprotobuf ERROR ../core/vendor/protobuf3/src/google/protobuf/wire_format_lite.cc:577] String field 'spotify.event_sender.proto.DroppedEvents.DroppedEventsBySequenceIdEntry.key' contains invalid UTF-8 data when parsing a protocol buffer. Use the 'bytes' type if you intend to send raw bytes.
/proc/self/exe: /usr/lib/libcurl-gnutls.so.4: no version information available (required by /proc/self/exe)
Thanks :)
The warning was expected and it's doing a naive non-atomic swap of the directories (rm -rf install && mv install-new install
). I just noticed the log output on info
level is not ideal.
Anyway closing this for now. :)
When I run
spotify-launcher
, the following error will occur: