hassio-addons / addon-unifi

UniFi Network Application - Home Assistant Community Add-ons
https://addons.community
MIT License
279 stars 138 forks source link

Removed 23.2 and installed fresh 1.0.0 but browser won't open the page #252

Closed danielbrunt57 closed 3 years ago

danielbrunt57 commented 3 years ago

I had the same trouble as others have reported with the upgrade from 23.2 to 1.00 and read the other posts so I restored my snapshot, created & downloaded a backup in Unifi, uninstalled 23.2 and installed 1.0.0 fresh but I have the following errors when Edge or Chrome try to open https://brunt.duckdns.org:8443 Edge: image Chrome: image

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: UniFi Controller
 Manage your UniFi network using a web browser
-----------------------------------------------------------
 Add-on version: 1.0.0
 You are running the latest version of this add-on.
 System: Home Assistant OS 6.2  (aarch64 / odroid-n2)
 Home Assistant Core: 2021.8.7
 Home Assistant Supervisor: 2021.06.8
-----------------------------------------------------------
 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] unifi.sh: executing... 
[cont-init.d] unifi.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[22:07:10] INFO: Starting the UniFi Controller...
danielbrunt57 commented 3 years ago

I've just installed Firefox and tried that... image

danielbrunt57 commented 3 years ago

Backup restored and up and running but only with Firefox; I still see the same errors in Edge and Chrome.

danielbrunt57 commented 3 years ago

I just tried my old link in Edge (https://unifi.brunt.local:8443 which resolves to my internal IP) and it works so it's the Open Web UI from Supervisor Add-on (https://brunt.duckdns.org:8443) which is failing...

membersound commented 3 years ago

The trick is to export your unifi settings from within the controller app, then uninstall the unifi addon, reinstall it and restore the settings from within the controller:

danielbrunt57 commented 3 years ago

I have done those steps and have access to Unifi via my browsers using https://unifi.brunt.local which resolves to 192.168.1.104 but the Open Web UI button takes me to https://brunt.duckdns.org, which also resolves to 192.168.1.104 on my LAN but the page via that URL fails to load... image image

danielbrunt57 commented 3 years ago

Since Firefox was working but not Chrome or Edge, I researched HSTS... In Chrome, I went to chrome://net-internals/#hsts and deleted domain brunt.duckdns.org - problem solved. In Edge, I went to Settings>Privacy, search and services>Clear Browsing Data and chose Cached images and files. I could then browse once to https://brunt.duckdns.org:8443 but not after that...

danielbrunt57 commented 3 years ago

I dug deeper into the issue and have disabled HSTS in NGINX and now I can get to UniFi via the OPEN WEB UI button. I changed from:

hsts: max-age=31536000; includeSubDomains

to:

hsts: max-age=0