-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OpenSession failed: LIBUSB_ERROR_IO #23
Comments
Some more info: I'm using Ubuntu 13.04 64bit with libusb-1.0-0 1.0.12 |
USB can get a bit wonky when the last connection wasn't closed correctly. I've added some retry logic to the master branch. can you have a go? |
I still get the same error. But I've investigated further and it seems this is actually interfering with Ubuntu 13.04's GVFS which now has MTP support. That's because when I run "go-mtpfs /media/MyAndroid" I get the above mentioned error, but like I was saying, the device does mount properly, however, /media/MyAndroid is empty. Also, I am able to unmount the phone via Nautilus which wasn't possible with go-mtpfs. And finally, when I try to unmount it I get: andrei@ubuntu-desktop:~$ fusermount -u /media/MyAndroid Any idea how to get Go-mtpfs to ignore GVFS with MTP support? That's because GVFS is very unstable for me. |
AFAIK android devices can only have one open session at a time. You should figure out how to make GVFS/Nautilus leave alone the MTP device. |
After GVFS mounts it I unmount it and basically, GVFS mounts it back when I run go-mtpfs /media/MyAndroid. Weird... |
I've tested the latest go-mtpfs GIT in Ubuntu 12.10 which doesn't have the new GVFS with MTP support and the behaviour is the same as in Ubuntu 13.04, except mounting the device doesn't work, just like before:
Everything works properly if I use an old Go-mtpfs version (as of 8th of January). So this bug should be reopened... |
can you try again, with current master? I've made a couple of stability fixes so it deals better with broken connections and such. Whenever I plug in my device, I press ESC for all dialogs about mounting devices from GVFS. |
Also, you say "it mounted correctly", but are you sure? If you run 'mount', it should say something along the lines of /media/Bla ... DeviceFS(Galaxy S2) ... somewher |
Now it works and I've tried copying 3 files:
Here's the output: |
Curious. Does it work if you run -android=false ? On Sun, Feb 17, 2013 at 2:01 PM, Andrew notifications@github.com wrote:
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen |
also, can you run cd fs ; go test -v and send me the console output? If both say "PASS" in the end, can you do the following? Run go-mtpfs -debug=fuse,mtp,usb mountpoint >& logfile duplicate the problem, and attach the resulting logfile. thanks! |
I ran it with -android=false: Copying a ~700 mb video to the Android device (internal storage) worked until the end when it gave a input/output error. I couldn't copy the same file to the SD card. Also, deleting files from the SD card or internal storage displayed the same input/output error: "Error removing file: Input/output error". andrei@andrei-desktop:~/Downloads$ go-mtpfs -android=false /media/MyAndroid As for "cd fs ; go test -v" and "cd mtp ; go test -v", where are those "fs" and "mtp" folders? If you those are the folders in the go-mtpfs source, I get this: andrei@andrei-desktop:~/Downloads/go-mtpfs-0.1/source/go/src/github.com/hanwen/go-mtpfs$ cd fs ; go test -v It's the same for the mtp folder too. I've used this to build it (in the rules file, I'm using debian packaging): |
On Sun, Feb 17, 2013 at 4:41 PM, Andrew notifications@github.com wrote:
I'll have a look into making USB errors fatal. After the first usb error,
you have to set the GOPATH variable as below too, eg. export GOPATH=$(CURDIR)/source/go I've used this to build it (in the rules file, I'm using debian packaging):
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen |
I've tried "-usb-timeout=8000" and it just displays the error later, but it still can't copy the 700mb file: the file manager freezes and later it displays the error: andrei@andrei-desktop:~$ /tmp/go/bin/go-mtpfs -usb-timeout=8000 /media/MyAndroid/ And here's the ouput for go test -v (I've just compiled go-mtpfs using the official instructions): andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs$ cd fs ; go test -v andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs/fs$ cd .. andrei@andrei-desktop:/tmp/go/src/github.com/hanwen/go-mtpfs$ cd mtp ; go test -v |
thanks, I've tracked this down. It was a bug in the fuse library, hanwen/go-fuse@2db031a Can you update and try again? |
Same behaviour... Here's the output: andrei@andrei-desktop:~$ /tmp/go/bin/go-mtpfs /media/MyAndroid/ And: |
can you verify that you have updated the go-fuse library too? At which if in doubt, rm -rf /tmp/go and try again. On Sun, Feb 17, 2013 at 6:26 PM, Andrew notifications@github.com wrote:
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen |
I did remove the /tmp/go folder (I have to reboot to Ubuntu 12.10 each time I test it because I'm currently using 13.04 as my main OS)... |
On Sun, Feb 17, 2013 at 7:04 PM, Andrew notifications@github.com wrote:
Can you run it as go-mtpfs -debug=fs,mtp,usb >& logfile try to reproduce the problem and send the logfile? Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen |
Sorry for the delay! Ubuntu 13.04 has MTP with GVFS support, that's why I'm not testing it in 13.04 (the device is mounted through MTP even if Go-mtpfs fails like I wrote in the initial bug report. Here is the log for the "/tmp/go/bin/go-mtpfs -debug=fs,mtp,usb /media/MyAndroid >& logfile" command: https://dl.dropbox.com/u/1113424/logfile I've tried copying a large (700mb) file and also I've tried deleting a file, both failing with input/output error. |
On Mon, Feb 18, 2013 at 10:00 PM, Andrew notifications@github.com wrote:
curious. It's trying to fetch video.mkv 2013/02/18 22:57:05 MTP request GetObjectInfo [59275] which is lenght 0x44c000 = 4505600, but reading it does: 013/02/18 22:57:09 MTP request ANDROID_GET_PARTIAL_OBJECT64 [59275 0 0 it's reading 4k at the end of the file, (724,373,504), which isn't there then it sends us a bogus reply, trying to send us 0xd517b00c = 300 mb of 2013/02/18 22:57:09 MTP data 0xd517b00c bytes at which go-mtpfs gives up. Are you using nautilus, is it trying to do some what happens if you use the command line? I think you are seeing a bug in the Android code (ie. reading beyond EOF is I think you'll have to use -android=false and a large timeout (libmtp uses
Han-Wen Nienhuys - hanwen@xs4all.nl - http://www.xs4all.nl/~hanwen |
scratch that; I fixed the beyond EOF isssue in go-mtpfs. See cc1f1f2 let me know how you fare. |
FWIW I saw the same error whenever the device's storage was auto-mounted via gvfs (Nexus 5). |
Not sure why the issue is closed, and what the solution is. I'm facing the same
|
Same problem |
I was able to resolve this issue by using
|
When I mount my Galaxy S2 with Android 4.2.1 (CM 10.1 nightly) using Go-mtpfs, this message is displayed:
OpenSession failed: LIBUSB_ERROR_IO
However, the device seems mounted successfully. Any idea what causes this error?
The text was updated successfully, but these errors were encountered: