home-assistant / frontend

:lollipop: Frontend for Home Assistant
https://demo.home-assistant.io
Other
4k stars 2.73k forks source link

No error is shown in onboarding when incorrect username is entered #21333

Open sairon opened 3 months ago

sairon commented 3 months ago

Checklist

Describe the issue you are experiencing

During onboarding, when user enters username that is not normalized (e.g. contains capital letters), the form can't be submitted and no error is presented to the user. The browser console shows HTTP 500 error in POST /api/onboarding/users without any further details. Core logs show the following error:

homeassistant.auth.providers.homeassistant.InvalidUsername: Username "Pepa" is not normalized. Please make sure the username is lowercase and does not contain any whitespace

Describe the behavior you expected

An error to be shown, explaining why the form can't be submitted and/or validation should be performed client-side.

Steps to reproduce the issue

  1. Go to "Create user" page in onboarding
  2. Enter incorrect username - e.g. Pepa
  3. Click "Create account"

What version of Home Assistant Core has the issue?

2024.7.1

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

Firefox 127.0.2

Which operating system are you using to run this browser?

No response

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

github-actions[bot] commented 6 days ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.