Bug 414114 - Gphoto2 I/O error -7 when importing photos from iphone 7+
Summary: Gphoto2 I/O error -7 when importing photos from iphone 7+
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Import-Gphoto2 (other bugs)
Version First Reported In: 6.4.0
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-13 22:26 UTC by algebro
Modified: 2025-04-12 06:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 8.7.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description algebro 2019-11-13 22:26:44 UTC
I am trying to import photos from my iPhone 7+ with digikam, but after a few minutes digikam starts complaining that it can't import any files. The systemlog is flooded with the following message:

Nov 13 16:20:44 arch digikam[98090]: digikam.import: Libgphoto2 error:  I/O problem  ( -7 )
Nov 13 16:20:44 arch digikam[98090]: digikam.import: Log ( "IMG_2729.MOV"   "/store_00010001/DCIM/102APPLE/" :  "Failed to download ‘IMG_2729.MOV’"
Nov 13 16:20:44 arch digikam[98090]: digikam.import: Downloading:  "IMG_2730.JPG"  using  "/home/algebro/Pictures/iphone/2019-08/Camera-tmp1-98090.digikamtempfile.IMG_2730.JPG"
Nov 13 16:20:44 arch digikam[98090]: digikam.import: Failed to get camera item!

I tried to reproduce using gphoto2 manually with --list-photos but it seems to be able to list the images fine. 

System specs:

Arch Linux
digiKam 6.4.0-2 from the official repos
KDE Plasma 5.17.2
libgphoto2 2.5.23-1
Comment 1 caulier.gilles 2019-11-14 06:14:08 UTC
Here i use an iPhone 7 with Linux and Gphoto2 driver under Linux Mageia 6 and 7. After to give right to computer to read contents from phone (Apple device will ask about this on screen when you connect phone on computer), displaying contents as thumbnails and downloading files work as expected using digiKam import tool.

Best

Gilles Caulier
Comment 2 Maik Qualmann 2019-11-14 06:48:32 UTC
Here was a similar problem: https://github.com/gphoto/libgphoto2/issues/373

I think this problem is more related to libghoto2.

Maik
Comment 3 algebro 2019-11-14 16:47:09 UTC
> Here i use an iPhone 7 with Linux and Gphoto2 driver under Linux Mageia 6 and 7. After to give right to computer to read contents from phone (Apple device will ask about this on screen when you connect phone on computer), displaying contents as thumbnails and downloading files work as expected using digiKam import tool.
> 
> Best
> 
> Gilles Caulier

Thanks Gilles. Just out of curiosity, do you connect to the iphone in PTP mode or use digikam's autodetect? I've noticed when I use autodetect, it can't connect to the phone at all (doesn't seem to be gphoto2 related as there arent any gphoto errors in the syslog), but if I connect in PTP mode (listed as Apple iPhone 5 (PTP mode)), I can transfer some pictures but then I run into the errors above.
Comment 4 caulier.gilles 2019-11-14 17:07:52 UTC
I tested with both methods, and it work as expected.
Comment 5 algebro 2019-11-14 17:12:08 UTC
What version of iOS? I just tried PTP mode again and it can't connect to the device at all. I'm on iOS 13.2.2.
Comment 6 caulier.gilles 2019-11-14 17:24:39 UTC
Same here. Last ios version here on my iphone7
Comment 7 algebro 2019-11-14 17:28:10 UTC
Thanks. At this point I'm pretty stumped, although I think the fact that non-PTP mode (the device digikam autodetects) isn't throwing any errors or warnings related to libgphoto2 suggests that it might not necessarily be libgphoto2-related. I am not sure what other libraries to try and debug to figure out what's going on.

I should add that I can mount the storage just fine and also browse the photos with an ifuse mount, so the issue seems to be directly related to the camera roll and not communicating with the phone as a whole.

Do you have any suggestions on how to proceed?
Comment 8 caulier.gilles 2019-11-14 17:31:52 UTC
To investigate this kind of problem with libgphoto2, use the gphoto2 CLI tool to detect and communicate with the Ios device.

Gphoto2 CLi tool is well documented with plenty of options. digiKam use this option through the C interface (it do not use the CLI tool), but the result must be the same.

Gilles Caulier
Comment 9 algebro 2019-11-14 17:50:00 UTC
Thanks for your help. I'll focus on debugging gphoto2 for now since I cannot connect to the device at all anymore, although for some reason yesterday I could:

$ gphoto2 --list-folders
                                                                               
*** Error ***              
PTP Timeout

*** Error ***              
An error occurred in the io-library ('Timeout reading from or writing to the port'): No error description available
*** Error (-10: 'Timeout reading from or writing to the port') *** 

This is the same error that dolphin/kioslave sees when I try to connect from the KDE notification. I'll update this thread if I make any progress in case anyone else runs into this problem.
Comment 10 caulier.gilles 2020-07-14 09:41:32 UTC
Hi,

Can you check if this problem still exist with last weekly bundle build of digiKam 7.0.0 available here:

https://files.kde.org/digikam/

Thanks in advance

Gilles Caulier
Comment 11 caulier.gilles 2020-07-30 09:45:15 UTC
digiKam 7.0.0 stable release is now published:

https://www.digikam.org/news/2020-07-19-7.0.0_release_announcement/

We need a fresh feedback on this file using this version.

Thanks in advance

Gilles Caulier
Comment 12 caulier.gilles 2021-03-30 08:30:53 UTC
digiKam 7.2.0 official release is published with more than 360 files closed from bugzilla:

https://www.digikam.org/news/2021-03-22-7.2.0_release_announcement/

Can you reproduce the dysfunction with this version ?

Thanks in advance for your feedback

Gilles Caulier
Comment 13 caulier.gilles 2021-12-15 09:29:23 UTC
Algebro,

Stable digiKam 7.4.0 is published. Please check if problem is reproducible.

https://www.digikam.org/download/

Thanks in advance
Comment 14 caulier.gilles 2023-04-20 05:30:47 UTC
@algebro

digiKam 8.0.0 is out. Problem still reproducible ?

Best regards
Gilles Caulier
Comment 15 caulier.gilles 2023-10-11 14:56:00 UTC
@algebro@tuta.io,

What's about this file using current 8.2.0 AppImage Linux bundle ? It's
reproducible ?

https://files.kde.org/digikam/

Thanks in advance

Gilles Caulier
Comment 16 caulier.gilles 2024-03-28 07:03:43 UTC
@algebro,

digiKam 8.3.0 stable version is released and available at usual place :

https://www.digikam.org/download/

Can you reproduce the dysfunction on your computer ?

Thanks in advance

Gilles Caulier
Comment 17 caulier.gilles 2025-03-15 15:32:31 UTC
Hi,

digiKam 8.6.0 is just released:

https://www.digikam.org/news/2025-03-15-8.6.0_release_announcement/

Problem still exists with this version?

Thanks in advance

Gilles Caulier
Comment 18 caulier.gilles 2025-04-12 06:17:55 UTC
Not reproducible an no feedback.