core: Login attempt or request with invalid authentication
The problem
Since a couple of days, I get the following error when opening the app when I’m at home. In this case on my iPad, but also happens on my iPhone.
Logger: homeassistant.components.http.ban
Source: components/http/ban.py:128
integration: HTTP ([documentation](https://www.home-assistant.io/integrations/http), [issues](https://github.com/home-assistant/core/issues?q=is%3Aissue+is%3Aopen+label%3A%22integration%3A+http%22))
First occurred: 11:08:24 (2 occurrences)
Last logged: 15:31:55
Login attempt or request with invalid authentication from Tijns-iPad-2023.fourpets.net (192.168.xxx.121). Requested URL: '/api/websocket'. (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2024.3 (io.robbie.HomeAssistant; build:2024.608; iPadOS 17.4.1) Mobile/HomeAssistant, like Safari)
The app the displays an “unable to connect” screen with a countdown from 60 to 0.
When I close the app and start it gain, it connects without issues.
What version of Home Assistant Core has the issue?
core-2024.3.3
What was the last working version of Home Assistant Core?
Not sure if it is since the update
What type of installation are you running?
Home Assistant OS
Integration causing the issue
No response
Link to integration documentation on our website
No response
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 14
- Comments: 164 (4 by maintainers)
Whats the deal here. During my trial I didn’t have this error. I then pay for it then I get this error. Are you guys a basket case out to steal money. Another way to scam people. Or are you here to help make a program and make money. If you wanna make money then fix this issue. I guess this is what we get for paying a year at a time. A joker who takes our money and runs laughing. If this ain’t fixed in the next update. I will search the code myself. Find the issue and sue your company for all you got. I’m tired of companies not fixing issues yet want paid. 😒
When I was trying to diagnose this, the first issue I’d see was a 500 response from the websocket connection. After that, the browser would continue to retry the connection and fail with that auth/token error. It seems if the websocket connection fails, the authentication doesn’t succeed and the token is not valid causing subsequent retries to fail looking like an auth issue. But the root problem is the websocket failure.
How has this been an issue since April 1, 2024? We’re nearing almost a full year of this joke (pun intended)
Came here to say that this is still relevant. michaelsleen’s fix is for something else, not the iOS authentication error log relating to /api/websocket which the OP initially created this issue for.
You think the good hardworking contributors at HA would prioritize this fix as it’s literally been rolling around the threads for half a decade. To all you folks who provide useless advice with fixes that don’t work because you’re to busy scarfing down Doritos and a Dominos stuffed crust, please stop trying to make virtual friends and code the problem away!
Uh… same here. I updated to 2025.1 yesterday, and everything worked fine until I lost my session on my usual device. Now, there’s no way to log in via the reverse proxy, but using the local IP for the HA instance works.
I’ve ensured that IP banning isn’t enabled, but it still doesn’t allow me to log in via the reverse proxy (I’m using Traefik in my case).
I guess the question is why is no one from the developer side looking into this? From what I see only the users are the ones trying to narrow down the issue and try to solve this problem. This issue already has 145+ comments…
Thanks
Because people with iphones have nothing better to do. Except sit there and hack into people’s business. If these lazy bums would get a job this world would be a better place. I got rid of my errors about a iphone by changing ip addresses both internally and externally. Yea I know. Some say we shouldn’t do this. Well news flash. It keeps the hackers away. And it seems home assistant has a exploit in it that hackers have found. Maybe Trump will pass a law that allows judges to amputate fingers for people who get caught doing a cyber crimes. And that would be a lot of young pricks born after y2k.
This issue has so many post and yet no solution!
I also started having this issue, it turns out it was a traefik issue instead of a homeassistant issue. Setting
GODEBUG=http2xconnect=0in the traefik container fixed my issue.https://github.com/traefik/traefik/issues/11405
Same problem here to! Please fix this!
It seems HA support gets similar to standard corporate support experience. I have seen a lot of responses on issues reported here but in this thread it is 0 attention 😦 Super demotivating, I start thinking disabling bad login attempts ban feature. As I have tried a lot of different things nothing helped and it happens for all app connected devices in my case. @frenck any escalation would be appreciated to someone at least to read and help debug.
not using any domain, connecting via local ip and i get this
Same issue on one iPhone but not on an other, very weird and should be looked in to, so it can get fixed!
I discovered that it’s a ios device that is still trying to sign in after a update. However it won’t due to a failed authentication while the app was closed. Open ha on all devices if you don’t know which device is glitching out and login in with the app open. That will correct the problem.
It’s also an issue in traefik 2, 2.11.17 pulled in the breaking change, 2.11.16 worked. Nothing to do with a homeassistant change.
has anyone got a solution yet? got the same problem.
Hey. Confirm; I get the same error on my installation, behaving the same way.
Logger: homeassistant.components.http.ban Source: components/http/ban.py:128 integration: HTTP (documentation, issues) First occurred: 31 March 2024 at 08:14:25 (6 occurrences) Last logged: 09:30:25
Login attempt or request with invalid authentication from 192.168.X.55 (192.168.X.55). Requested URL: ‘/api/websocket’. (Mozilla/5.0 (iPhone; CPU iPhone OS 17_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2024.3 (io.robbie.HomeAssistant; build:2024.608; iOS 17.4.1) Mobile/HomeAssistant, like Safari)
Note: When I try to modify the internal URL to for instance http://homeassistant.local:8123 I get: "Error Saving URL The operation couldn’t be completed. No space left on device!
This issue is getting so much traffic but still no resolution?1?
I don’t think they know where the problem lies. If they would check there VPN update they would find the problem. As that is messing with authentication of devices unless they are manually used after a ha update. I fixed my issue by reading logs and finding the device that was once logged in. Then not used after an update. I disabled VPN and adguard. Logged in on all devices at least once. And all is fine. Infact this last update I didn’t have the error as I see others are just now getting. Which tells me you have a device that you used at least once and forgot about. I would like to see the developers fix this issue as well. It’s a very time consuming problem.
Same here, I think that the problem comes from the iPhone of one of the members of my family.
Registrador: homeassistant.components.http.ban Fuente: components/http/ban.py:136 integración: HTTP (documentación, problemas) Ocurrió por primera vez: 16 de enero de 2025, 17:50:45 (87 ocurrencias) Última vez registrado: 10:43:41
Login attempt or request with invalid authentication from localhost (127.0.0.1). Requested URL: ‘/auth/token’. (HomeAssistant-Extensions-PushProvider/2024.12.2 (io.robbie.HomeAssistant.PushProvider; build:2024.1058; iOS 18.2.1) Alamofire/5.8.0)
I solved my problem by asking the whole family (4 devices) to open their HA apps and update them and for me the problem disappeared !
Yes I know what you are talking about. And for local network I use static IP as server and for remote network I use public domain name that uses cloudflare tunnel to connect to my home assistant instance. And home assistant itself establishes that tunnel, so it is irrelevant if IP or hostname is used within the tunnel configuration.
I believe it can have many roots, because my solution was configuring my Cloudflare correctly, yours was the Vehicle cards, and others had issues with their PiHole firewalls from other threads I’ve read on this.
I don’t use vehicle cards and I have my firewall configured well, so those weren’t my problem (unless you count Cloudflare as a firewall, which in a sense it sort of is), but it’s correct now and it works. I forgot to mention, my error did not let me log in - I was presented with the “unable to connect page” with the 60 second countdown timer, and this invalid authentication error was occurring non stop.
It sounds like all of these have networking in common, I believe any issue with deliverability causes this error. DevTools is definitely the way to observe and correct this, the console will help you identify the area to look in, and also any request in the networking tab that is not succeeding with code 200, or code 101 for WebSockets is something to look out for.
Best of lucky everyone and be sure to post your results for everyone to read.
It seems to be a bug in different HACS plugins. Best way is to track down which one triggers the bug and make an issue on that repo. Login as that user that triggers the invalid login. Delete the error and refresh the different pages/dashboards. The plugin is then on that page. Use the developer tools (javascript console) to find out which plugin triggers the error. You should see something like the linked bug report.
It has to do that something is not allowed to see without admin rights. My error should be gone next week with an update of the vehicle status card.
this is not limited to websockets but also the REST API based on some of the provided logs:
from Wear OS which does not even have a browser (officially) and the app does not use any webview APIs as they are not available
Also not with Chrome. Happened with official Home Assistant app on both iPhone and iPad.
to be fair the android app uses webview which is based on chromium so issues with chrome will indeed impact the app
@Ferrox85: I’m not disturbed by that, IP got banned anyways, I hope you find your solution just as easily 👍
I got this a couple hours ago:
Login attempt or request with invalid authentication from hostedby.privatelayer.com (179.43.188.122). Requested URL: '/media/uploads/.git/config'. (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36 Edg/113.0.1774.35)I can’t imagine what it could be… does anyone have ideas on what 179.43.188.122 is? ❓❓❓
pretty sure this issue has been around a lot longer than when this was posted. Kinda comforting to see iPad has the same issue. I am closing the android bug in favor of this one.