Closed
Description
Board
ESP32 Dev Module
Device Description
DevKitC
Hardware Configuration
SPI connected Display
Version
latest master
IDE Name
Arduino IDE
Operating System
Mac OS 12.3
Flash frequency
80Mhz
PSRAM enabled
no
Upload speed
115200
Description
after the upgrade to 2.0.3 RC1 the ESPAsyncWebServer Processor is not working as expected, is cutting the output in more points without any placeholders involved. Downgrading to 2.0.2 fix the issue.
I was already using the github master repo till approximately one month ago with no issues, I upgraded today to the latest master and the same code is not working anymore. Downgrading to 2.0.2 fix the issue.
Sketch
server.on("/status", HTTP_GET, [](AsyncWebServerRequest *request){
if(!request->authenticate(http_username, http_password)) {
return request->requestAuthentication();
}
request->send(LittleFS, "/status.html", String(), false, processor);
}).setFilter(ON_STA_FILTER);
Output expected (as per static html file served)
<select name="selectedTA" id="selectedTA">
<option value="0">100A - 50mA</option>
<option value="1">250A - 0.1A</option>
<option value="2">120A - 40mA</option>
<option value="3">400A - 0.1A</option>
</select>
Output produced
<select name="selectedTA" id="selectedTA">
<option value="0">100A - 50mA</option>
<option value="1">250A - 0.1A</option>
<option value="2">120A - 40mA</option>
<option value="3a.append("timezone", timezone);
data.append("tz", tz);
... (cutted at least 20-30 lines with no reason after value="3)
Other Steps to Reproduce
try to serve a web page (4-5Kb) with processor (in my case from LittleFS), it should cut parts of the output in one or more point, with no placeholders involved in that points.
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity
dsilletti commentedon Mar 30, 2022
I tried to revert to previous commits to find the issue.
I found the commit that is breaking the code:
Edited VFSFileImpl::read to use both read/fread 7b89b39
please fix it or remove it.
reverting to the previous commit 905f8f2 Warns about SSP only available for ESP32 (#6455) fixed finally the issue and the web page is served full.
me-no-dev commentedon Mar 30, 2022
@P-R-O-C-H-Y take a look please :)
@dsilletti thanks for digging in! Will get fixed!
Jason2866 commentedon Mar 31, 2022
We run in issues to. See #6507 Removing this PR did solve too.
P-R-O-C-H-Y commentedon Apr 4, 2022
Hi @dsilletti,
Can you provide for me sketch that I can just easily run? To test your case. The more test cases I have the better it is to fix the bug. Thanks
dsilletti commentedon Apr 5, 2022
Hi @P-R-O-C-H-Y,
basically my sketch is using EspAsyncWebserver to serve html files from the LITTLEFS, using also the processor to replace some placeholders with some strings.
I think the problem is with reading the file, the output most of the time is missing large chunks, even in multiple parts of the html file, the missing chunks are always the same (probably based on the buffer size you configured in the PR).
Only 10-20% of the requests are successful with full html served.
I will try to provide a short sketch that does just this, with an example html page to upload to the SPIFFS/LITTLEFS partition.
15 remaining items