iOS app 'Connection Lost, reconnecting'

Often when we (husband and I) open our iOS apps, the app will show ‘Connection lost, reconnecting’ for up to 5 minutes. At the same time home kit devices show as unavailable (not sure if this is related).

We have a pretty basic setup - this happens both when connected to our home wifi and 4G
iPhone 11 and XR with latest iOS version, latest iOS Home assistant app
Home Assistant Core 0.113.2
Raspberry Pi 3+ with HassOS 4.11
DuckDNS and DNSMasq Addons.
Ubiquity Dream Machine router with static IP set for Raspberry pi and forwarding port 8123.

Not too sure where to start with this - there is an error showing in the core log around the time the app is having trouble connecting.

2020-07-31 15:30:24 ERROR (MainThread) [frontend.js.latest.202007021] https://xxxxxx.duckdns.org:8123/frontend_latest/chunk.b33c9e401dd2387e7c3f.js:2:20586 TypeError: undefined is not an object (evaluating 't._leaflet_pos')
2020-07-31 15:30:25 ERROR (MainThread) [frontend.js.latest.202007021] https://xxxxxx.duckdns.org:8123/frontend_latest/chunk.b33c9e401dd2387e7c3f.js:2:20586 TypeError: undefined is not an object (evaluating 't._leaflet_pos')

have removed and re connected the app to HA, now it connets and logs in but it will not add any sensors ?

How did you go with this?

I had the same problem right after I’d done a fresh install of HA and restored my config from a snapshot. It turned out to be an issue with the static IP I am using on my home network. I think that the reload of HA configured a DHCP acquired IP, not a static IP and at the same time the wifi settings from my old config were also getting cranky, because for the new install I hadn’t specified any wifi settings. (I just don’t use the wifi as a part of my HA.)

The long and short of it was that I think my IP settings were some sort of weird mish-mash of the newly installed system and the old snapshot. To fix it I followed the instructions here, making sure I added the bit about the static IP, and the connection is now rock solid.

So, you may not have reloaded HA, or restored from a snapshot, but performing the procedure I linked can’t hurt anything and it might just re-jig whatever is amiss.