After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 719322 - Unable to unmount Nexus 4: The connection is closed
Unable to unmount Nexus 4: The connection is closed
Status: RESOLVED DUPLICATE of bug 715119
Product: gvfs
Classification: Core
Component: mtp backend
1.18.x
Other Linux
: Normal normal
: ---
Assigned To: Philip Langdale
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-26 03:58 UTC by Andreas Jonsson
Modified: 2013-12-20 08:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fist log (7.10 KB, text/plain)
2013-12-17 04:17 UTC, Andreas Jonsson
Details
second log (3.99 KB, text/plain)
2013-12-17 04:19 UTC, Andreas Jonsson
Details

Description Andreas Jonsson 2013-11-26 03:58:37 UTC
When I click the "eject" triangle next to my Nexus 4 in Nautilus this error message appears (see summary). I am uncertain whether the phone actually unmounts or not so that it is safe to disconnect it.

After the error message appears I can still access the phone content at /run/user/1000/gvfs/mtp..., which suggests that the phone is still mounted.

"sudo umount /run/user/1000/gvfs" properly unmounts the phone.

Expected behaviour: To receive a confirmation message from Nautilus saying it is now safe to disconnect the phone.

This bug has previously been reported at at Launchpad for Ubuntu 13.10:

https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1253187
Comment 1 Ross Lagerwall 2013-12-12 17:44:49 UTC
Thanks for the report.

Does this happen consistently?

Please run gvfsd in debug mode with:
GVFS_DEBUG=all /usr/lib/gvfs/gvfsd -r

and then upload the output.


Also try unmounting the phone with the command-line tool:
First find the device name with: gvfs-mount -li (look for something like mtp://[usb001,001]/)
Then unmount with gvfs-mount -u <device name>
Comment 2 Philip Langdale 2013-12-12 18:54:30 UTC

*** This bug has been marked as a duplicate of bug 715119 ***
Comment 3 Andreas Jonsson 2013-12-17 04:17:51 UTC
Created attachment 264385 [details]
fist log
Comment 4 Andreas Jonsson 2013-12-17 04:19:55 UTC
Created attachment 264386 [details]
second log
Comment 5 Andreas Jonsson 2013-12-17 04:35:34 UTC
No, this does not happen consistently. However it does happens very frequently. 

The first attachment (first log: log_edit.txt) includes the GVDS log for a scenario when I first attached the Nexus 4, then clicked the "eject" triangle followed by clicking "Nexus 4" again. This gave no error messages. I then repeated the last two actions twice more (click triangle, then click "Nexus 4") to unmount and mount the device. Still no errors. Then I followed this up by double-clicking "Internal Storage" (the main/root folder on Nexus 4). After this clicking the triangle failed with the error message described in the original post. Moreover a second error pop-up appeared at the same time saying:

"Oops! Something went wrong.

Unhanded error message: The name :1.122 was not provided by any .service files"

At this point the triangle next to "Nexus 4" in the left-hand panel has disappeared, suggesting that the device has unmounted, however, I am uncertain if this is really the case, due to the two error messages. Moreover, the device does not seem to mount in /run/user/1000/gvfs/ anymore (I couldn't see anything in there during the iterations above) so I cannot judge whether the device is mounted at this point or not.

Also, following your instructions to unmount I get:

~$ gvfs-mount -u /dev/bus/usb/001/008
Error finding enclosing mount: Containing mount does not exist
~$ gvfs-mount -u mtp://[usb:001,008]/
Error finding enclosing mount: The specified location is not mounted

so I guess the device is at this point unmounted.

After this (see second log: log2_edit.txt) I clicked "Nexus 4", then clicked "Internal Storage", and finally the "eject triangle again. This gave the "Oops! Something went wrong." message described above, but not the error message described in my original post. At this point the eject triangle next to "Nexus 4" in the left-hand panel is still present suggesting that the device is still mounted. In this case 

gvfs-mount -u /dev/bus/usb/001/008

returned nothing (I assume this means it unmounts the device), however, the eject triangle in Nautilus dose not disappear, which leaves me confused about the state of the device.

If play around with this long enough I usually end up with Nautilus crashing or frozen Nautilus windows.
Comment 6 Ross Lagerwall 2013-12-20 08:45:44 UTC
The first log indeed shows that original problem is due to bug 715119.

A workaround is to not click the triangle, but instead to right-click on the device and click "Unmount".

Most of the rest of the problems are cause by gvfs and nautilus not handling the case where a daemon dies well enough. (to be fixed :-) )


The contents of /run/user/1000/gvfs are provided by the fuse daemon (provides a POSIX compatibility layer for gvfs).  Rather use the gvfs tools (like gvfs-mount -li) to determine if something is mounted.  Also note that "sudo umount /run/user/1000/gvfs" actually just stops the fuse daemon running.  The device is probably still "mounted" through gvfs.