diyhue / hassio-addon

35 stars 11 forks source link

Cannot login after rebuild the addon #30

Closed emog closed 8 months ago

emog commented 8 months ago

Today I rebuild the addon and it cannot login. Tried to delete the config/diyhue directory/folder and to uninstall and install the plugin again but in this case it just creates the certificate and I see the login page. Tried with default username and password and nothing happens (no wrong username/password error) nothing. I see that in the original there are some changes for password https://github.com/diyhue/diyHue/commit/a242d628ee924a719b1c56dc80dc6ff4cf43ab6d which might cause the issue somehow.

hendriksen-mark commented 8 months ago

If you enter a wrong password you get a blank screen with "bad login", if you enter a worng user name you get a blank screen with "user don't exist". Please submit logs when you log in. Please submit the username and password you use to login.

emog commented 8 months ago

Here is a video: https://youtu.be/v3-BWVpdLFc

Updated log: Home Assistant Core: 2024.3.0 Home Assistant Supervisor: 2024.02.1

Please, share the above information when looking for help or support in, e.g., GitHub, forums or the Discord chat.

[cont-init.d] 00-banner.sh: exited 0. [cont-init.d] 01-log-level.sh: executing... [cont-init.d] 01-log-level.sh: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. /config/diyhue created. Your Architecture is = amd64 Serve HTTPS 2024-03-10 01:15:45,114 - configManager.argumentHandler - INFO - Using Host 192.168.5.242:80 2024-03-10 01:15:45,119 - configManager.argumentHandler - INFO - Host MAC given as 0800270B8766 2024-03-10 01:15:45,119 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255 2024-03-10 01:15:45,120 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1 2024-03-10 01:15:45,120 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled! 2024-03-10 01:15:45,122 - configManager.argumentHandler - INFO - Using Host 192.168.5.242:80 2024-03-10 01:15:45,123 - configManager.argumentHandler - INFO - Host MAC given as 0800270B8766 2024-03-10 01:15:45,123 - configManager.argumentHandler - INFO - IP range for light discovery: 0-255 2024-03-10 01:15:45,123 - configManager.argumentHandler - INFO - Deconz IP given as 127.0.0.1 2024-03-10 01:15:45,123 - configManager.argumentHandler - INFO - Online Discovery/Remote API Enabled! 2024-03-10 01:15:45,125 - configManager.argumentHandler - INFO - Debug logging disabled! 2024-03-10 01:15:45,125 - configManager.argumentHandler - INFO - Generating certificate Generating an EC private key writing new private key to 'private.key'

2024-03-10 01:15:45,175 - configManager.argumentHandler - INFO - Certificate created 2024-03-10 01:15:45,207 - configManager.configHandler - INFO - Config loaded 2024-03-10 01:15:45,366 - services.remoteDiscover - INFO - Starting discovery service 2024-03-10 01:15:45,371 - services.stateFetch - INFO - start lights sync 2024-03-10 01:15:45,372 - services.ssdp - INFO - starting ssdp... 2024-03-10 01:15:45,373 - services.mdns - INFO - listener started 2024-03-10 01:15:45,373 - services.ssdp - INFO - start ssdp broadcast

emog commented 8 months ago

@hendriksen-mark - I updated the log above. After install the fresh addon the config/diyhue contains only the certificate.

hendriksen-mark commented 8 months ago

what browser are you using? the log look good.

emog commented 8 months ago

Safari but it worked before with it. I primary use Safari

hendriksen-mark commented 8 months ago

should work with safari. Tomorrow i will test it with HA.

emog commented 8 months ago

Update which might be helpful when you debug: If I open the http://homeassistant.local/ I'm able to login with admin@diyhue.org / changeme I have this in my configuration.yaml in home assistant: panel_iframe: diyhue: title: "diyHue" icon: mdi:home-lightbulb url: "http://192.168.50.242:80"

Hope this information will help you. Thank you for your hard work on this project. I really appreciate your work and efforts

hendriksen-mark commented 8 months ago

I just did a fresh install of diyhue on HA and for me it works like it should. It works in safari and in chrome. if the url is the same as you're host then it should be fine, the :80 is correct. Can you please try a different browser without extensions?

emog commented 8 months ago

@hendriksen-mark - I found the issue. I open the Home Assistant with http://homeassistant.local:8123/ but the iframe is with the IP address and maybe because of the cross origin this happening that it cannot login and redirects. If I open the home assistant with my local IP address and login with default username and password it's ok.