ESPHap icon indicating copy to clipboard operation
ESPHap copied to clipboard

Initial load errors in webpage

Open chrwh opened this issue 3 years ago • 6 comments

Hi, When ever I load the webpage, I get sporadic feedback for the stages of the the sliders. They does not get the correct response. In the picture all sliders should be off, when the page is loaded, because all switches are off in homekit. If I then turn all the sliders to off, and then start to use them, they works correctly, until the next time you reload the page.

Do you have any pointers where I should start to look for my mistakes first?

Hardware M5Stack Grey

Initial load error

chrwh avatar Aug 28 '21 11:08 chrwh

Hmm, It works without any issues in Firefox, but with Edge and Chrome it has the issues above.

chrwh avatar Aug 28 '21 22:08 chrwh

Found it, it's an issue in Webserver.cpp in ESP32 V.1.0.4, it has been fixed from V.1.0.5, but that version does not seems to work on M5Stack // Fix for issue with Chrome based browsers: https://github.com/espressif/arduino-esp32/issues/3652 // if (_currentClient.connected()) { // _currentStatus = HC_WAIT_CLOSE; // _statusChange = millis(); // keepCurrentClient = true; // }

chrwh avatar Aug 29 '21 15:08 chrwh

Hi I know a root cause, by default esp is able to process one request at one time, means when is first request no finished second cold not be processed , there are another implementation exists, but for our case I w’d suggest and will do changes in jawascript to prevent second request when first is no finished

Sent from my iPhone

On 28 Aug 2021, at 14:37, chrwh @.***> wrote:

 Hi, When ever I load the webpage, I get sporadic feedback for the stages of the the sliders. They does not get the correct response. In the picture all switches are off, when the page loaded. If I then turn all the sliders to off, and then start to use them, they works correctly, until the next time you reload the page.

Do you have any pointers where I should start to look for my mistakes first?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

Yurik72 avatar Aug 29 '21 15:08 Yurik72

OK, that sounds good, let me know if I should make tests for you :-)

chrwh avatar Aug 29 '21 15:08 chrwh

Hi all,

just update to V3.3.2 and it seem not fixed for me ! my web site do a GET request to the ESP32 every 2 seconds

all requests are 200 OK then every 10 or 15 seconds, the server seem hangs .. request are (pending) for some seconds, maybe 10, then served or timeout for certain

using Chrome, Brave or Edge image

please any advice ? thanks, regards

phil31 avatar Sep 22 '21 21:09 phil31

Hi, I stil lhave the same issues aswell. I would alsp really like a solution to this :-) Best regards, Christian

chrwh avatar Dec 26 '21 13:12 chrwh