← Back to issue list

Snapcraft doesn't properly handle temporary Internet connection breakage when downloading packages.

View original Github issue

Metadata

Project
snapcraft
Number
#5627
Type
issue
State
closed
Author
ofry
Labels
—
Created
Updated
Closed

Current evaluation

Closed without a code fix: reporter's V2RayA networking settings were the cause; maintainer mr-cal explained Snapcraft intentionally does not auto-retry since transient disconnects are indistinguishable from real proxy/firewall errors.

Resolution: closed not a bug

Reason: Maintainer mr-cal closed the discussion on 2025-07-21 stating 'We don't retry automatically because Snapcraft doesn't know the nature of the failure. It could be due to a random disconnection or it could be due to an actual issue, such as a misconfigured proxy or firewall.' The reporter had already confirmed changing V2RayA settings made the build work, and no retry logic was added (no matching commits for clone/download retry in snapcraft history).

Evaluated by: mr-cal-bot

No scores available.

Issue body

### Bug Description I'm trying to build https://github.com/ofry/qt-snapcraft-test-project But it crashes every time when Internet connection breaks for one or two seconds. ### To Reproduce Just try to compile the snap under unstable Internet connection. For example: computer have Internet access through router with OpenWRT OS with additional software to circumvent censorship, as V2RayA. Or try to disconnect, then connect PC to Internet again manually when it's performing the snap build operation. ### Environment OS: KUbuntu 25.04 Snapcraft 8.10.1 LXD snap is installed. ### snapcraft.yaml ```yaml name: qt version: 6.9.1 summary: Qt description: Qt base: core24 grade: stable confinement: strict compression: lzo apps: gallery: command: usr/examples/widgets/gallery/bin/gallery extensions: [gnome] parts: qt: source: https://github.com/qt/qt5.git source-depth: 1 source-tag: v6.9.1 source-submodules: - qtbase - qtsvg - qtwayland plugin: cmake build-environment: - LDFLAGS: ${LDFLAGS:+$LDFLAGS} -s build-packages: - libssl-dev - libxcb-cursor-dev - libxcb-glx0-dev - libxcb-icccm4-dev - libxcb-image0-dev - libxcb-keysyms1-dev - libxcb-randr0-dev - libxcb-render-util0-dev - libxcb-shape0-dev - libxcb-sync-dev - libxcb-util-dev - libxcb-xfixes0-dev - libxcb-xkb-dev - libxkbcommon-x11-dev stage-packages: - libssl3t64 - libxcb-cursor0 - libxcb-glx0 - libxcb-icccm4 - libxcb-image0 - libxcb-keysyms1 - libxcb-randr0 - libxcb-render-util0 - libxcb-shape0 - libxcb-sync1 - libxcb-util1 - libxcb-xfixes0 - libxcb-xkb1 - libxkbcommon-x11-0 cmake-generator: Ninja cmake-parameters: - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=/usr - -DINSTALL_LIBDIR=/usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR - -DQT_BUILD_EXAMPLES=ON - -DINPUT_libjpeg=qt - -DINPUT_openssl=linked prime: - -./usr/bin - -./usr/doc - -./usr/include - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/cmake - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/pkgconfig - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.a - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.la - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.prl - -./usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/*.so - -./usr/libexec - -./usr/metatypes - -./usr/mkspecs - -./usr/modules - -./usr/sbom - -./**/objects-* ``` ### Relevant log output ```shell :: 2025-07-18 08:35:28.042 Executing: /snap/snapcraft/15369/libexec/snapcraft/craft.git clone --recursive=qtbase --recursive=qtsvg --recursive=qtwayland --branch v6.9.1 --depth 1 https://github.com/qt/qt5.git :: 2025-07-18 08:35:28.288 :: Cloning into '/root/parts/qt/src'... :: 2025-07-18 08:35:31.088 :: fatal: unable to access 'https://github.com/qt/qt5.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated. :: 2025-07-18 08:35:31.149 Failed to pull source: command ['/snap/snapcraft/15369/libexec/snapcraft/craft.git', 'clone', '--recursive=qtbase', '--recursive=qtsvg', '--recursive=qtwayland', '--branch', 'v6.9.1', '--depth', '1', 'https://github.com/qt/qt5.git', '/root/parts/qt/src'] exited with code 128. ``` ### Additional context System-wide git performs cloning successfully: ``` git clone --recursive=qtbase --recursive=qtsvg --recursive=qtwayland --branch v6.9.1 --depth 1 https://github.com/qt/qt5.git Клонирование в «qt5»... remote: Enumerating objects: 1282, done. remote: Counting objects: 100% (1282/1282), done. remote: Compressing objects: 100% (777/777), done. remote: Total 1282 (delta 539), reused 896 (delta 386), pack-reused 0 (from 0) Получение объектов: 100% (1282/1282), 479.90 КиБ | 738.00 КиБ/с, готово. Определение изменений: 100% (539/539), готово. Примечание: переключение на «a99aafab4cfbbf650493c9a4feb5a1bb4a09d1d2». Вы сейчас в состоянии «отсоединённого указателя HEAD». Можете осмотреться, внести экспериментальные изменения и зафиксировать их, также можете отменить любые коммиты, созданные в этом состоянии, не затрагивая другие ветки, переключившись обратно на любую ветку. Если хотите создать новую ветку для сохранения созданных коммитов, можете сделать это (сейчас или позже), используя команду switch с параметром -c. Например: git switch -c <новая-ветка> Или отмените эту операцию с помощью: git switch - Отключите этот совет, установив переменную конфигурации advice.detachedHead в значение false Подмодуль «qtbase» (https://github.com/qt/qtbase.git) зарегистрирован по пути «qtbase» Подмодуль «qtsvg» (https://github.com/qt/qtsvg.git) зарегистрирован по пути «qtsvg» Подмодуль «qtwayland» (https://github.com/qt/qtwayland.git) зарегистрирован по пути «qtwayland» Клонирование в «/home/ofry/IdeaProjects/qt5/qtbase»... remote: Enumerating objects: 937648, done. remote: Counting objects: 100% (3359/3359), done. remote: Compressing objects: 100% (1519/1519), done. remote: Total 937648 (delta 2226), reused 2090 (delta 1839), pack-reused 934289 (from 3) Получение объектов: 100% (937648/937648), 694.28 МиБ | 678.00 КиБ/с, готово. Определение изменений: 100% (740188/740188), готово. Клонирование в «/home/ofry/IdeaProjects/qt5/qtsvg»... remote: Enumerating objects: 12655, done. remote: Counting objects: 100% (434/434), done. remote: Compressing objects: 100% (286/286), done. remote: Total 12655 (delta 239), reused 293 (delta 146), pack-reused 12221 (from 2) Получение объектов: 100% (12655/12655), 6.22 МиБ | 669.00 КиБ/с, готово. Определение изменений: 100% (8268/8268), готово. Клонирование в «/home/ofry/IdeaProjects/qt5/qtwayland»... remote: Enumerating objects: 50565, done. remote: Counting objects: 100% (233/233), done. remote: Compressing objects: 100% (164/164), done. remote: Total 50565 (delta 95), reused 173 (delta 69), pack-reused 50332 (from 2) Получение объектов: 100% (50565/50565), 15.38 МиБ | 695.00 КиБ/с, готово. Определение изменений: 100% (35997/35997), готово. fatal: «https://github.com/qt/qtbase.git/» недоступно: GnuTLS, handshake failed: Соединение TLS было завершено неправильно. Unable to fetch in submodule path 'qtbase'; trying to directly fetch 2ad23cd72d5f122f88ce95792a4323d639c27d25: remote: Enumerating objects: 8141, done. remote: Counting objects: 100% (2196/2196), done. remote: Compressing objects: 100% (6/6), done. remote: Total 8141 (delta 2191), reused 2190 (delta 2190), pack-reused 5945 (from 1) Получение объектов: 100% (8141/8141), 2.99 МиБ | 657.00 КиБ/с, готово. Определение изменений: 100% (6530/6530), завершено с 487 локальными объектами. Из https://github.com/qt/qtbase * branch 2ad23cd72d5f122f88ce95792a4323d639c27d25 -> FETCH_HEAD Submodule path 'qtbase': checked out '2ad23cd72d5f122f88ce95792a4323d639c27d25' remote: Enumerating objects: 245, done. remote: Counting objects: 100% (163/163), done. remote: Compressing objects: 100% (44/44), done. remote: Total 245 (delta 143), reused 119 (delta 119), pack-reused 82 (from 2) Получение объектов: 100% (245/245), 40.60 КиБ | 884.00 КиБ/с, готово. Определение изменений: 100% (161/161), завершено с 13 локальными объектами. Из https://github.com/qt/qtsvg * branch eac4588150968e3cdfcee06a4ccfa5aec4c4b938 -> FETCH_HEAD Submodule path 'qtsvg': checked out 'eac4588150968e3cdfcee06a4ccfa5aec4c4b938' remote: Enumerating objects: 293, done. remote: Counting objects: 100% (226/226), done. remote: Compressing objects: 100% (42/42), done. remote: Total 293 (delta 197), reused 184 (delta 184), pack-reused 67 (from 2) Получение объектов: 100% (293/293), 65.68 КиБ | 810.00 КиБ/с, готово. Определение изменений: 100% (200/200), завершено с 42 локальными объектами. Из https://github.com/qt/qtwayland * branch b54d446eb64ef23a5e365d5b6ff6116c3a5b6051 -> FETCH_HEAD ```

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed not a bug Closed without a code fix: reporter's V2RayA networking settings were the cause; maintainer mr-cal explained Snapcraft intentionally does not auto-retry since transient disconnects are indistinguishable from real proxy/firewall errors.
stealth/space-bunny-alpha — closed not a bug Closed without a code fix: the reporter improved V2RayA networking, and a maintainer said Snapcraft intentionally does not retry because transient disconnects are indistinguishable from proxy or firewall problems.
stealth/space-bunny-alpha — closed not a bug Closed without a code fix after the reporter improved their V2RayA network configuration. The maintainer confirmed Snapcraft was not behaving differently from Git and declined automatic retries.
qwen/qwen3.6-35b-a3b — — Closed without a fix. Maintainers declined automatic retry logic for transient network failures, citing inability to distinguish temporary disconnects from genuine configuration errors. The reporter fixed the issue by improving their network.
qwen/qwen3.6-35b-a3b — — Rejected. Maintainers declined to implement automatic retry logic for transient network failures, as Snapcraft cannot distinguish between temporary disconnections and permanent configuration errors like misconfigured proxies or firewalls.
qwen/qwen3.6-35b-a3b — — Closed without a fix. Maintainers declined automatic retries for transient network drops, as Snapcraft cannot distinguish them from proxy or firewall misconfigurations. The reporter resolved their build by adjusting their network proxy settings.
qwen3.6-35b-a3b-mtp-q6 — — Closed without fix. Maintainers declined automatic retry logic for transient network drops, as Snapcraft cannot distinguish them from legitimate configuration errors. The issue closed after the user improved their network setup.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1869506 snapcraft crashes if machine not connected to internet snapcraft (launchpad) closed Offline builds were addressed by merged PR #3593 (commit 3dca4d860), which skips network operations in offline mode; a maintainer later said the fix appeared released.
70%