-
Notifications
You must be signed in to change notification settings - Fork 590
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
Widget sometimes gets stuck #4200
Comments
we cannot proceed without logs, please get us the logs when the issue is reproduced. |
I managed to reproduce the issue and capture the logs. Hoping it doesn't contain anything private:
The button widget was pressed sometime around 10:39. |
your server is returning a 404 error , this needs to be solved anything unique about your setup? can you try logging out and logging back in to the app? |
@dshokouhi only thing I can think of is the Home Assistant instance works over Tailscale. But, this happens even on home Wi-Fi, where Tailscale is not required for mDNS discovery. I don't believe it's an authentication issue as when I launch the app it loads the dashboard after a second or two. |
the issue is that the server is returning a 404 error and that is not an error the app can solve, this must be solved on teh server end. |
@dshokouhi Well is there a way to see where it got that error from? If it's from the server, is there a way to see why the server returned a 404 in the HA logs? |
you can try checking HA core logs to see if any error correlates there but as you mentioned you use tailscale the error may originate from elsewhere. Its not as easy to tell but the API the app is using looks to be failing due to a 404 error so I would start checking things on the network. Make sure all APIs are open in case you are restricting something. A 404 error is a bit unexpected here as I would imagine we would see a failed to connect error or something similar. So just to confirm the issue you are seeing is that the widget gets stuck in this state presumably with the same error and never it recovers? or it eventually recovers? Do you ever see the widget with an error message? You only have this one Entity State widget correct? |
No restrictions, as far as I'm aware.
The widget:
No error messages are shown, through toasts or notifications, as far as I'm aware, other than the third aforementioned state where the error symbol is shown. It eventually recovers when I do other stuff on the phone and then come back to the widget. I find that it has recovered in the background, but am unsure how long this recovery process takes. Sometimes launching the HA companion app, quitting it, and then repeating a couple of times makes the widget recover, but not always.
Yup, just this entity widget. EDIT: updated when the widget "recovers" from this bugged state EDIT2:
Forgot to mention, I did check, but there's nothing of note. |
Can you check if its always the same error here and the same amount of time things take? Our error handling here is always the same so it sorta suggests some calls just take forever to get a response back which is why the loader looks to be stuck. Although that is also odd because we set a timeout to 30 seconds. However teh 404 error the server is returning is also unexpected and not common. I would also suggest bypassing the entire tailscale setup and connect directly to the server to rule out a configuration issue. |
I can test with Tailscale disabled when I get back home today, but in the meantime I think that timeout might be too high. Is there a way for the user to tweak that setting? I think ideally it should be around 10 seconds or so, and it should retry once before showing an error screen. So it'll allow for transient network failures (or switching from Wi-Fi to mobile data), and it'll be shorter than 30 seconds. |
no these are sane defaults to work with majority of setups and use cases. Retries are already configured in places appropriate. This current code works fine for most users. As mentioned before the 404 error you are facing is unique and not common which may also relate to why the widget looks stuck. In your logs the error returned immediately but we are not sure this is always the case, even in the event a timeout has reached we should still show the error. |
1 more request, can you please share teh configuration of the widget having the issue please? |
@dshokouhi sure: |
@dshokouhi just got back home, enabled and connected to Wi-Fi, disabled Tailscale, and re-tested. Widget got stuck on the first try, which is good for repro :) So we can definitely rule out Tailscale from the equation. I let the widget load, and it continuously ran for way longer than 30 seconds. After 90 seconds, I decided to collect logs (attached below). When I exited out of the Home Assistant app it was still loading. I checked it a couple of minutes later and it correctly showed the entity state, although I am not sure when it got unstuck. So when the widget gets into this state it doesn't time out, nor does it retry the operation. Or at least it appears to behave that way. Tapping on the widget during this infinite load state does nothing. The widget was pressed at around 15:48 or 49. (It got unstuck between then and 56.) Logs
|
Any progress on this? |
Home Assistant Android app version(s): 2024.1.5-full
Android version(s): Android 14
Device model(s): Z Fold 5
Home Assistant version: 2024.2.1
Last working Home Assistant release (if known): N/A
Description of problem, include YAML if issue is related to notifications:
Sometimes the Home Assistant app get stuck trying to refresh the widget. See attached screenshot. The loading circle continues to spin, sometimes even after entering the app, flipping the entity connected to the toggle widget, and exiting.
Companion App Logs:
I can share logs privately if needed.
Screenshot or video of problem:
Additional information:
The text was updated successfully, but these errors were encountered: