Frequent failed login attempts from already logged in app
iOS device model, version and app version Model Name: iPhone 13 Pro Max Software Version: 16.7.2 App version: 2023.7 (2023.471)
Home Assistant Core Version 2023.12.3
Describe the bug I am getting frequent, sometimes daily failed login attempts notifications when I launch the app. I have the companion app running in the background all the time. Sometimes when I launch the app normally it will show the gear in the lower right corner and then refresh the screen and now I have a persistent notification about a failed login attempt from my device/IP address.
To Reproduce Launch app, observe failed login attempt
Expected behavior App should refresh without attempting to login and fail. App shouldn't need to login again if already logged in.
Screenshots
Additional context I did not have this issue in HA 2023.10 or older. This issue popped up a couple times while I was running 2023.11 and has now become a daily issue with 2023.12. It does not matter if I am on my local network or connecting to HA externally, the issue still occurs. I have logged out of the app, deleted the app and reinstalled and rebooted my phone. I rebooted HA and I cleared all refresh tokens for my login. The issue occurred within 2 hours after restarting everything and setting up the app again. At first I thought it was tied to a location update failing because the app logs show an "ignored" location update at the same time as the failed login. But now that doesn't happen anymore.
Log Entry
2023-12-20 10:12:26.137 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from xxxxxxxxxxxxxxxx (###.###.###.###). Requested URL: '/api/calendars/calendar.friends?start=2023-11-26T00:00:00&end=2024-01-06T23:59:59'. (Mozilla/5.0 (iPhone; CPU iPhone OS 16_7_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Home Assistant/2023.7 (io.robbie.HomeAssistant; build:2023.471; iOS 16.7.2) Mobile/HomeAssistant, like Safari)
That is what I have as well. Different iPhone model but also for me a few times a day the app fails to launch. The offered Retry (red button) option doesn't work. Only a forced app restart works. After the restart of the companion app this is on the log:
Login attempt or request with invalid authentication
Ps: I only connect locally (no cloud subscription)
I dug into mine further and it appears to only have a login attempt problem when grabbing the calendar data from my ical calendars. This occurs when it refreshes the "Atomic Calendar Revive" custom card which is installed through HACS. While the logged error and failed login points to the HA Calendar API, I believe it's actually the card causing this because this issue started happening around the time I added this card. I will log an issue with the card repository.
I don't have that card and see the same errors a few times a day
According to the custom card maker, the issue lies in the API from HA.
Having this problem for the last 3 weeks also on my wife's iPhone 13, but my Android phone has had no issues. Done a re-install of the HA App and it's still occurring. Is there anything else to try?
Same problem here on my iPhone 15 device with the HA App installed. Frequently I get an error message when I open the app (which is already opened in the background). A click on "retry" does not help. Only manually closing the app and restart helps. Currently running: core_2024.4.1 Any suggestions?
I am having the same issue on one iPhone with a standard user, no admin. Killing app fixes the issue without the need to authenticate again.
Do you still have this issue with the latest app version? Version released a few days ago solved it for me!
It looks like this iPhone in fact had the previous app version installed. I will review during the next 2 days and let you know if it happens again. Sorry for any inconvenience created, I missed that update.
It was just a tip 😉
Same here…
I just noticed that I run 2024.3 and 2024.4 is available in the App Store. Completely missed that. I will update and check what happens the upcoming days.
Thanks a lot!
I can confirm with iOS app version 2024.4 the issue does not occur again.
Hi, more info on the fix here: https://github.com/home-assistant/iOS/issues/2675 Where the Credits go to @bgoncal @squirtbrnr please close this issue if it works for you as well
@erkr I’m sorry I never got the notification on this. I have the latest iOS version (2024.4) installed through the App Store and I still get these frequent failed to login notifications. I was getting them as recently as 3 days ago and sometimes as frequent as every couple hours.
Sad the new version doesn't solve it for you s as s well. For me it was a huge diff, from multiple times per hour to sporadically (about once a week) atm
Hi! After I read this I dobt know why the problem is closed? Im not able to login on my iPhone15Pro - hassio updated to the last version…
iphone13 and ipad Pro 3.gen are ok
@FilipCZE did you update the iOS app on your iPhone and iPad? Please go to the app store and check which version you have installed, or check for updated. The iOS app is the issue.
@michaelschwarz I tried everythung - deleting account on Hassio + uninstall the iOS app --> created new account on hassio installed app from appstore with no effect... Even tried loging using the Safari browser with the same result.... It seems to be logged but unable to show the dashboards
@michaelschwarz I tried everythung - deleting account on Hassio + uninstall the iOS app --> created new account on hassio installed app from appstore with no effect... Even tried loging using the Safari browser with the same result.... It seems to be logged but unable to show the dashboards
If you tried in Safari and it doesn't work please submit an issue to core, since it's not App related.
@michaelschwarz I tried everythung - deleting account on Hassio + uninstall the iOS app --> created new account on hassio installed app from appstore with no effect...
Can you please check what version you have installed? The app version you will find in Settings > Companion-App > About, I am using 2024.4 (2024.624) without any problem. The version of Home Assistant you can find Settings > About. 2024.5.3 is what I am currently using.
This issue is back for me. Happening 2-3 times per day. It’s only my phone. Not my wife’s nor any computer I log into through a browser. I did update to iOS 18 a couple days ago. I have the companion app version 2024.9.2 (2024.881) and HA Container version 2024.9.1.
This issue is back for me. Happening 2-3 times per day. It’s only my phone. Not my wife’s nor any computer I log into through a browser. I did update to iOS 18 a couple days ago. I have the companion app version 2024.9.2 (2024.881) and HA Container version 2024.9.1.
Same here. Reinstalled the app and nothing changed. At first I thought it was because I entered the external url of Homeassistant, but that is not the case. Even if I enter the internal url, the error occurs. However, it is interesting that the connection is probably established in the local network even if the external url is given according to the logged IP address. This means that although my app is already connected, something seems to be searching for an instance in the background and authenticating itself with wrong credentials there.
App Version: 2024.9.4 iOS: 18.0.1 Phone: iPhone 15 Pro