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

release 3.2.0 breaks esphome web_server component #30

Open
czipis opened this issue May 21, 2024 · 5 comments
Open

release 3.2.0 breaks esphome web_server component #30

czipis opened this issue May 21, 2024 · 5 comments

Comments

@czipis
Copy link

czipis commented May 21, 2024

please see this issue esphome/issues#5793

@czipis czipis changed the title release 3.2.0 breaks eshome web_server component release 3.2.0 breaks esphome web_server component May 21, 2024
@bkaufx
Copy link

bkaufx commented May 21, 2024

Specifically I think the mutex/bool for queue processing is a problem for the events server. So far ESP32 doesn't seem to be having issues, or nowhere near as significant as ESP8266.

I can help debug, but not really sure what the best way to do that is. Add debug logging around the mutex/bool?

Issue may be related to the following statement from the ESPHome documentation. "Additionally, each time a client connects to the event source the server sends out all current states so that the client can catch up with reality." That would be corroborated by anecdotal evidence that devices with more entities have worse issues with this.

@bkaufx
Copy link

bkaufx commented May 21, 2024

Added a print statement and can see that when the web_server page fails to load, it is stuck in an infinite loop at this line:

  if(this->_messageQueue_processing){
    return;
  }

As soon as I close the browser page trying to load events, the loop stops. When the web page loads properly, that return never executes.

@bkaufx
Copy link

bkaufx commented May 21, 2024

When the web interface fails to load properly, the message queue fills up to 32 and then stays there forever. Never goes down at all.

@bkaufx
Copy link

bkaufx commented May 21, 2024

It appears as though, when the page fails to load, the _messageQueue_processing boolean is already set to true by default without the _runQueue function ever executing.

@bkaufx
Copy link

bkaufx commented May 23, 2024

This PR was merged so issue should be fixed in 3.2.1. Still needs to be added into ESPHome though.

#31

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

No branches or pull requests

2 participants