{"action":"created","issue":{"url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/75","labels_url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/75/comments","events_url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/75/events","html_url":"https://github.com/hanwen/go-mtpfs/issues/75","id":48618636,"number":75,"title":"Nexus 5, Android 4.4.4: \"fatal error got type 0 (CONTAINER_UNDEFINED) in response\"","user":{"login":"andreasf","id":490656,"avatar_url":"https://avatars.githubusercontent.com/u/490656?v=3","gravatar_id":"","url":"https://api.github.com/users/andreasf","html_url":"https://github.com/andreasf","followers_url":"https://api.github.com/users/andreasf/followers","following_url":"https://api.github.com/users/andreasf/following{/other_user}","gists_url":"https://api.github.com/users/andreasf/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasf/subscriptions","organizations_url":"https://api.github.com/users/andreasf/orgs","repos_url":"https://api.github.com/users/andreasf/repos","events_url":"https://api.github.com/users/andreasf/events{/privacy}","received_events_url":"https://api.github.com/users/andreasf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":37,"created_at":"2014-11-13T10:10:26Z","updated_at":"2015-04-22T16:00:47Z","closed_at":null,"body":"Affected version: 689b5b419172b04f88f70fee4b9a7a8dca7d01a3\r\nOS: Linux 3.17.2-300.fc21.x86_64\r\nRelated to issue: #23 \r\n\r\nAfter successfully mounting my phone, I try to rsync a folder to my computer. It works for a few files, until the connection is closed with the following errors:\r\n```\r\n2014/11/13 10:33:55 FUSE mounted\r\n2014/11/13 10:34:16 fatal error got type 0 (CONTAINER_UNDEFINED) in response, want CONTAINER_RESPONSE.; closing connection.\r\n2014/11/13 10:34:16 AndroidGetPartialObject64 failed: got type 0 (CONTAINER_UNDEFINED) in response, want CONTAINER_RESPONSE.\r\n2014/11/13 10:34:16 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open\r\n2014/11/13 10:34:16 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open\r\n2014/11/13 10:34:16 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open\r\n2014/11/13 10:34:16 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open\r\n...\r\n```\r\nApparently, this happens as a result to an ANDROID_GET_PARTIAL_OBJECT64 request:\r\n```\r\n2014/11/13 10:40:06 MTP request ANDROID_GET_PARTIAL_OBJECT64 [543 0 0 62964]\r\n2014/11/13 10:40:06 MTP data 0xf600 bytes\r\n2014/11/13 10:40:06 MTP bulk read 0x4000 bytes.\r\n2014/11/13 10:40:06 MTP bulk read 0x4000 bytes.\r\n2014/11/13 10:40:06 MTP bulk read 0x4000 bytes.\r\n2014/11/13 10:40:06 MTP bulk read 0x3400 bytes.\r\n2014/11/13 10:40:11 MTP response 0x0 []\r\n2014/11/13 10:40:11 fatal error got type 0 (CONTAINER_UNDEFINED) in response, want CONTAINER_RESPONSE.; closing connection.\r\n```\r\nDebug logs, created with --debug=fs,mtp,usb: \r\n* `rsync -av ...`: http://zentrale1.com/~an/debug-log.gz\r\n* `cp -ar ...`: http://zentrale1.com/~an/debug-log-cp.gz"},"comment":{"url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/comments/95246436","html_url":"https://github.com/hanwen/go-mtpfs/issues/75#issuecomment-95246436","issue_url":"https://api.github.com/repos/hanwen/go-mtpfs/issues/75","id":95246436,"user":{"login":"likewhoa","id":1696920,"avatar_url":"https://avatars.githubusercontent.com/u/1696920?v=3","gravatar_id":"","url":"https://api.github.com/users/likewhoa","html_url":"https://github.com/likewhoa","followers_url":"https://api.github.com/users/likewhoa/followers","following_url":"https://api.github.com/users/likewhoa/following{/other_user}","gists_url":"https://api.github.com/users/likewhoa/gists{/gist_id}","starred_url":"https://api.github.com/users/likewhoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/likewhoa/subscriptions","organizations_url":"https://api.github.com/users/likewhoa/orgs","repos_url":"https://api.github.com/users/likewhoa/repos","events_url":"https://api.github.com/users/likewhoa/events{/privacy}","received_events_url":"https://api.github.com/users/likewhoa/received_events","type":"User","site_admin":false},"created_at":"2015-04-22T16:00:47Z","updated_at":"2015-04-22T16:00:47Z","body":"@hanwen I can reproduce this and I have tested by running the following commands.\r\n\r\n```\r\ncd destination\r\nrsync -acv /source/ . # Transferring over 400 files in 2 different directories while doing a checksum for ~4k files in ~40 directories.\r\ndd if=/dev/uradom of=/source/5G count=5k bs=1M\r\nmv -v /source/5G .\r\n```\r\nI noticed that when I mount the device I always get ```[10126.276741] usb 2-7: usbfs: process 18784 (go-mtpfs) did not claim interface 0 before use\r\n``` now. \r\n\r\nAt this point I cannot say that the problem still exist until it is triggered again but so far I have not been able to reproduce it until I just ran the same rsync command\r\n\r\n```\r\nwinters.gif\r\n      3,471,297 100%    6.63MB/s    0:00:00 (xfr#59, ir-chk=1018/3092)\r\nrsync: opendir \"/tmp/nexus6/Internal storage/r\" failed: Input/output error (5)\r\n```\r\n\r\nin dmesg I have\r\n```\r\n2015/04/22 11:16:23 AndroidGetPartialObject64 failed: mtp: cannot run operation ANDROID_GET_PARTIAL_OBJECT64, device is not open\r\n```\r\n\r\nThis is happening randomly and I can't seem to find a sure way to reproduce it.\r\n\r\n"}}