New Install: Onboarding failedKeyError: 'component.onboarding.area.living_room'

Hi all, first post, although not a new user of Home Assistant.

I’m having trouble running my own version of Home Assistant via Docker. I have compiled it from the source code and upon starting via Docker I have found I am unable to pass the user creation screen.

Steps:

  • Visit 127.0.0.1:8123 through web browser

  • Click Create my Smart Home

  • Enter Name, Username, Password (x2)

  • Click Create Account

  • Nothing happens on the GUI

Output to the logs is:

 2024-02-13 14:54:44.931 ERROR (MainThread) [aiohttp.server] Error handling request
 Traceback (most recent call last):
   File "/usr/lib/python3.11/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request
     resp = await request_handler(request)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.11/site-packages/aiohttp/web_app.py", line 543, in _handle
     resp = await handler(request)
            ^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3.11/site-packages/aiohttp/web_middlewares.py", line 114, in impl
     return await handler(request)
            ^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 91, in security_filter_middleware
     return await handler(request)
            ^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
     return await handler(request)
            ^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
     return await handler(request)
            ^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
     return await handler(request)
            ^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
     return await handler(request)
            ^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware
     response = await handler(request)
                ^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 149, in handle
     result = await handler(request, **request.match_info)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
     result = await method(view, request, data, *args, **kwargs)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/src/homeassistant/homeassistant/components/onboarding/views.py", line 164, in post
     name = translations[f"component.onboarding.area.{area}"]
            ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 KeyError: 'component.onboarding.area.living_room'

Upon restarting the container (or even the process at that) I am able to login my newly created username and password and proceed. It appears it is failing from not being able to find the area of the living_room although it appears all files and entries are available in the onboarding component.

While I am able to proceed, this is an annoyance and I would like to clear this up to enable automation of an install. Has anyone else experienced something like this and if so, what was the resolution?

You are unlikely to get help if you don’t describe how you created your own HA image.

Up.

Would be great if someone could look at this issue. This one goes sideways when we try to create a custom Dockerfile for Jetson platform in this project: jetson-containers/packages/smart-home/homeassistant-core at dev · dusty-nv/jetson-containers · GitHub (forum topic here: Jetson AI Lab - Home Assistant Integration - Jetson Projects - NVIDIA Developer Forums

I have the same problem. This is how I can recreate the issue on Fedora 40:

git clone --branch 2024.5.5 https://github.com/home-assistant/core.git
cd core

podman build -f Dockerfile -t homeassistant:test --build-arg BUILD_FROM=ghcr.io/home-assistant/amd64-homeassistant-base:2024.03.0
CONFIG_DIR=$(mktemp -d)
podman run \
  --name homeassistant_test \
  -e TZ=Europe/London \
  -v $CONFIG_DIR:/config:Z \
  -p 8123:8123 \
  homeassistant:test

I’m probably doing it wrong, but I can’t say I’ve found any documentation that explains how I should do it.

I had the exact same issue when creating the first user and I can confirm that after shutting down homeassistant and starting it again, I could login with the new user I created (but I still have no clue why the KeyError happened).
I also couldn’t find anything related in the homeassistant-core Github repository unfortunately.

I had the same issue when installing Homeassistant Core from the git development branch. During the wheel building the package requires certain translation files to be available.

I found the solution in this thread..

If you are building / installing from source, you have to run the command

python -m script.translations develop --all

prior to building / installing in the source directory. Then it works like a charm.

2 Likes