batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Unable to upgrade PredBat addon to 1.3.1

Open onetoomany opened this issue 1 month ago • 15 comments

Not sure if I should raise this issue here or under Predbat

Predbat
Installed version: 1.2.9
Latest version: 1.3.1

No changelog found for add-on 6adb4f0d_predbat!

Error updating Predbat: Can't execute command: 404 Client Error for http+docker://localhost/v1.51/images/docker.io/library/docker:28.3.3-cli/json: Not Found ("No such image: docker:28.3.3-cli")

2025-10-29 09:02:05.911 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139971587799488] Error handling message: Error updating Predbat: Can't execute command: 404 Client Error for http+docker://localhost/v1.51/images/docker.io/library/docker:28.3.3-cli/json: Not Found ("No such image: docker:28.3.3-cli") (home_assistant_error) xxxxxx from 208.127.xx.xx (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36)

onetoomany avatar Oct 29 '25 09:10 onetoomany

It should be on the predbat addon repository, but never mind.

My addon upgraded ok but I wonder if the issue is that this release is no longer on GitHub ?

gcoan avatar Oct 29 '25 11:10 gcoan

yes - I think that's ultimately the issue

onetoomany avatar Oct 30 '25 13:10 onetoomany

adding my error message for same operation

Error updating Predbat: Docker build failed for 6adb4f0d/aarch64-addon-predbat:1.3.1 (exit code 1). Build output: #0 building with "default" instance using docker driver #1 [internal] load build definition from Dockerfile #1 transferring dockerfile: 1.72kB 0.0s done #1 WARN: InvalidDefaultArgInFrom: Default value for ARG $BUILD_FROM results in empty or invalid base image name (line 4) #1 DONE 0.1s #2 [internal] load metadata for ghcr.io/hassio-addons/ubuntu-base:10.0.5 #2 ERROR: failed to authorize: failed to fetch anonymous token: Get "https://ghcr.io/token?scope=repository%3Ahassio-addons%2Fubuntu-base%3Apull&service=ghcr.io": dial tcp: lookup ghcr.io on 127.0.0.11:53: read udp 127.0.0.1:55955->127.0.0.11:53: i/o timeout ------ > [internal] load metadata for ghcr.io/hassio-addons/ubuntu-base:10.0.5: ------ [33m1 warning found (use docker --debug to expand): [0m - InvalidDefaultArgInFrom: Default value for ARG $BUILD_FROM results in empty or invalid base image name (line 4) Dockerfile:4 -------------------- 2 | ARG BUILD_FROM 3 | ARG BUILD_VERSION 4 | >>> FROM $BUILD_FROM 5 | 6 | # Set shell -------------------- ERROR: failed to build: failed to solve: failed to fetch anonymous token: Get "https://ghcr.io/token?scope=repository%3Ahassio-addons%2Fubuntu-base%3Apull&service=ghcr.io": dial tcp: lookup ghcr.io on 127.0.0.11:53: read udp 127.0.0.1:55955->127.0.0.11:53: i/o timeout

charliealphauk avatar Nov 01 '25 09:11 charliealphauk

I'd reboot HA and try again

springfall2008 avatar Nov 01 '25 21:11 springfall2008

No changelog found for add-on 6adb4f0d_predbat!

the no changelog message occurs for all predbat addon releases. I've just upgraded to 1.3.2 and same message occurred

gcoan avatar Nov 01 '25 21:11 gcoan

I've one a hard reboot and tried to upgrage to 1.3.2 and it failed again

Error updating Predbat: Docker build failed for 6adb4f0d/aarch64-addon-predbat:1.3.2 (exit code 1). Build output: #0 building with "default" instance using docker driver #1 [internal] load build definition from Dockerfile #1 transferring dockerfile: 1.72kB 0.0s done #1 WARN: InvalidDefaultArgInFrom: Default value for ARG $BUILD_FROM results in empty or invalid base image name (line 4) #1 DONE 0.1s #2 [internal] load metadata for ghcr.io/hassio-addons/ubuntu-base:10.0.5 #2 ERROR: failed to authorize: failed to fetch anonymous token: Get "https://ghcr.io/token?scope=repository%3Ahassio-addons%2Fubuntu-base%3Apull&service=ghcr.io": dial tcp: lookup ghcr.io on 127.0.0.11:53: read udp 127.0.0.1:37723->127.0.0.11:53: i/o timeout ------ > [internal] load metadata for ghcr.io/hassio-addons/ubuntu-base:10.0.5: ------ [33m1 warning found (use docker --debug to expand): [0m - InvalidDefaultArgInFrom: Default value for ARG $BUILD_FROM results in empty or invalid base image name (line 4) Dockerfile:4 -------------------- 2 | ARG BUILD_FROM 3 | ARG BUILD_VERSION 4 | >>> FROM $BUILD_FROM 5 | 6 | # Set shell -------------------- ERROR: failed to build: failed to solve: failed to fetch anonymous token: Get "https://ghcr.io/token?scope=repository%3Ahassio-addons%2Fubuntu-base%3Apull&service=ghcr.io": dial tcp: lookup ghcr.io on 127.0.0.11:53: read udp 127.0.0.1:37723->127.0.0.11:53: i/o timeout

charliealphauk avatar Nov 02 '25 09:11 charliealphauk

I think this is platform related - I'll let you know in a bit @charliealphauk @gcoan what architecture your running HA on?

nipar4 avatar Nov 02 '25 10:11 nipar4

I think this is platform related - I'll let you know in a bit @charliealphauk @gcoan what architecture your running HA on?

I have been able to successfully upgrade the predbat addon to 1.3.1 and 1.3.2, both with no errors at all

I'm running HA as an Oracle VM running inside Windows 10. HAOS 16.2, Supervisor 2025.10.0, HA 2025.9.4.

Not the most power efficient setup to run a Tiny PC 24x7; and getting a NUC is on the list, but not happened yet.

gcoan avatar Nov 02 '25 10:11 gcoan

Raspberry Pi 4 with 2GB been running for over a year. latest HA os

charliealphauk avatar Nov 02 '25 11:11 charliealphauk

I'm primarily commenting on this issue from a Docker perspective as my arm builds for the docker images all failed when updating to 1.3.2, I don't know why 1.3.1 failed as I had no problems with this update so it may be a totally different problem

Whilst I am not an expert on the HA addon deployment from what I know they are just standard docker builds managed by HA so my logic below should still be correct.

Adding pyjwt to the requirements for 1.3.2 by default pulled in additional dependencies such as cryptography and cffi. Both these need libffi to install. libffi-dev is available in most of the builds except arm/v7 and arm/v8 which covers Raspberry pi 4 (I think its a v8)

so @gcoan as you are running a windows host of sorts you will be installing an amd64 addon so everything will work as this includes libffi but any arm v7 & v8 will have problems as the ubuntu base image for arm does not contain libffi

I have updated my Dockerfiles to install libffi-dev and everything has built correctly

so to resolve this for arm on HA a

RUN apt-get install -y libffi-dev

needs to be added to the addon Dockerfile or to a install line at least

nipar4 avatar Nov 02 '25 13:11 nipar4

@nipar4 thanks for investigating. Could you propose a PR to the addon repository for Trefor to incorporate ?

gcoan avatar Nov 02 '25 13:11 gcoan

@nipar4 thanks for investigating. Could you propose a PR to the addon repository for Trefor to incorporate ?

I'll give it a go, I have no way of testing though

nipar4 avatar Nov 02 '25 14:11 nipar4

@gcoan OK, gave it a go but not sure if I did what I wanted can you take a look?

nipar4 avatar Nov 02 '25 15:11 nipar4

@gcoan OK, gave it a go but not sure if I did what I wanted can you take a look?

thanks, I'm no docker expert but the PR looks fine

https://github.com/springfall2008/predbat_addon/pull/73

One thing I did notice though is that the commit history for this PR contains commits going back over 10 months! I can see near the end of the history you did a resync of your fork and then made the edits in your fork. I've had the same happen to my own fork, if you synchronise it just applies the predbat commits on top of your existing commits. You have to do 'discard commits' on your fork to get your fork to a clean copy of the predbat root, and then when you make commits to your fork and PR them back its only the small number of commits in the PR not commits going back forever

gcoan avatar Nov 02 '25 18:11 gcoan

I think that's my problem, I've done a lot of work on the docker builds but I don't want to complicate Trefors predbat_addon code so I'd like to just update the files that are important for the addon and keep the docker specific files separate, otherwise its just going to get complicated

nipar4 avatar Nov 02 '25 19:11 nipar4