Skip to content

2.0.3 RC1 issues with ESPAsyncWebServer Processor #6502

Closed
@dsilletti

Description

@dsilletti

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.

Activity

dsilletti

dsilletti commented on Mar 30, 2022

@dsilletti
Author

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

me-no-dev commented on Mar 30, 2022

@me-no-dev
Member

@P-R-O-C-H-Y take a look please :)

@dsilletti thanks for digging in! Will get fixed!

added
Priority: High 🗻Issues with high priority which needs to be solved first.
Type: RegressionResult of unforeseen consequences of a previous change
and removed on Mar 30, 2022
added this to the 2.0.3 milestone on Mar 31, 2022
Jason2866

Jason2866 commented on Mar 31, 2022

@Jason2866
Collaborator

We run in issues to. See #6507 Removing this PR did solve too.

P-R-O-C-H-Y

P-R-O-C-H-Y commented on Apr 4, 2022

@P-R-O-C-H-Y
Member

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

dsilletti commented on Apr 5, 2022

@dsilletti
Author

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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Priority: High 🗻Issues with high priority which needs to be solved first.Type: Bug 🐛All bugsType: RegressionResult of unforeseen consequences of a previous change

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions

    2.0.3 RC1 issues with ESPAsyncWebServer Processor · Issue #6502 · espressif/arduino-esp32