Open jaredgisin opened 5 days ago
Any chances that your instance returns "unauthorized" at any point? If the app receives unauthorized from the host it reopens the onboarding flow and asks to login again.
I have had the same problem for about 4 days. I use Nabu Casa and a virtual HAOS image. I have the same behavior on my iPhone and iPad.
Any chances that your instance returns "unauthorized" at any point? If the app receives unauthorized from the host it reopens the onboarding flow and asks to login again.
I don't actually know, but I highly doubt it. I am able to log in the first time just fine when the server is added. The server stays in the app and functions normally, and then at some point it just disappears.
Even if it were getting "unauthorized" at any point, at no point do I ever see the onboarding flow reopened. I am never prompted to re-authenticate. If that were the case then I wouldn't have opened this issue.
To be clear, this issue is about the fact that the iOS app DROPS the server from the list. It flat out DISAPPEARS from the list of server which is a significant usability problem because it doesn't give me any change to correct issues with it. I argue that the correct usability is that if I add a server to the list, and I am able to authenticate the server the first time to have it then appear in the list, there should be never be any circumstance in which the iOS app decides to drop the server from that list. If it starts unauthenticating, or being unreachable or whatever the hell DO NOT DROP THE SERVER FROM THE LIST. The user should see the server in the list at all time, be notified there is an issue with it and given the ability to reuathentica it or restore the connectivity to it, or delete themselves.
So the question here and the issue that needs to be resolved is to figure out under what circumstances the iOS app simply just deletes the server record from the servers list and to stop that from happening. Secondarily, then we can figure out if there is some connectivity or authentication issue with my setup. I would be far less upset about this and more likely to resolve networking or authentication issue if the server were to remain int he list and to show me an error about why the app is unable to connect, but as it stands now as the server is flat out dropped with zero explanation, I don't even know where to start to figure out if I have an issue.
Do you have more than 1 server? Because if the server vanishes from the list and there are no other servers, you should see the onboarding again. can you share a screen recording when that happens again?
I'm having this issue, I do not have a second server. This started happening about a month to a month and a half ago on every single device that uses the app (two iphones, an ipad). It has, to my knowledge, only ever happened when I'm away from home. When it happens the server just completely disappears from the list and the app behaves as if it's never been connected to a server.
To make matters worse, for some reason when this happens I'm completely unable to connect to the server when I'm not physically at home on my network. If while not on my network I try to re-add the device by manually giving it the external address I will see the device show back up in home assistant (telling me it's able to make a connection) but I will get the error "Alamofire.AFError 9" and it won't connect. This holds true even if I VPN into my network on the device. If I re-add the device when back on my network it discovers the instance and adds it just fine. After adding it back I can use it when not on my network without issue until the app decides to randomly delete the HA instance again. When I've attempted to troubleshoot the Alamofire error I've found numerous people getting the error but almost no answers to how to fix it. The few answers that did come were basic things that I'd already tried like deleting the app and reinstalling etc. When I posted myself to the homeassistant subreddit I got one reply, which was someone with the same issue asking if I'd solved it and one telling me to restart my phone and change the default browser neither of which worked.
As the person above said, regardless of what the reason was for it losing connectivity, the behavior of the app is bad user experience.....and this is something that has changed for the worse. No matter what, I shouldn't have the entire instance disappear from the app and the app behave as if it's never been used before. I should be told there's been some sort of error, what the error is, and given the opportunity to correct it. Because of this user experience I don't even have a way of troubleshooting and solving this issue because I have no clue WHAT is happening. All I know is I open the app and my entire HA instance is gone...that's all the info any of us can give you.
Edit: i just had this happen again on my iPad which has not left my house since the last time, so this definitely isn't related to being off my local network.
It seems I have solved my problem! In my case, the unauthorized access was triggered via Nabu Casa, the local IP 127.0.0.1 was blocked. I have found the following help for this: [https://nabucasa.com/config/troubleshooting/403_forbidden/] However, I still can't understand why the server entry in the configuration is simply deleted in the event of access problems!
Message received that this is a bad UX, now we need to find out what is triggering that, as my initial theory at least for @guidau the issue was the unauthorized response
@ChristopherGerdes yes you can find out what is happening because if you export your companion app logs there should be something there to help. Feel free to submit here as well https://forms.gle/Uoqz127Phx4mMTpS6
It seems I have solved my problem! In my case, the unauthorized access was triggered via Nabu Casa, the local IP 127.0.0.1 was blocked. I have found the following help for this: [https://nabucasa.com/config/troubleshooting/403_forbidden/] However, I still can't understand why the server entry in the configuration is simply deleted in the event of access problems!
ok, I may be encountering this. Did you also need to add anything to your config to prevent it from being banned in the future? I don't see anything in the instructions about that, but it seems like it would need to be added to trusted proxies or something to keep it from happening again.
@ChristopherGerdes yes you can find out what is happening because if you export your companion app logs there should be something there to help. Feel free to submit here as well https://forms.gle/Uoqz127Phx4mMTpS6
Unfortunately, I just reconnected the server. Will I still be able to export this log file from the companion app if it is in new user mode where it's telling me I need to add a server? If so where do I go to do that in that situation? I can grab the log next time it deletes the server.
@guidau in case you receive "unauthorized" and you are lead to the onboarding, if you sign in again the server will return, having the server in the list but not working is also useless right?
Again, the UX CAN and WILL be improved, I'm just brainstorming with you so we find a nice approach
@guidau in case you receive "unauthorized" and you are lead to the onboarding, if you sign in again the server will return, having the server in the list but not working is also useless right?
Again, the UX CAN and WILL be improved, I'm just brainstorming with you so we find a nice approach
Thank you for this. You may be hearing frustration from us simply because I think a number of us have been facing this for a while and it's like slamming your head against the wall. I know I definitely appreciate the help.
@ChristopherGerdes after the server gets deleted, add it again then go to companion app settings >> debugging >> export logs
@guidau in case you receive "unauthorized" and you are lead to the onboarding, if you sign in again the server will return, having the server in the list but not working is also useless right?
Again, the UX CAN and WILL be improved, I'm just brainstorming with you so we find a nice approach
I think if you are only local with your cell phone, it's okay, but if you have to access your HA on the road via the Internet, all devices lose their configuration and you have to log in again with UserID, Pwd and 2FA on all devices after the problem has been solved. That's really annoying.
@ChristopherGerdes yes you can find out what is happening because if you export your companion app logs there should be something there to help. Feel free to submit here as well https://forms.gle/Uoqz127Phx4mMTpS6
Thank you for this! I've grabbed the logs from my ipad and submitted them.
For anyone running into this issue whilst hosting Home Assistant behind their own reverse proxy, I was able to workaround it by responding with a 404 instead of a 403 in the case of unauthorized access.
iOS device model, version and app version
Model Name: iPhone 13 Pro Max Software Version: iOS 18.0.1 App version: 2024.9.4
Home Assistant Core Version 2024.11.1
Describe the bug
I have a server on my local network that appears in the "Add Server" list. It appears there with a DNS name that works on my local network. I can add the server, authenticate, login just fine. The server shows up in the list with the cloud icon next to it. However at some point after, not sure what triggers this, the server just disappears from the list.
To Reproduce See steps above.
Expected behavior Once added, a server should NEVER disappear from the list of servers that I have added. It's a horrific UX to have items that the users adds to a list simply disappear for no logical reason. If there's a problem communicating with the server, authentication issue, network problem, whatever, the server should stay in the list and it should indicate that it's in an error state and the UI should provide a way for the user to correct the problem. It should NOT just disappear from the list for ANY reason whatsoever. Any server that was valid when it's add should persist in that list even if it later becomes invalid for any reason.
Screenshots
Additional context
This HA instance is a docker container behind an NGINX reverse proxy that is using a Let's Encrypt certificate using a custom DNS name. The HA instance itself ifs NOT directly exposed to my network but instead sits behind the NGINX.
I have the following in my configuration.yaml file
homeassistant: internal_url: https://custom-dns.name.here.this.is.an.example