← Back to issue list

DNS error causes cascading exception failure

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1739954
Type
issue
State
open
Author
~rogpeppe
Labels
—
Created
Updated
Closed
—

Current evaluation

Snapcraft 2.34 turns a DNS outage during store push into a confusing urllib3 Retry TypeError; the old issue has no triage activity and needs reassessment against current error handling.

Suggested action: needs triage

Reason: The report provides a concrete command, Snapcraft 2.34 version, and a full traceback ending in "TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'"; the issue has no labels, comments, assignee, or maintainer response, so it has not been assessed. The current checkout wraps requests connection failures as NetworkError in craft-store and catches CraftStoreError in Snapcraft, but no resolving commit or issue-specific fix was identified, so the historical report should be rechecked rather than closed.

Evaluated by: mr-cal-bot

Impact: 32 Quick Win: 14 Complexity: 42 Confidence: 78 Actionability: 75

Issue body

My internet was dodgy today, but a DNS failure probably shouldn't be displayed like this. Snapcraft 2.34. % snapcraft push hydroctl_15_multi.snap Pushing hydroctl_15_multi.snap Preparing to push '/home/rog/src/go/src/github.com/rogpeppe/hydro/snap/hydroctl_15_multi.snap' to the store. Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/urllib3/connection.py", line 141, in _new_conn (self.host, self.port), self.timeout, **extra_kw) File "/usr/local/lib/python3.5/dist-packages/urllib3/util/connection.py", line 60, in create_connection for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM): File "/usr/lib/python3.5/socket.py", line 732, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 601, in urlopen chunked=chunked) File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 346, in _make_request self._validate_conn(conn) File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 850, in _validate_conn conn.connect() File "/usr/local/lib/python3.5/dist-packages/urllib3/connection.py", line 284, in connect conn = self._new_conn() File "/usr/local/lib/python3.5/dist-packages/urllib3/connection.py", line 150, in _new_conn self, "Failed to establish a new connection: %s" % e) urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x7f1175d97518>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/bin/snapcraft", line 9, in <module> load_entry_point('snapcraft==2.34', 'console_scripts', 'snapcraft')() File "/home/rog/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 561, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/home/rog/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2627, in load_entry_point return ep.load() File "/home/rog/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2287, in load return self.resolve() File "/home/rog/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2293, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/usr/lib/python3/dist-packages/snapcraft/cli/__main__.py", line 19, in <module> run(prog_name='snapcraft') File "/usr/lib/python3/dist-packages/click/core.py", line 716, in __call__ return self.main(*args, **kwargs) File "/usr/lib/python3/dist-packages/click/core.py", line 696, in main rv = self.invoke(ctx) File "/usr/lib/python3/dist-packages/click/core.py", line 1060, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/usr/lib/python3/dist-packages/click/core.py", line 889, in invoke return ctx.invoke(self.callback, **ctx.params) File "/usr/lib/python3/dist-packages/click/core.py", line 534, in invoke return callback(*args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/cli/store.py", line 118, in push snapcraft.push(snap_file, channel_list) File "/usr/lib/python3/dist-packages/snapcraft/_store.py", line 400, in push store.push_precheck(snap_name) File "/usr/lib/python3/dist-packages/snapcraft/storeapi/__init__.py", line 220, in push_precheck self.sca.snap_push_precheck, snap_name) File "/usr/lib/python3/dist-packages/snapcraft/storeapi/__init__.py", line 184, in _refresh_if_necessary return func(*args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/storeapi/__init__.py", line 585, in snap_push_precheck 'Accept': 'application/json'}) File "/usr/lib/python3/dist-packages/snapcraft/storeapi/__init__.py", line 132, in post return self.request('POST', url, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/storeapi/__init__.py", line 537, in request response = super().request(*args, **kwargs) File "/usr/lib/python3/dist-packages/snapcraft/storeapi/__init__.py", line 123, in request params=params, **kwargs) File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 508, in request resp = self.send(prep, **send_kwargs) File "/usr/local/lib/python3.5/dist-packages/requests/sessions.py", line 618, in send r = adapter.send(request, **kwargs) File "/usr/local/lib/python3.5/dist-packages/requests/adapters.py", line 440, in send timeout=timeout File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 639, in urlopen _stacktrace=sys.exc_info()[2]) File "/usr/local/lib/python3.5/dist-packages/urllib3/util/retry.py", line 337, in increment total -= 1 TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 32
Quick Win: 14
Complexity: 42
Confidence: 78
Actionability: 75
needs triage Snapcraft 2.34 turns a DNS outage during store push into a confusing urllib3 Retry TypeError; the old issue has no triage activity and needs reassessment against current error handling.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 22
Complexity: 20
Confidence: 95
Actionability: 90
close resolved DNS error in snapcraft 2.34 caused a cascading TypeError in urllib3 retry logic. The storeapi module and old urllib3 version no longer exist in the current codebase.
qwen/qwen3.8-27b
Impact: 20
Quick Win: 15
Staleness: 95
Complexity: 25
Confidence: 70
Support Request: 10
close stale Snapcraft 2.34 push dumps a raw urllib3/requests traceback (ending in a Retry TypeError) on DNS failure instead of a friendly error. 8.7 years old, no comments or labels; affected version and storeapi code long since replaced.
qwen/qwen3.6-35b-a3b
Staleness: 100
Complexity: 30
Confidence: 95
Support Request: 0
close stale DNS failure during snapcraft push triggers a confusing cascading TypeError instead of a clear error message. Reported for snapcraft 2.34, over 8 years ago with no activity.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 15
Confidence: 90
Support Request: 10
close stale Snapcraft 2.34 push command crashes with a TypeError during urllib3 retry handling when a DNS resolution failure occurs. Issue is over 8 years old with no maintainer interaction.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 30
Confidence: 85
Support Request: 10
close stale DNS resolution failure triggers a cascading TypeError in snapcraft 2.34 due to urllib3 retry logic. Issue is over 8 years old and on an unsupported version.

Update history

Date Change
created

Related issues

No related issues found above the similarity threshold.