giaever-online-iot / home-assistant-snap

Snap recipe for the Open source home automation software that puts local control and privacy first.
Apache License 2.0
21 stars 3 forks source link

Cannot upgrade HACS #3

Closed ThyMYthOS closed 3 years ago

ThyMYthOS commented 3 years ago

Snap 2021.9.6 2021-09-14 (373)

Error log:

Sep 15 22:19:56 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: 2021-09-15 20:19:56 WARNING (MainThread) [homeassistant.components.updater]
Sep 15 22:19:56 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: NOTE! Using a replacement (custom) 'updater' component for the snap package.
Sep 15 22:19:56 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: Do NOT report bugs of any kind related to 'updater' to the Home Assistant core project.
Sep 15 22:19:56 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: Report any issues at https://github.com/home-assistant-snap/home-assistant-snap/issues
Sep 15 22:20:01 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: 2021-09-15 20:20:01 WARNING (MainThread) [homeassistant.components.updater]
Sep 15 22:20:01 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: NOTE! Using a replacement (custom) 'updater' component for the snap package.
Sep 15 22:20:01 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: Do NOT report bugs of any kind related to 'updater' to the Home Assistant core project.
Sep 15 22:20:01 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: Report any issues at https://github.com/home-assistant-snap/home-assistant-snap/issues
Sep 15 22:20:13 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: 2021-09-15 20:20:13 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package aiogithubapi>=21.8.1: ERROR: Will not install to the user site because it will lack sys.path precedence to aiogithubapi in /snap/home-assistant-snap/373/lib/python3.8/site-packages
Sep 15 22:20:13 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: WARNING: You are using pip version 20.2.4; however, version 21.2.4 is available.
Sep 15 22:20:13 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: You should consider upgrading via the '/snap/home-assistant-snap/373/bin/python3 -m pip install --upgrade pip' command.
Sep 15 22:20:13 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: 2021-09-15 20:20:13 ERROR (MainThread) [homeassistant.setup] Setup failed for hacs: Requirements for hacs not found: ['aiogithubapi>=21.8.1'].
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: 2021-09-15 20:20:22 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: Traceback (most recent call last):
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:   File "/snap/home-assistant-snap/373/lib/python3.8/site-packages/homeassistant/components/usb/__init__.py", line 108, in async_start
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:     await self._async_scan_serial()
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:   File "/snap/home-assistant-snap/373/lib/python3.8/site-packages/homeassistant/components/usb/__init__.py", line 202, in _async_scan_serial
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:     self._async_process_ports(await self.hass.async_add_executor_job(comports))
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:   File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:     result = self.fn(*self.args, **self.kwargs)
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:   File "/snap/home-assistant-snap/373/lib/python3.8/site-packages/serial/tools/list_ports_linux.py", line 102, in comports
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:     for info in [SysFS(d) for d in devices]
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:   File "/snap/home-assistant-snap/373/lib/python3.8/site-packages/serial/tools/list_ports_linux.py", line 102, in <listcomp>
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:     for info in [SysFS(d) for d in devices]
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:   File "/snap/home-assistant-snap/373/lib/python3.8/site-packages/serial/tools/list_ports_linux.py", line 48, in __init__
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]:     num_if = int(self.read_line(self.usb_device_path, 'bNumInterfaces'))
Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
jmgiaever commented 3 years ago

Hi, Can you test the last revision in the latest/edge channel? sudo snap switch home-assistant-snap --channel=latest/edgeI haven't been able to debug this fully, because of a day full of work. You can revert any changes, if it fails, withsudo snap revert home-assistant-snapThen switch channel again to the one you're currently on. On 15 Sep 2021 22:27, Manuel Stahl @.> wrote: Snap 2021.9.6 2021-09-14 (373) Error log: Sep 15 22:19:56 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: 2021-09-15 20:19:56 WARNING (MainThread) [homeassistant.components.updater] Sep 15 22:19:56 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: NOTE! Using a replacement (custom) 'updater' component for the snap package. Sep 15 22:19:56 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: Do NOT report bugs of any kind related to 'updater' to the Home Assistant core project. Sep 15 22:19:56 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: Report any issues at https://github.com/home-assistant-snap/home-assistant-snap/issues Sep 15 22:20:01 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: 2021-09-15 20:20:01 WARNING (MainThread) [homeassistant.components.updater] Sep 15 22:20:01 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: NOTE! Using a replacement (custom) 'updater' component for the snap package. Sep 15 22:20:01 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: Do NOT report bugs of any kind related to 'updater' to the Home Assistant core project. Sep 15 22:20:01 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: Report any issues at https://github.com/home-assistant-snap/home-assistant-snap/issues Sep 15 22:20:13 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: 2021-09-15 20:20:13 ERROR (SyncWorker_1) [homeassistant.util.package] Unable to install package aiogithubapi>=21.8.1: ERROR: Will not install to the user site because it will lack sys.path precedence to aiogithubapi in /snap/home-assistant-snap/373/lib/python3.8/site-packages Sep 15 22:20:13 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: WARNING: You are using pip version 20.2.4; however, version 21.2.4 is available. Sep 15 22:20:13 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: You should consider upgrading via the '/snap/home-assistant-snap/373/bin/python3 -m pip install --upgrade pip' command. Sep 15 22:20:13 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: 2021-09-15 20:20:13 ERROR (MainThread) [homeassistant.setup] Setup failed for hacs: Requirements for hacs not found: ['aiogithubapi>=21.8.1']. Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: 2021-09-15 20:20:22 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: Traceback (most recent call last): Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: File "/snap/home-assistant-snap/373/lib/python3.8/site-packages/homeassistant/components/usb/init.py", line 108, in async_start Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: await self._async_scan_serial() Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: File "/snap/home-assistant-snap/373/lib/python3.8/site-packages/homeassistant/components/usb/init.py", line 202, in _async_scan_serial Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: self._async_process_ports(await self.hass.async_add_executor_job(comports)) Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: result = self.fn(self.args, self.kwargs) Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: File "/snap/home-assistant-snap/373/lib/python3.8/site-packages/serial/tools/list_ports_linux.py", line 102, in comports Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: for info in [SysFS(d) for d in devices] Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: File "/snap/home-assistant-snap/373/lib/python3.8/site-packages/serial/tools/list_ports_linux.py", line 102, in Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: for info in [SysFS(d) for d in devices] Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: File "/snap/home-assistant-snap/373/lib/python3.8/site-packages/serial/tools/list_ports_linux.py", line 48, in init Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: num_if = int(self.read_line(self.usb_device_path, 'bNumInterfaces')) Sep 15 22:20:23 ubnt-ctrl home-assistant-snap.home-assistant-snap[767941]: TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'

—You are receiving this because you are subscribed to this thread.Reply to this email directly, view it on GitHub, or unsubscribe.Triage notifications on the go with GitHub Mobile for iOS or Android.

ThyMYthOS commented 3 years ago

Thanks for your super fast reply!

Seems the edge version 2021-09-15 (376) still has issues:

2021-09-16 06:54:28 ERROR (SyncWorker_4) [homeassistant.util.package] Unable to install package aiogithubapi>=21.8.1: ERROR: Will not install to the user site because it will lack sys.path precedence to aiogithubapi in /snap/home-assistant-snap/376/lib/python3.8/site-packages
WARNING: You are using pip version 20.2.4; however, version 21.2.4 is available.
You should consider upgrading via the '/snap/home-assistant-snap/376/bin/python3 -m pip install --upgrade pip' command.
2021-09-16 06:54:28 ERROR (MainThread) [homeassistant.setup] Setup failed for hacs: Requirements for hacs not found: ['aiogithubapi>=21.8.1'].

Maybe you can pre-install aiogithubapi to the snap?

jmgiaever commented 3 years ago

Hi, I think it could make issues with future releases of Hacs if this requirement is bundled with the core snap (home-assistant-snap) as Hacs can upgrade independent of HA. System packages are not possible to upgrade as they are Read-Only, and that's why I prefer to find a solution where HA installs (user-packages) on behalf of Hacs as it's intented to do. User-packages is not RO.

jmgiaever commented 3 years ago

I'm getting back home this evening, from work, so I will be able to investigate this in depth then. Hopefully find a solution to it! :)

jmgiaever commented 3 years ago

Just a quick look at it now, it seems like aiogithubapi (but version 21.8.0) is now part of the core snap and bundled with it.

Ref: commit

and searching in the revisions I have installed shows that only 377 (2021.9.6, others are 2021.8.x) have it

$ ls /snap/home-assistant-snap/
352  361  377
$ sudo find /snap -name aiogithubapi*
/snap/home-assistant-snap/377/lib/python3.8/site-packages/aiogithubapi
/snap/home-assistant-snap/377/lib/python3.8/site-packages/aiogithubapi-21.8.0.dist-info

So seems like dependencies for Hacs and HA now conflicts. Version 21.8.1 vs 21.8.0.

jmgiaever commented 3 years ago

Looks like more is off with the revision. Venv files, such as bin/activate is also missing. That is strange and might be why things is not working as expected.

jmgiaever commented 3 years ago

Looks like more is off with the revision. Venv files, such as bin/activate is also missing. That is strange and might be why things is not working as expected.

Think I've solved this part. I need to build this and then continue debugging tonight. Joachim

jmgiaever commented 3 years ago

Talked with the developer of HACS, which also develops aiogithubapi. He said that since he's developing both, we could not expect a compatibility issue of HACS requiring a higher version. I will therefor remove this package from the snap. Hopefully it will be installed by HA on start, when it checks for requirements, but into the USER-SITE and not to the system-wide directory. The system-wide directory is RO.

I'm snapping av version of this now and hopefylly it will work as I think.

Screenshot from 2021-09-16 19-35-35

jmgiaever commented 3 years ago

Fixed in track latest and 2021.9 :) Build for armhf is still not out, but verified on both arm64 and amd64