Dielee / volvo2mqtt

Home Assistant addon for connecting AAOS Volvos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failed to rebuild add-on

cperuffo3 opened this issue · comments

I keep getting an error on either re-install or rebuild:

"Failed to rebuild add-on
The command '/bin/ash -o pipefail -c pip install -r requirements.txt' returned a non-zero code: 1"

when attempting to start the add-on I cannot see any logs or anything else and the add-on fails to start with the error:

Failed to start add-on
Image 982ee2c4/aarch64-addon-volvo2mqtt:1.8.20 does not exist for addon_982ee2c4_volvo2mqtt

To Reproduce:

Happened while troubleshooting some volvo API permissions but seems unrelated. Originally appeared after removing the add-on and trying to re-install it. After restoring a prior backup this also happens when trying to rebuild the add-on

Expected behavior:

The add-on should rebuild successfully and restart.

Screenshots:

Screenshot 2023-12-12 224234

Screenshot 2023-12-12 224750

Version info:

Using latest HA (happened on previous version as well (11.4))
Add-on version 1.8.20

Logs:

It doesnt appear any logs are being generated because the add-on is not able to start.

I got the same error message "The command '/bin/ash -o pipefail -c pip install -r requirements.txt' returned a non-zero code: 1" when trying to install the addon V1.8.20

Home Assistant

Core 2023.12.1
Supervisor 2023.11.6
Operating System 11.2
Frontend 20231208.2

Same problem here
Screenshot 2023-12-13 at 10 27 27

Please share some supervisor logs from the installation

I’ve attached the full supervisor logs to this post but the summary log doesn’t seem to show any additional information.

home-assistant_2023-12-13T11-51-00.577Z.log

IMG_2932

Log Details (ERROR)
Logger: homeassistant.components.hassio
Source: components/hassio/websocket_api.py:138
Integration: Home Assistant Supervisor (documentation, issues)
First occurred: 12 December 2023 at 20:43:48 (7 occurrences)
Last logged: 10:27:14

Failed to to call /store/repositories - Can't add https://github.com/Dielee/volvo2mqtt, already in the store
Failed to to call /addons/982ee2c4_volvo2mqtt/install - The command '/bin/ash -o pipefail -c pip install -r requirements.txt' returned a non-zero code: 1

now realized you asked for supervisor logs which... in hindsight.... provide WAY more useful information:)

Find these below:

23-12-13 09:01:00 ERROR (MainThread) [supervisor.docker.addon] Can't build 982ee2c4/aarch64-addon-volvo2mqtt:1.8.20: The command '/bin/ash -o pipefail -c pip install -r requirements.txt' returned a non-zero code: 1
23-12-13 09:01:00 ERROR (MainThread) [supervisor.docker.addon] Build log: 
Step 1/15 : ARG BUILD_FROM


Step 2/15 : FROM $BUILD_FROM


 ---> d524bbcac2d5

Step 3/15 : RUN apk add --no-cache python3 bash py3-pip


 ---> Using cache

 ---> 3b4685aef11d

Step 4/15 : WORKDIR /volvoAAOS2mqtt


 ---> Using cache

 ---> 62913c1f9701

Step 5/15 : RUN wget --no-cache https://raw.githubusercontent.com/Dielee/volvo2mqtt/main/requirements.txt


 ---> Using cache

 ---> 4ca63382c841

Step 6/15 : RUN pip install -r requirements.txt


 ---> Running in 74ebbdee88fe

error: externally-managed-environment

× This environment is externally managed
╰─> 
    The system-wide python installation should be maintained using the system
    package manager (apk) only.
    
    If the package in question is not packaged already (and hence installable via
    "apk add py3-somepackage"), please consider installing it inside a virtual
    environment, e.g.:
    
    python3 -m venv /path/to/venv
    . /path/to/venv/bin/activate
    pip install mypackage
    
    To exit the virtual environment, run:
    
    deactivate
    
    The virtual environment is not deleted, and can be re-entered by re-sourcing
    the activate file.
    
    To automatically manage virtual environments, consider using pipx (from the
    pipx package).

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

Removing intermediate container 74ebbdee88fe

supervisor_2023-12-13T14-01-31.360Z.log

Are you using an rpi ?
And which python version ?

Are you using an rpi ? And which python version ?

Yes I’m using an RPI on a standard default HASS install.

whatever version is in Core 2024.12.1 …. I think it’s 3.12?

This is a python 3.11 issue... https://community.home-assistant.io/t/custom-addon-pep668-compliance/654786/2
I will take a look tomorrow how this is fixable.

Same error here, I wanted to start with this awesome integration. I am running HassOS.

Core 2023.12.2
Supervisor 2023.11.6
Operating System 11.2
Frontend 20231208.2
Python 3.11

Looking forward to a fix, let me know if I can test something for you.

Please test v1.8.21!

Awesome! I've just tested the new version, it's works correctly. I am able to install it without any errors.

I'm also able to install without any errors. I did notice that some endpoints are not supported... but they should be? XC40 nl_BE

Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Battery Charge Level is unfortunately not supported by your vehicle.
Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Battery Charge Level is unfortunately not supported by your vehicle.
Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Electric Range is unfortunately not supported by your vehicle.
Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Estimated Charging Time is unfortunately not supported by your vehicle.
Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Charging System Status is unfortunately not supported by your vehicle.
Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Charging Connection Status is unfortunately not supported by your vehicle.
Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Estimated Charging Finish Time is unfortunately not supported by your

I'm also able to install without any errors. I did notice that some endpoints are not supported... but they should be? XC40 nl_BE

Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Battery Charge Level is unfortunately not supported by your vehicle. Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Battery Charge Level is unfortunately not supported by your vehicle. Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Electric Range is unfortunately not supported by your vehicle. Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Estimated Charging Time is unfortunately not supported by your vehicle. Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Charging System Status is unfortunately not supported by your vehicle. Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Charging Connection Status is unfortunately not supported by your vehicle. Dec 14 10:37:27 volvo2mqtt [106] - INFO: Failed, Estimated Charging Finish Time is unfortunately not supported by your

This looks like there are some api issues. But please don't hijack this thread for your needs.

Managed to install now. Thanks for quick support @Dielee