401: Unauthorized message on several Web UIs

Out of the blue I am getting a ‘401: Unauthorized’ message when I try to access the Web UIs for EspHome, Adguard Home, and Backups. Everything has been working fine. I have restarted everything. No errors on the logs. Thanks in advance for any help.

1 Like

Same here

Already Tried:

  • Deleting cookies
  • Logoff / Log in

Still got the error in Chrome and also in Brave.
But it works in Firefox.

Developers tools in brave display:

Uncaught (in promise) DOMException: Failed to register a ServiceWorker for scope (‘https://xxxxxx/’) with script (‘https://xxxxxx/service_worker.js’): An SSL certificate error occurred when fetching the script.

Any help??

1 Like

same here… was this because of the duckdns update? i had to start using Firefox

It’s definitively a problem with Chrome. Everything works in FireFox and Edge.

It’s not only a problem with Chrome but also with Edge Chromium (most recent Windows version including actual patches).

Whenever I try o open addon pages I get the following error:

“401: Unauthorized”

I tried to use Nabu Casa URL as well as the lokal IP/port. Error remains…

All works fine with “inprivate” Edge windows, but not with normal Edge tab. Clearing cookies, allowing 3rd party content/cookies, clearing browser cache doesn’t solve the problem. Firefox works too but I’d like to user Edge Chromium as it’s my default browser.

Any ideas?

TIA
Fred

Very funny…

Now, after one day the problem has disappeared… I don’t know what happened.

Fred

Same here. It fixed itself. :slight_smile:

I had the same problem. Affected ESPHome, Grafana and Node-Red. I had installed Pi-hole a couple of days earlier, which means that I have changed the DNS server settings, so maybe this had something to do with it, or, I have also installed Wireguard VPN which means I no longer have to port forward through my router. This meant that I also had no real requirement to access my site externally via the duckdns domain and https.

Anyhoo, I was checking into a node-red automation and discovered that the ui was not loading - with the same message as discussed earlier in this thread. I had already established that the companion app was working fine. After reading this thread I noted that everything worked OK in Edge browser, so I cleared the Chrome browser cache and browsing history and it came good. Perhaps the browser was remembering something from the port forwarding days?

Hello,
I have the same strange behaviour with “401: Unauthorized” pages.
What I tend to interpret :

  • nothing to do with Chrome : on the same browser instance, when I start a new incognito tab, it works like a charm. So cookies issue maybe ?
  • I think this problem can come from changes applied to the sidebar : when I manage to get rid of some items in the sidebar (long click on “Home Assistant” at top left), I get this trouble.

Your experience/opinion on this ?

I fixed 401 Unauthorized by deleting cookies for the HA site:
chrome browser > settings > privacy > cookies & other data > see all site data
Search: <your HA url or IP address>
Delete stored cookies for the HA “site”.

If everything works OK in incognito window, then the above will probably fix it.
Or you might be able wait a few days for the old cookies to expire.

10 Likes

I tried to install DuckDNS but it didn’t work.
When I removed it, I couldn’t access a bunch of addons.
Removing the site cookies didn’t work but clearing all browsing data did the job. All good now.

1 Like

thanks for the help. This worked like a charm.