Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App loses / deletes server configuration #2780

Closed
litronics opened this issue May 20, 2024 · 27 comments
Closed

App loses / deletes server configuration #2780

litronics opened this issue May 20, 2024 · 27 comments
Assignees

Comments

@litronics
Copy link

Model Name: Iphone 12
Software Version: 17.5
App version: 2024.4(2024.624)

Home Assistant Core Version
2024.5.4

Describe the bug
The Iphone forgets the server configuration and starts without any configured server. When configuring a new server, the app works as expected.

To Reproduce
Configure a Server and wait for a few hours without using it.

Expected behavior
Server is stored and remembered all the time (as on our Iphone 15)

@bgoncal
Copy link
Member

bgoncal commented May 22, 2024

Can you reproduce the issue?

@bgoncal bgoncal self-assigned this May 22, 2024
@litronics
Copy link
Author

Good question.
There is no action we can take to reproduce it directly.
It just happens when the app is not used for some time.

@bgoncal
Copy link
Member

bgoncal commented May 22, 2024

Good question. There is no action we can take to reproduce it directly. It just happens when the app is not used for some time.

So it happened more than once?

@litronics
Copy link
Author

Yes, otherwise I would have thought that we might made a mistake while configuring the server.

As said earlier - there is no specific action we can take to reproduce this.
After configuring the server the app works fine with no issues.

After not using the app for a while, the server configuration is gone and we need to reconfigure the server. I don't know the exact time required to loose the server configuration but I guess its either some background task, a wakeup procedure after reactivating the app or an IOs issue with the storage causing that issue.

Just as a side note - there is enough free space on the iphone and it shouldn't be an issue to store the configuration :)

Is there some kind of log I can turn on, which logs all what happens when the app is not actively used?

@bgoncal
Copy link
Member

bgoncal commented May 27, 2024

In the App settings inside "Debugging" you can find a button to export logs, when this happens again please do so (after login of course)

@litronics
Copy link
Author

2024-05-27_12.34.11+0200.logs.zip

These are the logs from the App. There are some errors but I don't know if they are related to our issue.

@bgoncal
Copy link
Member

bgoncal commented May 27, 2024

So it happened again?

@litronics
Copy link
Author

actually yes - we just didn't use the app for a few hours and had to reconfigure the server.

Here the new logs:
2024-05-27_19.10.56+0200.logs.zip

@bgoncal
Copy link
Member

bgoncal commented May 28, 2024

Let's try deleting the App from the devices that have the problem, rebooting and installing the latest App Store version 2024.5

@litronics
Copy link
Author

Unfortunately the same behaviour.

Here the logs:
2024-05-29_22.52.19+0200.logs.zip

@zacwest
Copy link
Member

zacwest commented May 30, 2024

You're signed in as a local only user. Accessing outside your local network is expected to fail.

@litronics
Copy link
Author

litronics commented May 31, 2024

You're signed in as a local only user. Accessing outside your local network is expected to fail.

You may be right. But that is not the issue.
The issue is that HA starts as it hasn't been connected to ANY sever previously. After an hour not using HA it just forgets all configured connections.

I am also sure that this is not the issue, because it is working wit our other iPhone. Therefore I am sure that this is somehow related to some kind of setting or permission or whatever on that phone.

@fenderle
Copy link

fenderle commented May 31, 2024

I have the same issue here with my phone and my wife's phone. It's super annoying and started a while ago. Not exactly sure when. Everything is at the latest version.

I just deleted and reinstalled the app with cleaning all the data, also revoking all refresh tokens and disabling the ip banning in HA.

@mundschenk-at
Copy link

mundschenk-at commented Jun 24, 2024

I think the issue is triggered when it can't access the configured (external) address a certain number of times. I can reproduce it at will when switching between a non-WiFi network that is allowed to access the server and a WiFi network that is not.

@litronics
Copy link
Author

I think the issue is triggered when it can't access the configured (external) address a certain number of times. I can reproduce it at will when switching between a non-WiFi network that is allowed to access the server and a WiFi network that is not.

Interesting idea - however, we do have two iPhones, one is working the other one shows that behavior. Therefore I would guess, that accessing the address is not the issue.

@mundschenk-at
Copy link

It may not be the only trigger for the issue, but it apparently is a trigger.

@litronics
Copy link
Author

Funny thing though - after updating HA Core to a newer version it works now and both iPhones are connected without any issues.

Currently we are running version: 2024.6.2

@mundschenk-at
Copy link

@litronics That might have removed the trigger for your case, but not the general issue. I am running 2024.6.4 and I can (unfortunately) still reproduce the issue whenever I am on the wrong network.

@litronics
Copy link
Author

@mundschenk-at That seem to be a different issue than mine. Probably it would be a good idea to open a new issue. There you can describe precisely how you are able to reproduce that issue.
In our case we just didn't use the app for some time. But in your case you seem to be connected to the wrong network - this could be a standard behavior from the app.

@mundschenk-at
Copy link

It's not the wrong network per se, just one not authorized. I don't think the app should ever delete the configuration without prompting by the user.

Not sure when I'll have the time to create a new issue since I am on the road (which is why I noticed), but OK.

@ChristopherGerdes
Copy link

ChristopherGerdes commented Oct 14, 2024

FYI, this has started happening to me as well as of about a week ago.

It seems to only happen when I'm accessing it from cell (rather than on my home network), but it does not always happen when I'm accessing it from my cell.

@grownuphacker
Copy link

Just dropping in to say I'm experiencing the behaviour from about a week ago. Everything latest version on an iPhone 15. If there's any debug logs I can send to help, just ask.

My setup is an auto updating docker container (does not happen after updates) and multiple AP roaming wifi. Periodically simply forgets all server data.

@tragram
Copy link

tragram commented Nov 7, 2024

I'm having the same issue (external access on my own domain via Cloudflare). It has happened several times with different iPhones (I set up someone else's phone and on the next day, the server was not there). Luckily appears to be fixable by allowing external access for their account.

@grownuphacker
Copy link

Interesting detail - I'm also using a personal domain on CloudFlare and we're having multiple isolated intermittent faults on CloudFlare proxy at work (SaaS software).

@guidau
Copy link

guidau commented Nov 14, 2024

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.

@ChristopherGerdes
Copy link

This appears to still be happening. Can we reopen it?

@bgoncal
Copy link
Member

bgoncal commented Nov 15, 2024

Continue the discussion here: #3141 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants