Bug 449815 - "Download required files" continually tries non-working mirrors, causing "Socket operation timed out"
Summary: "Download required files" continually tries non-working mirrors, causing "Soc...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Faces-Detection (show other bugs)
Version: 7.5.0
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-09 02:36 UTC by James Tuttle
Modified: 2024-03-28 07:31 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.6.0
Sentry Crash Report:


Attachments
Screengrab of the error messages displayed to user (281.45 KB, image/png)
2022-02-09 02:36 UTC, James Tuttle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Tuttle 2022-02-09 02:36:46 UTC
Created attachment 146472 [details]
Screengrab of the error messages displayed to user

SUMMARY

On first launch of a fresh installation of Digikam 7.5.0 (on Mac OS 10.13.6), the user is presented with the "Download required files" dialog, in order to retrieve binaries for face engine and red-eye removal. For unclear reasons, Digikam retries the same bad mirror over and over, resulting in a repeated "Socket operation timed out" error message.

In my case, the bad mirror is https://mirror.0xem.ma which is apparently located in Morocco. I am located on the US East Coast. It is not clear why this mirror would ever be chosen over CONUS ones, but at any rate, it doesn't seem to be working.

By clicking "Try again" repeatedly (10+ times), I was eventually able to download one of the required binary components. But when the next component began downloading, it again went back to the bad mirror. After another 10+ retries, I am not able to get another successful download.


STEPS TO REPRODUCE
1. Install Digikam 7.5.0 using MacOS 64bit DMG
2. Launch Digikam and wait for "Download required files" dialog to be displayed
3. Click on "Download"
4. Wait for "Socket operation timed out" error message
5. Click "Try again"
6. GOTO step 4

OBSERVED RESULT

Digikam continually retries the same non-working mirror over and over.

EXPECTED RESULT

Minimum Viable Behavior: If a download fails and requires the user to press the "Try again" button, the same mirror that was just attempted and failed, shouldn't be tried again. Or allow user to manually select from a list of possible mirrors via a dropdown, so they can override the (broken) default/automatic behavior.

More Desirable Behavior: Digikam should intelligently select the mirror to download binaries from, in a manner similar to how a mirror is recommended when the installer is obtained from download.kde.org (which suggests that I use https://mirrors.mit.edu/kde/, a completely reasonable suggestion, since that mirror is both working and not located on the other side of a large ocean).

Optimal Behavior: Remove requirement to download binaries on first run by packaging them into the Digikam installer. Fix upgrade process if necessary to prevent re-downloading of unchanged components during later upgrades. (Optimizing for easy upgrades later on isn't useful, if users can't get the initial installation done in the first place.)

SOFTWARE/OS VERSIONS
macOS: 10.13.6 (High Sierra)
Comment 1 Maik Qualmann 2022-02-09 07:18:11 UTC
Well, basically a random server is assigned in the region. We have no influence on that. There are regions in the world where there are relatively few KDE mirror servers. Of course, if that mirror server is dead, that's bad for us. 
We can of course use a "stable" server after an error.

Maik
Comment 2 Maik Qualmann 2022-02-09 11:42:53 UTC
Git commit 10b51c38038628b4b2f4e00365fd9dc96fb56560 by Maik Qualmann.
Committed on 09/02/2022 at 11:41.
Pushed by mqualmann into branch 'master'.

try to download face data from fixed alternate servers
FIXED-IN: 7.6.0

M  +1    -1    NEWS
M  +22   -11   core/utilities/setup/downloader/filesdownloader.cpp

https://invent.kde.org/graphics/digikam/commit/10b51c38038628b4b2f4e00365fd9dc96fb56560
Comment 3 Maik Qualmann 2024-03-28 07:31:57 UTC
Git commit 5f59408034214605a359ad35d13ee966ac9dac25 by Maik Qualmann.
Committed on 28/03/2024 at 07:30.
Pushed by mqualmann into branch 'master'.

remove fixed alternative download server,
at the request of the KDE Sysadmin.
The Geo IP databases for the mirror
servers used have been updated.
Related: bug 483995

M  +9    -26   core/utilities/setup/downloader/filesdownloader.cpp [INFRASTRUCTURE]

https://invent.kde.org/graphics/digikam/-/commit/5f59408034214605a359ad35d13ee966ac9dac25