Help - All addon with Ingress: 401 Unauthorized

I have been tearing my hair out over this. I have tried three different browsers, clearing cache, shutting down HTTPS everywhere, shutting down uBlock Origin, reinstalling browsers, sacrificing goats, etc. I am ready to throw my machine in the fire, and setup my firewall to block anything that every includes the phrase “home assistant” in it.

I understand your frustration

My symptom is more subtle. Everything works except…

One one specific Raspberry pi, running Chromium, using the http url to a 192.168 IP I get the 401. I first thought it was Wireguard as I used it remote. I brought it home and turned off Wireguard. It is itself on same subnet as my Home Assistant machine. And I still get the 401

I do not the 401 on HA in general. Only when I try to access Ingress based addons via the left bar.

It works in Firefox on same Raspberry Pi

It works if I use the URL inclusing “ingress”

It works if I use my fully qualified external domain name via my hairpin router and a reverse proxy that adds the ssl layer so I use https.

It only fails on one machine, only in Chromium, only with http via IP, only with links in left bar.

I have 5 other computers and two ipads and an iphone. It works on all of them.

I deleted Chromium from the Raspberry. I deleted all the cache and cookie files for the account. And installed it again. And still same shit.

Where the heck can Chromium hide some setting that triggers this fault? Why does the fault occur? I doubt it can be anything on the HA side because I get a new session cookie when I login again with the fresh browser.

I can probably just wipe my Raspberry and install a fresh OS on it. I have nothing special on it. But why does it happen? And it seems more important for @jds who has same symptom but much more severe.

I’ve got the same problem except it appears to only be visual studio code. I can fix it by uninstalling and reinstalling the addon but after I close the tab and reopen it I’m back to 401 unauthorized.

Last (?) EDIT: I figured out that the problem for me is that I was using HA in Frames as part of Organizr. So, when using the ingress side tabs, it was essentially a frame within a frame. This had worked before, and I had stopped giving it any thought. However, if I just use HA as its own tab in the browser, it now works fine. I should have found that earlier.

For me it is every single browser and every single addon that uses ingress.
It would be helpful if there were some error message in the logs.

Edit to mention that the android app does work.

I ran into this after I started trying to configure a second instance of HA running on a second network, but both accessed with the same hostname (homeassistant.local).

Clearing cache isn’t enough; I had to clear all site data (specifically cookies and/or database which is where the ingress authorizations are stored).

3 Likes

Clearing cache isn’t enough; I had to clear all site data (specifically cookies and/or database which is where the ingress authorizations are stored).

Can confirm this worked for me.

I fixed my instance by restting the configuration for the add-on (Home Panel in my case) and upon logging in I changed the default homeassistant.local:8123 URL to the IP address of my HA docker and it resolved the issue. Looks like a DNS issue?

Can also confirm clearing cache and site data (in Firefox) worked for me.

Was also getting this same issue, many if not all addons were throwing 401: unauthorized errors. Clearing the ‘Site Cookies and Site Data’ in Firefox (hitting the padlock in the URL) resolved the problem.

Ingress suddenly stopped working, and I was getting an error 401 from all add-ons that have a web UI - such as file editor, terminal, etc. In my experience, after 40 years of IT, errors can usually be traced back to a change you mde, no matter how innocuous. I recalled changing a DNS pointer to a stealth pointer a week ago… basically i point my domain https://twosquarefeet.ca to https://twosquarefeet.duckdns.org. A standard URL pointer leaves my http header to contain twosquarefeet.duckdns.org and that appears in the address bar. Stealth mode hides the duckdns redirect, I assume by putting https://twosquarefeet.ca in the http header, and this appears in the address bar. I have an old domain with a standard (not stealth) URL pointer, and this works. So it appears that a stealth URL pointer on a domain breaks ingress. Sure enough, browsing directly to https://twosquarefeet.duckdns.org works too.

Could you please share where this setting is? I have the same issue with Home Panel.
I tried using edge and it “worked” for a moment… but when I logged in to Home assistant got the same 401 error

Can confirm this too, clearing cache on Chrome does the work.

I just ran into this issue with Firefox. Everything working fine then all of a sudden 401s on any ingress addon. WARNING (MainThread) [supervisor.api.ingress] No valid ingress session None in the supervisor log.

Tried clearing cache, all site data, close, reopen etc. Didn’t work. Started looking through the settings. I changed the following from Strict to Standard and now we’re all good in the hood. I had not changed this setting previously so I don’t know what gives, but it did fix my issue.

Just an FYI if anyone else runs into this issue.

15 Likes

Thanks. You probably just saved me hours of time.

Edit:

Here’s a way to disable protection for a specific URL:

https://support.mozilla.org/en-US/kb/enhanced-tracking-protection-firefox-desktop?as=u&utm_source=inproduct#w_what-to-do-if-a-site-seems-broken

Edit 2:

Just to see if I could reproduce the original issue, I recently tried turning Enhanced Tracking Protection back on. When I do this, Ingress and the add-ons still work, although I don’t I don’t know why.

8 Likes

Life Saver You :wink:
Thanks :star_struck:

1 Like

Saw the exact same thing on Firefox 90.0.2 (64-bit) on Windows: Ingress was just blank and I got a 401-response. I could not see ingress addons when accessing Home assistant on my LAN through the mDNS-address (http://homeassistant.local:8123). However, ingress worked when accessing the HA through HTTPS (https://example.duckdns.org), as well as when I used the LAN-IP directly (http://192.168.0.X:8123).

I struggled for hours. In the end, it was sufficient for me to remove the cookie called ingress_session. Thank you for the help!

This worked for me! Thank you! I’ve been researching this for a couple of weeks now and your solution was so simple. I ended up reenabling to Strict and the add-ons’ pages loaded perfectly fine still.

1 Like

jazzyisj

Solution worked for me as well. Thank you very much for posting.

1 Like

There’s an official alert for this issue now

2 Likes

I had the same error. After reading this post I thout that the cookies of home assistant were giving the problems. I deleted these cookies, and now it works like a charm