question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't remove addon: 400 Client Error: Bad Request ("invalid reference format")

See original GitHub issue

Environment

Home Assistant 0.98.3 on Raspberry Pi 3B+ (Official Hass.io Image)

Problem

When removing a custom add-on, the following error is logged and the addon is not removed:

400 Client Error: Bad Request (“invalid reference format”)

The container CAN be successfully deleted via Portainer, but this does not remove the addon reference in the Addon UI.

This MAY not necessarily be a bug with Hass.io, but I don’t know what I could be doing differently to get this addon to work.

Addon Repo: https://github.com/qJake/hassio-addon-repository

System Logs

19-09-08 15:03:03 INFO (SyncWorker_18) [hassio.docker.addon] Start Docker add-on qjake/hacc-hassio-armv7 with version 
19-09-08 15:32:10 INFO (SyncWorker_5) [hassio.docker.interface] Stop addon_ac23ff49_hacc application
19-09-08 15:32:12 INFO (SyncWorker_5) [hassio.docker.interface] Clean addon_ac23ff49_hacc application
19-09-08 15:32:12 INFO (SyncWorker_5) [hassio.docker.interface] Remove image qjake/hacc-hassio-armv7 with latest and 
19-09-08 15:32:12 WARNING (SyncWorker_5) [hassio.docker.interface] Can't remove image qjake/hacc-hassio-armv7: 400 Client Error: Bad Request ("invalid reference format")

Addon Dockerfile

# ASP.NET Core 3.x Runtime
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim-arm32v7 AS dotnet

ARG TAG

ENV HACC_VERSION $TAG
ENV ASPNETCORE_URLS http://*:8095
ENV ASPNETCORE_ENVIRONMENT Production
ENV LANG C.UTF-8

EXPOSE 8095

WORKDIR /

RUN apt-get update -yq && apt-get install -yq wget

RUN mkdir /app \
    && cd /app \
    && wget -qO app.tar.gz https://github.com/qJake/HADotNet.CommandCenter/releases/download/v$TAG/HADotNet.CommandCenter-armhf.tar.gz \
    && tar xzf app.tar.gz \
    && rm -rf app.tar.gz

WORKDIR /app

CMD ["dotnet", "HADotNet.CommandCenter.dll"]

# Build arguments
ARG BUILD_DATE
ARG BUILD_REF
ARG BUILD_VERSION

# Labels
LABEL \
    io.hass.name="HACC" \
    io.hass.description="Wall-mountable tablet interface for Home Assistant." \
    io.hass.arch="armv7|armhf|i386|amd64" \
    io.hass.type="addon" \
    io.hass.version=${BUILD_VERSION} \
    maintainer="qJake <https://github.com/qJake/>" \
    org.label-schema.description="Wall-mountable tablet interface for Home Assistant." \
    org.label-schema.build-date=${BUILD_DATE} \
    org.label-schema.name="HACC" \
    org.label-schema.schema-version="$TAG" \
    org.label-schema.url="https://github.com/qJake/HADotNet.CommandCenter/" \
    org.label-schema.usage="https://github.com/qJake/HADotNet.CommandCenter/README.md" \
    org.label-schema.vcs-ref=${BUILD_REF} \
    org.label-schema.vcs-url="https://github.com/qJake/HADotNet.CommandCenter/" \
    org.label-schema.vendor="qJake"

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:23 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
qJakecommented, Apr 28, 2020

I am the author of the addon in question. 🙂 You can find it here: https://github.com/qjake/hadotnet.commandcenter/

One of the dockerfiles specifically in question:

https://github.com/qJake/HADotNet.CommandCenter/blob/master/Docker/linux-debian-amd64/Dockerfile

Notice that a previous version of this dockerfile did not contain any LABELs, and exhibited the behavior of the bug:

https://github.com/qJake/HADotNet.CommandCenter/blob/aec792b61f4fa04b91fbd174d6e06e3404ec732d/Docker/linux-debian-amd64/Dockerfile


Also, for a summary of the issue, please see this comment up higher in this issue: https://github.com/home-assistant/supervisor/issues/1280#issuecomment-583697057

If you’d like, I can open a new issue with this text if it’s easier to track that way?

1reaction
Mariusthvdbcommented, Nov 26, 2019

UPDATE

so I finally managed to get rid of the still listed add-on: here’s what the order was:

  • install portainer
  • delete the container from the list (in Portainer)
  • tried to delete from Hassio Dasboard (unsuccessfullly)
  • updated to the most up to date HA version 102.2
  • rebooted the host system yet again
  • checked the Hassio Add-on Dashboard (HACC was still listed, grayed)
  • click the Add-on, click uninstall
  • Woosh!
Read more comments on GitHub >

github_iconTop Results From Across the Web

400 Client Error: Bad Request ("invalid reference format")
while trying to build image for linux ppc64le the following comes up. TASK [image_build : Build sdist builder image] ...
Read more >
How to Fix a 400 Bad Request Error (Causes and Fixes) - Kinsta
1. Check the Submitted URL · 2. Clear Browser Cache · 3. Clear Browser Cookies · 4. File Upload Exceeds Server Limit ·...
Read more >
Unable to remove Deprecated Add-On - Home Assistant OS
When I click uninstall, it says “Failed to uninstall addon, ... remove image None: 400 Client Error: Bad Request (“invalid reference format: ...
Read more >
docker: Error creating container: 400 Client Error: Bad ...
Either you are giving a un-supported image name or the variable(or paths) passed to the buid(or the container) cannot be resolved.
Read more >
400 Bad Request - HTTP - MDN Web Docs
The HyperText Transfer Protocol (HTTP) 400 Bad Request response status code indicates that the server cannot or will not process the request ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found