Can't create new user after forgetting password

Hello,

I managed to forget my user password so I followed the directions in the Authentication documentation and deleted the files in the .storage directory.

Started Hassio again and get the prompt to create a user. No matter what I enter it doesn’t take it and I get error messages saying the “Name is already in use” in the log. I tried a name I know has never been used. This is with the latest version.

I also have the same issue with a HA docker I have running on my Synology NAS.

2019-11-29 13:50:38 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_protocol.py", line 418, in start
    resp = await task
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_app.py", line 458, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/web_middlewares.py", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/real_ip.py", line 40, in real_ip_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 73, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 136, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 122, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 48, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/onboarding/views.py", line 125, in post
    translations[f"component.onboarding.area.{area}"]
  File "/usr/src/homeassistant/homeassistant/helpers/area_registry.py", line 56, in async_create
    raise ValueError("Name is already in use")
ValueError: Name is already in use

Thanks for any advice.

Based on that error it looks like you might try creating a different user and then clearing out the areas and persons.

Then try re-creating the old user.

I had tried that already. No matter what I put in for the name or username it says it already exists.

1 Like

I’m having the exact same problem.

The problem seems to be with the area registry. Try backing up the file core.area_registry and then deleting it?

Yup - that did the trick. Thanks!

1 Like