/usr/bin/software-properties-gtk:TimeoutError:poll_for_magic_token:wait:_wait:get_magic_attach_token_info:request_url:readurl:urlopen:open:_open:_call_chain:https_open:do_open:getresponse:begin:_read_status:readinto:recv_into:read
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
software-properties (Ubuntu) |
Fix Released
|
High
|
Nathan Teodosio | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
* Impact
An error is triggered when opening the 'Enable Ubuntu Pro' dialog on a system not connected to internet
* Test case
Start software-
Verify the error track to ensure there is no report with the new version
https:/
* Regression potential
The fix is making the magic token request conditional to the connectivity status, if that was wrong we could end up in a situation where we should display a pincode but don't.
-----------
The Ubuntu Error Tracker has been receiving reports about a problem regarding software-
If you do not have access to the Ubuntu Error Tracker and are a software developer, you can request it at http://
Traceback (most recent call last):
File "/usr/lib/
response = wait(options)
File "/usr/lib/
return _wait(options, UAConfig())
File "/usr/lib/
wait_resp = contract.
File "/usr/lib/
response, _ = self.request_url(
File "/usr/lib/
response, headers = util.readurl(
File "/usr/lib/
resp = request.
File "/usr/lib/
return opener.open(url, data, timeout)
File "/usr/lib/
response = self._open(req, data)
File "/usr/lib/
result = self._call_
File "/usr/lib/
result = func(*args)
File "/usr/lib/
return self.do_
File "/usr/lib/
r = h.getresponse()
File "/usr/lib/
response.
File "/usr/lib/
version, status, reason = self._read_status()
File "/usr/lib/
line = str(self.
File "/usr/lib/
return self._sock.
File "/usr/lib/
return self.read(nbytes, buffer)
File "/usr/lib/
return self._sslobj.
TimeoutError: The read operation timed out
Related branches
- Sebastien Bacher: Approve
-
Diff: 12 lines (+2/-0)1 file modifiedsoftwareproperties/gtk/DialogUaAttach.py (+2/-0)
Changed in software-properties (Ubuntu): | |
assignee: | nobody → Nathan Teodosio (nteodosio) |
Changed in software-properties (Ubuntu): | |
status: | New → In Progress |
Changed in software-properties (Ubuntu): | |
importance: | Undecided → High |
Changed in software-properties (Ubuntu): | |
status: | In Progress → Fix Committed |
description: | updated |
description: | updated |
Since poll_for_ magic_token runs in a thread, a not handled exception raised there terminates only the polling thread and indicates some connection problem.
I cannot specifically get the TimeoutError (at least by disconnecting after initiating the Ubuntu Pro dialog), but rather ConnectivityError, as the API indeed specifies[1]. {unhandled- exception. log}
Simply ignoring the exceptions raised from wait() is fine {exception- caught. log}, but the user should likely be informed that the connection to the server is failing for whatever reason.
All in all, the reported error is innocuous but the UI should likely to warn the user about connectivity issue.
[1]: https:/ /github. com/canonical/ ubuntu- advantage- client/ blob/main/ docs/references /api.md# uproattachmagic waitv1