RemoteWebViewServer icon indicating copy to clipboard operation
RemoteWebViewServer copied to clipboard

Intermittent navigation failure with lovelace-navbar-card on RemoteWebViewServer (ESP32 display)

Open jbega opened this issue 6 months ago • 9 comments

Describe the bug

When using lovelace-navbar-card to navigate between dashboard views on a RemoteWebViewServer setup (ESP32 display), the navigation fails intermittently (approx. 10% of the time).

CRITICAL OBSERVATION (100% reproducible):

The hover of the icon in the navbar changes ✅

The color of the icon in the navbar changes ✅

When it fails (approx. 10% of the time):

Hover works ✅

Icon color changes ✅

Server log shows [device] URL changed to: http://... ✅

ESP32 log shows Current Server URL updated and frame X: tiles X (XXX bytes) ✅

The main card/content does NOT change ❌

When it works (approx. 90% of the time):

Hover works ✅

Icon color changes ✅

Server log shows URL change ✅

ESP32 log shows frames ✅

The main card/content changes ✅

When using standard buttons with navigate action instead of lovelace-navbar-card, navigation works 100% of the time.

Logs (real) Server log when navigation fails:

text [device] URL changed to: http://xxx.xxx.xxx.xxxx:8123/dash-control-home/ventilador ESP32 log when navigation fails:

text [09:53:39.464][D][Remote_WebView:144]: Current Server URL updated: http://xxx.xxx.xxx.xxxx:8123/dash-control-home/ventilador [09:53:39.563][S][text_sensor]: 'Remote Display Current URL' >> ' http://xxx.xxx.xxx.xxxx:8123/dash-control-home/ventilador' [09:53:39.575][D][Remote_WebView:033]: Triggering the on_frame_update automation [09:53:39.576][D][Remote_WebView:411][rwv_decode]: frame 746: tiles 1 (1090 bytes) - 2 ms [09:53:39.759][D][Remote_WebView:411][rwv_decode]: frame 747: tiles 1 (1786 bytes) - 3 ms

Hardware:

Display: Guition-ESP32-S3-4848S040 (480x480)

Server: RemoteWebViewServer running on Home Assistant OS

jbega avatar Jun 02 '26 18:06 jbega

What is your EVERY_NTH_FRAME value?

strange-v avatar Jun 03 '26 05:06 strange-v

What is your EVERY_NTH_FRAME value?

Hello, Thanks for your reply!

Right now, I have it set to: every_nth_frame: 1.

I’ve spent a couple of days experimenting with the AI to find the right values (though I don’t think we’ve touched this one before).

jbega avatar Jun 03 '26 07:06 jbega

Your (or AI) description clearly suggests that you're missing frames. The most obvious reason is EVERY_NTH_FRAME > 1.

If EVERY_NTH_FRAME is set to 1 and you still see the described behavior, try connecting to the server via Chrome Dev Tools to check what is shown on the web page.

strange-v avatar Jun 03 '26 07:06 strange-v

Your (or AI) description clearly suggests that you're missing frames. The most obvious reason is EVERY_NTH_FRAME > 1.

If EVERY_NTH_FRAME is set to 1 and you still see the described behavior, try connecting to the server via Chrome Dev Tools to check what is shown on the web page.

First of all, I should have said this from the beginning: this is an incredible project, thank you

Yes, after several days of trying a bunch of things and different cards, I was a bit overwhelmed yesterday and asked the AI to draft it for me; my brain just couldn't handle any more XD.

Yesterday I spent half the afternoon in DevTools running tons of tests to see if it was the clicks, pointerdown, mouseclick... but I haven't achieved anything. In DevTools (controlling from the Guitionesp32 screen), I’m getting the same results.

It’s weird, because it always works fine with a second click. On the other hand, it’s completely random when it only changes the hover but not the card; most of the time it works fine.

I also tried changing the actions in the navbar (URL -> navigate) just to see if it was due to the 'way the action is called,' but I’m not getting any different results... I guess the navbar handles it differently or something

If you can think of any tests I could run, I’d be happy to carry them out and provide the data

jbega avatar Jun 03 '26 07:06 jbega

Are you saying the physical screen and DevTools behave the same way? If yes, the RWV client and server aren't the problem (at least directly), and you should probably dig into why lovelace-navbar-card behaves this way when run on a headless browser.

strange-v avatar Jun 03 '26 08:06 strange-v

Are you saying the physical screen and DevTools behave the same way? If yes, the RWV client and server aren't the problem (at least directly), and you should probably dig into why lovelace-navbar-card behaves this way when run on a headless browser.

Yes, I posted the same report in both places because I haven't been able to figure out absolutely anything... The webserver and webclient without the navbar work absolutely fine; I've tested all sorts of bizarre scenarios XD, and the navbar on its own works fine too. Plus, it’s not something that fails every time; it’s very random. What inspired me to post here is that I saw in the logs that the URL change logs were being received on both ends (server and client).

On another note, having tested it more thoroughly, here are the scenarios:

If I perform the navigation via DevTools -> it never fails; they always change (in both DevTools and the client).

If I perform the navigation on the screen (when it fails) -> it fails on the screen (it doesn't change), but it does change in DevTools.

If double-click : It never fails

I hope this helps to better understand the issue

jbega avatar Jun 03 '26 11:06 jbega

Based on the description, it still looks like a frame is being dropped somewhere. The client-side buffer may be overflowing. In version 1.4.1, I changed the corresponding log message from a warning to an error.

Please update the client, reproduce the issue, and monitor the logs for the following message:

decode queue full, dropping packet

strange-v avatar Jul 25 '26 06:07 strange-v

Based on the description, it still looks like a frame is being dropped somewhere. The client-side buffer may be overflowing. In version 1.4.1, I changed the corresponding log message from a warning to an error.

Please update the client, reproduce the issue, and monitor the logs for the following message:

decode queue full, dropping packet

Sorry, I wasn't able to get to it until today.

Client and server updated and tested; there are no lines with 'decode queue full, dropping packet' when reproducing the issue, but it still persists.

jbega avatar Aug 12 '26 16:08 jbega

Please test with the latest server and client release.

strange-v avatar Oct 10 '26 15:10 strange-v