← Back to issue list

snapcraft crashes if machine not connected to internet

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1869506
Type
issue
State
closed
Author
~keshavnrj
Labels
—
Created
Updated
Closed

Current evaluation

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.

Resolution: closed resolved

Reason: PR #3593 was merged as commit 3dca4d860, with implementation commit edb9e2864 explicitly addressing lifecycle and provider network operations in offline mode. A maintainer said in 2022 that the fix was believed to have been released.

Evaluated by: mr-cal-bot

No scores available.

Issue body

snapcraft both from stable and edge channel crashes if the machine have no internet access. snapcraft.yaml(https://paste.ubuntu.com/p/fF5Wrv5hny/) Note that the snap file has nothing that has to be downloaded (no stage-packages property). `snapcraft --destructive-mode` won't even work.(Where there is no need to create a VM) Traceback: `Traceback (most recent call last): File "/snap/snapcraft/4332/bin/snapcraft", line 11, in <module> load_entry_point('snapcraft==3.9.1', 'console_scripts', 'snapcraft')() File "/snap/snapcraft/4332/lib/python3.6/site-packages/click/core.py", line 829, in __call__ return self.main(*args, **kwargs) File "/snap/snapcraft/4332/lib/python3.6/site-packages/click/core.py", line 782, in main rv = self.invoke(ctx) File "/snap/snapcraft/4332/lib/python3.6/site-packages/click/core.py", line 1259, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/snap/snapcraft/4332/lib/python3.6/site-packages/snapcraft/cli/_command.py", line 88, in invoke return super().invoke(ctx) File "/snap/snapcraft/4332/lib/python3.6/site-packages/click/core.py", line 1066, in invoke return ctx.invoke(self.callback, **ctx.params) File "/snap/snapcraft/4332/lib/python3.6/site-packages/click/core.py", line 610, in invoke return callback(*args, **kwargs) File "/snap/snapcraft/4332/lib/python3.6/site-packages/snapcraft/cli/lifecycle.py", line 280, in snap _execute(steps.PRIME, parts=[], pack_project=True, output=output, **kwargs) File "/snap/snapcraft/4332/lib/python3.6/site-packages/snapcraft/cli/lifecycle.py", line 78, in _execute lifecycle.execute(step, project_config, parts) File "/snap/snapcraft/4332/lib/python3.6/site-packages/snapcraft/internal/lifecycle/_runner.py", line 104, in execute installed_snaps += repo.snaps.install_snaps([content_snap]) File "/snap/snapcraft/4332/lib/python3.6/site-packages/snapcraft/internal/repo/snaps.py", line 298, in install_snaps snap_pkg_channel = snap_pkg.get_store_snap_info()["channel"] TypeError: 'NoneType' object is not subscriptable `

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved 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.
stealth/space-bunny-alpha — closed resolved Offline handling was fixed by snapcraft PR #3502 (commit 7ab76e084); follow-up 4c63e5937 removed the extra store query. Later crashes persisted in versions 7.2.6–8.0.3.
stealth/space-bunny-alpha — closed stale Closed as stale without a documented fix. Matching Launchpad bug #1869506 was abandoned after inactivity; later PRs #3577 and #3593 added experimental offline support.
qwen/qwen3.6-35b-a3b — — Closed and abandoned due to inactivity. Snapcraft crashed with a NoneType error when fetching store metadata offline, blocking builds without internet. No fix or resolution was documented.
qwen/qwen3.6-35b-a3b — — Closed. Fixed a crash causing a TypeError when running offline by handling missing snap store responses.
qwen/qwen3.6-35b-a3b — — Closed and abandoned without resolution. The snapcraft offline crash remains unfixed due to inactivity.
qwen3.6-35b-a3b-mtp-q6 — — Closed without resolution. The offline snapcraft crash issue was abandoned due to prolonged inactivity.

Update history

Date Change
created

Related work

  • Likely Fixed By: snapcraft#3593 (confidence 94%)

    Its offline-mode changes directly target unnecessary network access during builds without downloadable parts.

Related issues

Issue Project State Summary Similarity
#5627 Snapcraft doesn't properly handle temporary Internet connection breakage when downloading packages. snapcraft closed 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.
70%