NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.77k stars 13.18k forks source link

libmtp error: Error getting friendlyname. #60384

Open davidak opened 5 years ago

davidak commented 5 years ago

Issue description

I tried to copy files from my Android smartphone to my notebook using Pantheon Files.

For some files (all videos) i get this error:

libmtp error: Error getting friendlyname.

It is reproducible with this files.

syslog:

Apr 28 20:08:23 X230 org.gtk.vfs.Daemon[1924]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 28 20:08:23 X230 org.gtk.vfs.Daemon[1924]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 28 20:08:23 X230 .io.elementary.[12341]: FileUtils.vala:311: Invalid mtp path
Apr 28 20:08:24 X230 .io.elementary.[12341]: FileUtils.vala:311: Invalid mtp path
Apr 28 20:08:26 X230 org.gtk.vfs.Daemon[1924]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 28 20:08:26 X230 org.gtk.vfs.Daemon[1924]: mkdir failed on directory /var/cache/samba: Permission denied
Apr 28 20:08:29 X230 .io.elementary.[12341]: Sidebar.vala:932: Error querying smb://nas.lan/media/ filesystem info: No route to host

I noticed that the files seem to be broken. The video player on the smartphone stops playing in the middle...

@worldofpeace any idea?

Steps to reproduce

Technical details

worldofpeace commented 5 years ago

I noticed that the files seem to be broken. The video player on the smartphone stops playing in the middle...

That is the files which are videos that you tried to copy, correct? If so that sounds like a pretty dangerous issue.

davidak commented 5 years ago

That is the files which are videos that you tried to copy, correct?

yes

If so that sounds like a pretty dangerous issue.

why dangerous? i think since they are broken, it's not a big deal that i can't copy them. but i think it should be possible in general to copy even broken files

worldofpeace commented 5 years ago

If so that sounds like a pretty dangerous issue.

why dangerous? i think since they are broken, it's not a big deal that i can't copy them. but i think it should be possible in general to copy even broken files

Oh now I understand. I was under the assumption that because you tried to copy them and it failed that it resulted in some sort of corruption. Can confirm that video files of the same file format that aren't corrupted can by copied?

Also, to find out if it's actually an issue in libmtp or really with like Pantheon Files and gvfs can you try to do the same operation but only with libmtp cli?

I think the https://wiki.archlinux.org/index.php/Media_Transfer_Protocol section libmtp should be helpful
davidak commented 5 years ago

Can confirm that video files of the same file format that aren't corrupted can by copied?

yes. i copied some hundred files and only 5 or so had this problem

can you try to do the same operation but only with libmtp cli?

i already have deleted all files from my smartphone. so, no

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.
alexpear commented 1 year ago

Still important to me. Seen with a .jpg file in a similar file transfer situation.