Bug #2120

mtp on linux breaks when gvfs isn't available

Added by abeluck over 4 years ago. Updated over 4 years ago.

Status:ClosedStart date:10/17/2013
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:0.2
Component:

Description

keysync is detecting that a mtp device is connected, but the following error occurs when gvfs-mtp isn't installed.

[user@comms ~]$ keysync-gui 
check_timer
Device 0 (VID=0fce and PID=0194) is a SONY Xperia Tablet Z MTP.
check_timer
Device 0 (VID=0fce and PID=0194) is a SONY Xperia Tablet Z MTP.
Device 0 (VID=0fce and PID=0194) is a SONY Xperia Tablet Z MTP.
Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib64/python2.7/lib-tk/Tkinter.py", line 1410, in __call__
    return self.func(*args)
  File "/bin/keysync-gui", line 465, in convert_and_copy
    savedir = otrapps.util.get_mtp_mount_path()
  File "/usr/lib/python2.7/site-packages/otrapps/util.py", line 576, in get_mtp_mount_path
    files = os.listdir(mtpbase)
OSError: [Errno 2] No such file or directory: '/home/user/.gvfs/mtp'

Associated revisions

Revision a0eb5da2
Added by Hans-Christoph Steiner over 4 years ago

improve gvfs detection to allow systems with gvfs to also use pymtp

  • the logic was broken, using a test of 'darwin' to decide when to use MTP
  • this now tests whether the GVFS MTP is actually active, and if not it
    then uses the pymtp method of transferring. This means it'll still sync
    on gvfs systems when the gvfs MTP mount has been ejected, but the device
    is still plugged in.
  • this also broke on systems without gvfs but with pymtp, fixes #2120

Revision a0eb5da2
Added by Hans-Christoph Steiner over 4 years ago

improve gvfs detection to allow systems with gvfs to also use pymtp

  • the logic was broken, using a test of 'darwin' to decide when to use MTP
  • this now tests whether the GVFS MTP is actually active, and if not it
    then uses the pymtp method of transferring. This means it'll still sync
    on gvfs systems when the gvfs MTP mount has been ejected, but the device
    is still plugged in.
  • this also broke on systems without gvfs but with pymtp, fixes #2120

History

#1 Updated by abeluck over 4 years ago

  • Subject changed from mtp detection isn't quite right to mtp on linux breaks when gvfs isn't available

#2 Updated by abeluck over 4 years ago

This isn't working for me:

mtp: connect
Device 0 (VID=0fce and PID=0194) is a SONY Xperia Tablet Z MTP.
Android device detected, assigning default bug flags
mtp: sendfile /tmp/.keysync-fpL5go/otr_keystore.ofcaes otr_keystore.ofcaes
Segmentation fault (core dumped)

I think it has to do with the fact that the destination should be SD card/otr_keystore.ofcaes or Internal storage/otr_keystore.ofcaes

#3 Updated by abeluck over 4 years ago

I was wrong, it occurs when otr_keystore.ofcaes already exists on the device.

#4 Updated by abeluck over 4 years ago

  • Status changed from New to Closed

Confirmed, this is actually #2079.

#5 Updated by abeluck over 4 years ago

Also, the original issue was fixed finally by Hans' a0eb5da289e27c93ba2969d14da62e268f981086

Also available in: Atom PDF