Failed to start Virtual filesystem service - Apple File Conduit monitor [libusbmuxd.so.4 not found]

Bug #1877135 reported by Martins K.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

After upgrading to Focal, /usr/libexec/gvfs-afc-volume-monitor fails with the message /usr/libexec/gvfs-afc-volume-monitor: error while loading shared libraries: libusbmuxd.so.4: cannot open shared object file: No such file or directory

1) lsb_release -rd:
Description: Ubuntu 20.04 LTS
Release: 20.04

2)apt-cache policy gvfs
gvfs:
  Installed: 1.44.1-1ubuntu1
  Candidate: 1.44.1-1ubuntu1
  Version table:
 *** 1.44.1-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

4) What happens: many applications (nautilus, gedit, etc) take ~30 sec to open. When starting those via the command line, after after those 30 secs the app opens with the following printed to the terminal:
"Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.AfcVolumeMonitor: Timeout was reached (g-io-error-quark, 24)"

3) What you expected to happen: applications to open without delay

=============
Additional info:

After calling 'journalctl -b', several instances like
 dbus-daemon[2031]: [session uid=1000 pid=2031] Activating via systemd: service name='org.gtk.vfs.AfcVolumeMonitor' unit='gvfs-afc-volume-monitor.service' requested by ':1.25' (uid=1000 pid=2135 comm="/usr/bin/gnome-shell " label="unconfined")
 systemd[1964]: Starting Virtual filesystem service - Apple File Conduit monitor...
 gvfs-afc-volume-monitor[2279]: /usr/libexec/gvfs-afc-volume-monitor: error while loading shared libraries: libusbmuxd.so.4: cannot open shared object file: No such file or directory
 systemd[1964]: gvfs-afc-volume-monitor.service: Main process exited, code=exited, status=127/n/a
 systemd[1964]: gvfs-afc-volume-monitor.service: Failed with result 'exit-code'.
 systemd[1964]: Failed to start Virtual filesystem service - Apple File Conduit monitor.

Also upowerd is affected:
 /usr/lib/upower/upowerd: error while loading shared libraries: libusbmuxd.so.4: cannot open shared object file: No such file or directory
 upower.service: Main process exited, code=exited, status=127/n/a
 upower.service: Failed with result 'exit-code'.
 Failed to start Daemon for power management.

The package libusbmuxd6 is installed (and /usr/lib/x86_64-linux-gnu/libusbmuxd.so.6 is present), but when trying "sudo apt install libusbmuxd4", I get the error "E: Unable to locate package libusbmuxd4". It would appear to me that some dependencies *somewhere* are not properly updated (to libusbmuxd6 from libusbmuxd4).

Unfortunately, the huge timeout significantly affects usability of the computer, as one has to wait a lot to perform many tasks (opening nautilus, gedit); one has to wait also before login screen appears after a reboot.

Something that appears to be related:
https://forum.manjaro.org/t/upower-fails-to-start-becuase-upowerd-is-not-running/117291

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: gvfs-backends 1.44.1-1ubuntu1
ProcVersionSignature: Ubuntu 5.4.0-29.33-generic 5.4.30
Uname: Linux 5.4.0-29-generic x86_64
ApportVersion: 2.20.11-0ubuntu27
Architecture: amd64
CasperMD5CheckResult: skip
CurrentDesktop: GNOME
Date: Wed May 6 13:45:53 2020
EcryptfsInUse: Yes
InstallationDate: Installed on 2015-03-18 (1875 days ago)
InstallationMedia: Ubuntu 14.10 "Utopic Unicorn" - Release amd64 (20141022.1)
SourcePackage: gvfs
UpgradeStatus: Upgraded to focal on 2020-04-24 (11 days ago)

Revision history for this message
Martins K. (martinsk89) wrote :
Revision history for this message
Preston Kutzner (grdnwsl) wrote :

I can confirm this bug on my system as well. Upgraded from 18.04LTS to 20.04LTS. I have the same lsb_release -d and apt-cache policy gvfs output as well.

I worked around this issue by creating a symlink in /usr/lib/x86_64-linux-gnu from libusbmuxd.so.6.0.0 to libusbmuxd.so.4 I don't know if this breaks anything, but this does seem to alleviate the slow launch of certain Gnome apps that seem to rely on gvfs, along with my slow login time that I was experiencing. Nautilus, gedit, file dialogs, screenshot, etc., that took ~20-30 seconds to load now load instantly, and I do not get org.gtk.vfs.AfcVolumeMonitor timeout errors I was seeing either.

Revision history for this message
Preston Kutzner (grdnwsl) wrote :

I can also confirm that symlinking libusbmuxd.so.6.0.0 to libusbmuxd.so.4 appears to allow the upower service to start as well. systemctl now shows the service started successfully and is running, and I am able to see power / battery status in Gnome again.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, what's the output of

$ ldd -r /usr/lib/upower/upowerd

Changed in gvfs (Ubuntu):
status: New → Incomplete
Revision history for this message
Martins K. (martinsk89) wrote :
Download full text (3.4 KiB)

ldd -r /usr/lib/upower/upowerd
 linux-vdso.so.1 (0x00007ffe39540000)
 libupower-glib.so.3 => /usr/lib/x86_64-linux-gnu/libupower-glib.so.3 (0x00007ffbaca7e000)
 libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007ffbac89d000)
 libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007ffbac881000)
 libgudev-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgudev-1.0.so.0 (0x00007ffbac874000)
 libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007ffbac814000)
 libglib-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007ffbac6eb000)
 libimobiledevice.so.6 => /usr/local/lib/libimobiledevice.so.6 (0x00007ffbac6c1000)
 libplist.so.3 => /usr/lib/x86_64-linux-gnu/libplist.so.3 (0x00007ffbac6b0000)
 libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ffbac68d000)
 libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ffbac49b000)
 libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007ffbac495000)
 libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ffbac479000)
 libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ffbac471000)
 libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007ffbac411000)
 libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007ffbac3e6000)
 libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007ffbac3ca000)
 libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007ffbac39e000)
 libffi.so.7 => /usr/lib/x86_64-linux-gnu/libffi.so.7 (0x00007ffbac392000)
 libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ffbac31d000)
 libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007ffbac28a000)
 libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007ffbabfb4000)
 /lib64/ld-linux-x86-64.so.2 (0x00007ffbacb1c000)
 libusbmuxd.so.4 => not found
 libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007ffbabf5d000)
 libpcre2-8.so.0 => /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007ffbabecb000)
undefined symbol: usbmuxd_connect (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_send (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_unsubscribe (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_delete_pair_record (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_subscribe (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_read_buid (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_disconnect (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_recv (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_device_list_free (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_recv_timeout (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_save_pair_record_with_device_id (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_get_device_by_udid (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_get_device_list (/usr/local/lib/libimobiledevice.so.6)
undefined symbol: usbmuxd_read_pair_record (/usr/local/lib/libimobiledevice.so.6)

======================
I should probably also mention that I've tried to reinstall libusbmuxd (sudo apt install libu...

Read more...

Revision history for this message
Sebastien Bacher (seb128) wrote :

The problem is
 undefined symbol: usbmuxd_connect (/usr/local/lib/libimobiledevice.so.6)

Which is a local 'make install type' installation taking over the Ubuntu version, if you remove that copy things should work better (check for other outdated libraries in the same directory)

Revision history for this message
Martins K. (martinsk89) wrote :

Amazing! Indeed there was a forgotten local installation of 'libimobiledevice'. After properly removing it, no problems whatsoever.
Thank you so much for your time!

Changed in gvfs (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Sebastien Bacher (seb128) wrote :

No problem, glad that we figured it out!

Revision history for this message
Howard (tayhow42) wrote :

@Sebastien Bacher : I had the same issue and this seems to have fixed it, so ...

Thank you very much!

I only vaguely remember doing something with libmobiledevice. I think I was connecting to an iPhone or other IOS device over usb. Maybe related to Dart / Flutter???

Revision history for this message
Ricardo Graça (devius) wrote :

If anyone is wondering what "properly removing it" actually means it's just literally rm /usr/local/lib/libimobiledevice.so.6. Don't worry since there should already be a similar system library in /usr/lib/x86_64-linux-gnu/.

I also noticed there were other files with names starting with libimobiledevice.so.* in the same /usr/local/lib directory so I also removed them.

For the record I tried to do a make uninstall from the source directory thinking that was the "proper way" but that didn't help.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.