Home Assistant OS update fails, no URL for OTA

I’m in the middle of switching from a Docker install on a Synology DS920+ to a VM install on the same machine. I downloaded the VM image from the installation guide (apparently version 4.16, not the lastest). I’ve migrated over my snapshot and restored to it. Supervisor now greets me with a message that says I can update the freshly installed OS to version 4.17, except that I can’t because

ERROR (MainThread) [supervisor.hassos] Don't have an URL for OTA updates!

Sure I can easily do the process over again with the latest image (version 4.20) from GitHub, however I’d like to get to the root cause of this error and why the update is failing.

Debug log from the console when I try to update:

ha > os update --log-level debug
DEBU[0000]  Adding homedir to searchpath            homedir=/root
INFO[0000]  No configfile found
DEBU[0000]  Debug flags                 apiToken=<censored> cfgFile= endpoint=supervisor loglevel=debug noProgress=false rawJSON=false
DEBU[0000]  os update                   args="[]"
DEBU[0000]  [GenerateURI]            base=supervisor command=update section=os
DEBU[0000]  [GenerateURI] Result     uri="http://supervisor/os/update" url="http://supervisor/os/update" url(string)="http://supervisor/os/update"
* Processing... DEBU[0000] Response    body="{\"result\": \"error\", \"message\": \"Unknown error, see supervisor\"}" fields.time=12.558301ms headers="map[Content-Length:[63] Content-Type:[application/json; carset=utf-8] Date:[Tue, 08 Dec 2020 07:56:27 GMT] Server: [Python/3.8 aiohttp/3.7.3]]" received-at="2020-12-08 02:56:27.925041463 -0500 EST m=+0.023694728" request="&{POST http://supervisor/os/update HTTP/1.1 1 1 map[Accept:[application/json] Authorization:[Bearer <censored>] User-Agent:[go-resty/2.3.0 (https://github.com/go-resty/resty)]] <nil> 0x741300 0 [] false supervisor map[] map[] <nil> map[]   <nil> <nil> <nil> 0xc0000240b8}" status="400 Bad Request" statuscode=400
Processing... Done.

Error: Unknown error, see supervisor

All of that had to be typed up by hand since Synology’s VM console doesn’t allow copy/paste. could be something mistyped in all that mess.

hi!

I had the exact same problem today.
so what I did and fix the issue was:
login through console (root), and execute the command
ha supervisor repair.

and reboot the VM.

I issued the command in the console os update --version=4.20 and it started the update. Not sure if it’s permanently fixed or if it just got me by until the next update.

I’m on HassOS 3.18 and had an older system that I initially updated to 0.118.5 which made the supervisor brake big time. I managed to ssh into it, and notice that it tried to pull a supervisor image with the tag “None”, which obviously failed. I fixed that by manually specifying the version to ha supervisor update, however this doesn’t work for the OS part.

Even after specifying 4.20, it keeps telling me that it doesn’t have the URL for OTA updates.

~ ha os info 
board: rpi4-64
boot: B
update_available: false
version: "3.13"
version_latest: null

ah, so it required a full reboot of the entire system, before Supervisor picked up that there was a new OS release, and offered to update through the Web UI. But for some reason It would only update to 4.17, and not to 4.20.

Perhaps the cli fails, because it is runnin inside the SSH addon container, that is build on Alpine? I don’t know. But when I forced --version 4.17 on the cli, then it worked. Unsure if it will allow me to update to 4.20 once its done with 4.17.

Aparently not… But now the latest version is reported as 4.17, through the cli on the SSH addon

ha os info
board: rpi4-64
boot: A
update_available: false
version: "4.17"
version_latest: "4.17"