Closed Linzm99 closed 2 years ago
Once this happened to me because the ESP didn't have enough Wi-Fi signal. When I moved it closer to the AP it worked fine.
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.
I had the same problem, But the problem seems to be in OTA (AsyncElegantOTA)
I have code that is like
void TConfigurationWebHandler::RequestHandler(AsyncWebServerRequest* request) { DBG_OUTPUT_PORT.println(F("TConfigurationWebHandler::RequestHandler")); if(request->method()==HTTP_POST) { } else { TConfigurationWebHandler handler; String json=handler.getConfigurationData();//So the content is not released to early DBG_OUTPUT_PORT.println(F("before send")); DBG_OUTPUT_PORT.println(json); request->send(200, "text/json", json); DBG_OUTPUT_PORT.println(F("after send")); DBG_OUTPUT_PORT.println(json); } }
When OTA was enabled, after the send, the content of the json would be cleared. This while the string is passed as const String &
I am still investigating why OTA causes this behavior.
Hi, I am using an esp8266 with asyncwebserver as an iot device. Additionally I am using OTA flashing, a NTP client to get time information and an http client to get weather information. After booting everything works fine but after some time when loading the page from the webserver(for example with chrome on my pc) the esp just returns parts of the original html code that should be returned. To be exact only the first 30 to 40 lines and some additional strange ascii symbols. Sometimes it doesnt load at all. I also have issues pinging the esp but only for a short time. Then the ping works again, but not the webserver. The main loop code of the esp keeps running all the time.
This seems like a memory Problem, but I dont know where to start. Would storing the html code in SPIFFS possibly solve this problem?
Here is my code: