Snap packages are not showing or updating
Snap packages are not showing in the list, neither on initial update tab nor after searching a snap package. I have installed and enabled snapd service and on official snap store they are showing and installing. Software Environment bauh version: 0.10.7 O.S: Garuda-Kde Python version: 3.12.4 Installation method: pacman
P.S: these instructions and the template must be respected, otherwise your issue will be closed.
@rairay91 I'll take a look....
I can confirm the bug ... it's something related to the Snapd API
Noticed this error (Ubuntu 24.04)
urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x747bdb96f110>: Failed to resolve 'snapd' ([Errno -3] Temporary failure in name resolution)
Full error
Exception in thread Thread-16 (_fill_read_installed):
Traceback (most recent call last):
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/urllib3/connection.py", line 198, in _new_conn
sock = connection.create_connection(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-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.12/socket.py", line 963, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -3] Temporary failure in name resolution
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/urllib3/connectionpool.py", line 787, in urlopen
response = self._make_request(
^^^^^^^^^^^^^^^^^^^
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/urllib3/connectionpool.py", line 493, in _make_request
conn.request(
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/urllib3/connection.py", line 445, in request
self.endheaders()
File "/usr/lib/python3.12/http/client.py", line 1331, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.12/http/client.py", line 1091, in _send_output
self.send(msg)
File "/usr/lib/python3.12/http/client.py", line 1035, in send
self.connect()
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/urllib3/connection.py", line 276, in connect
self.sock = self._new_conn()
^^^^^^^^^^^^^^^^
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/urllib3/connection.py", line 205, in _new_conn
raise NameResolutionError(self.host, self, e) from e
urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x747bdb96f110>: Failed to resolve 'snapd' ([Errno -3] Temporary failure in name resolution)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/requests/adapters.py", line 667, in send
resp = conn.urlopen(
^^^^^^^^^^^^^
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/urllib3/connectionpool.py", line 841, in urlopen
retries = retries.increment(
^^^^^^^^^^^^^^^^^^
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/urllib3/util/retry.py", line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='snapd', port=80): Max retries exceeded with url: /v2/apps (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x747bdb96f110>: Failed to resolve 'snapd' ([Errno -3] Temporary failure in name resolution)"))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.12/threading.py", line 1073, in _bootstrap_inner
self.run()
File "/usr/lib/python3.12/threading.py", line 1010, in run
self._target(*self._args, **self._kwargs)
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/bauh/view/core/controller.py", line 206, in _fill_read_installed
man_res = man.read_installed(disk_loader=disk_loader, pkg_types=None, internet_available=internet_available,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/bauh/gems/snap/controller.py", line 94, in read_installed
app_names = {a['snap'] for a in snapd_client.list_only_apps()}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/bauh/gems/snap/snapd.py", line 90, in list_only_apps
res = self.session.get(f'{URL_BASE}/apps')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "$HOME/.local/share/uv/tools/bauh/lib/python3.12/site-packages/requests/adapters.py", line 700, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='snapd', port=80): Max retries exceeded with url: /v2/apps (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x747bdb96f110>: Failed to resolve 'snapd' ([Errno -3] Temporary failure in name resolution)"))
can we merge this?
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/urllib3/connection.py", line 198, in _new_conn
sock = connection.create_connection(
(self._dns_host, self.port),
...<2 lines>...
socket_options=self.socket_options,
)
File "/usr/lib/python3.13/site-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.13/socket.py", line 977, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -2] Name or service not known
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/urllib3/connectionpool.py", line 787, in urlopen
response = self._make_request(
conn,
...<10 lines>...
**response_kw,
)
File "/usr/lib/python3.13/site-packages/urllib3/connectionpool.py", line 493, in _make_request
conn.request(
~~~~~~~~~~~~^
method,
^^^^^^^
...<6 lines>...
enforce_content_length=enforce_content_length,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/usr/lib/python3.13/site-packages/urllib3/connection.py", line 494, in request
self.endheaders()
~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/http/client.py", line 1333, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/http/client.py", line 1093, in _send_output
self.send(msg)
~~~~~~~~~^^^^^
File "/usr/lib/python3.13/http/client.py", line 1037, in send
self.connect()
~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/urllib3/connection.py", line 325, in connect
self.sock = self._new_conn()
~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/urllib3/connection.py", line 205, in _new_conn
raise NameResolutionError(self.host, self, e) from e
urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPConnection object at 0x7f7a6e72c980>: Failed to resolve 'snapd' ([Errno -2] Name or service not known)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.13/site-packages/requests/adapters.py", line 644, in send
resp = conn.urlopen(
method=request.method,
...<9 lines>...
chunked=chunked,
)
File "/usr/lib/python3.13/site-packages/urllib3/connectionpool.py", line 841, in urlopen
retries = retries.increment(
method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
)
File "/usr/lib/python3.13/site-packages/urllib3/util/retry.py", line 519, in increment
raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='snapd', port=80): Max retries exceeded with url: /v2/apps (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7f7a6e72c980>: Failed to resolve 'snapd' ([Errno -2] Name or service not known)"))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.13/threading.py", line 1043, in _bootstrap_inner
self.run()
~~~~~~~~^^
File "/usr/lib/python3.13/threading.py", line 994, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/bauh/view/core/controller.py", line 206, in _fill_read_installed
man_res = man.read_installed(disk_loader=disk_loader, pkg_types=None, internet_available=internet_available,
limit=-1, only_apps=False)
File "/usr/lib/python3.13/site-packages/bauh/gems/snap/controller.py", line 94, in read_installed
app_names = {a['snap'] for a in snapd_client.list_only_apps()}
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/lib/python3.13/site-packages/bauh/gems/snap/snapd.py", line 90, in list_only_apps
res = self.session.get(f'{URL_BASE}/apps')
File "/usr/lib/python3.13/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.13/site-packages/requests/sessions.py", line 589, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.13/site-packages/requests/sessions.py", line 703, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.13/site-packages/requests/adapters.py", line 677, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPConnectionPool(host='snapd', port=80): Max retries exceeded with url: /v2/apps (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7f7a6e72c980>: Failed to resolve 'snapd' ([Errno -2] Name or service not known)"))