Closed Zhu-jiatong closed 3 months ago
Same issue: me-no-dev/ESPAsyncWebServer#1410
This is a fairly easy fix, but the issue belongs in the library, not here.
will fix it these days
guys, heads up, ESPAsyncWebServer is bugy and it will do a mem. corruption sooner or later. There is a big "desing" flaw on that lib. ESPAsyncWebServer uses AsynTcp lib, onDisconnect callback delete an AsyncClient pointer allocated by AsyncServer. On short, there is a "delete this" for an AsyncClient pointer, which is at least wrong. My app. crashed random, sometime after few hours, sometime after few days.
Please don't hijack issues. Open an issue in the appropriate forum. Post a complete breakdown of the problem, along with code that demonstrates the issue.
@lbernstone sorry for my prev. post. it seems the procedure is more important than the issue it self. should I delete my prev. comment?
Your question is not going to be answered here, since this is not the repository for ESPAsyncWebServer. You can interpret that as a focus on process if you like,
@lbernstone sorry, but you said "your question....", about what question are you talking about? There were only one question, asking if shall I delete my post, there were no question regarding ESPAsyncWebServer, just a warning.
Hello, as mentioned above, this problem need to be solved in ESPAsyncWebServer library. There are no action points in this repo, closing.
Relevant ticket: https://github.com/me-no-dev/ESPAsyncWebServer/issues/1410
For anyone having trouble with this now, I made the compiler's suggested changes manually in library files and got it to work. Though this might not be the best solution, it will work.
For example, for this error: C:\Users...\Documents\Arduino\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp:74:3: error: 'mbedtls_md5_starts_ret' was not declared in this scope; did you mean 'mbedtls_md5_starts'?
Do this for all compiler suggestions.
Arduino\libraries\ESPAsyncWebServer\src\WebAuthentication.cpp
#include <mbedtls/md5.h> // Add this include at the top
//Changes in this function
bool getMD5(uint8_t* data, uint16_t len, char* output) {
mbedtls_md5_context _ctx;
unsigned char _buf[16];
mbedtls_md5_init(&_ctx);
mbedtls_md5_starts(&_ctx); // Change this line
mbedtls_md5_update(&_ctx, data, len); // Change this line
mbedtls_md5_finish(&_ctx, _buf); // Change this line
mbedtls_md5_free(&_ctx);
for (int i = 0; i < 16; i++) {
sprintf(output + (i * 2), "%02x", _buf[i]);
}
return true;
}
In all code files where ets_printf() exists. Use the find tool to locate all ets_printf and change to printf. (Eg: in AsyncWebSocket.cpp and AsyncEventSource.cpp)
printf("ERROR: Too many messages queued\n"); // Change this line (Example)
I made the changes shown by rashmithachamikara above, but there was no change in the error messages generated when I compiled my sketch. Possible differences in my environment that may have rendered the changes ineffective:
1) My target device is "Al Thinker ESP32-CAM"
2) I am using Arduino IDE 1.8.19, not IDE 2.x
3) I tried both #include
Any suggestions?
This problem has been around for a few months now; is a fix on the horizon?
Thanks @rashmithachamikara. Worked for me for ESP32 project.
Thanks rashmithachamikara, after the changes suggested the library is working on IDE 2.3.2
Thanks @rashmithachamikara! It worked like charm for me as well.
Many thanks to @rashmithachamikara ...Issue solved !
Thanks, this worked. Why not commit these changes?
Board
Any
Device Description
Any
Hardware Configuration
Any
Version
v3.0.0
IDE Name
Arduino IDE with VSCode
Operating System
Windows 10
Flash frequency
80Mhz
PSRAM enabled
no
Upload speed
921600
Description
Cannot compile sketch that uses ESPAsyncWebServer. It seems to be an issue with breaking changes to core library.
Sketch
Debug Message
Other Steps to Reproduce
Compile the sketch using the 3.0.0 version.
I have checked existing issues, online documentation and the Troubleshooting Guide