ESPAsyncWebServer wont run with send SPIFFS but will run with send text/plain

pwm802
Posts: 1
Joined: Thu Jan 05, 2023 5:34 pm

ESPAsyncWebServer wont run with send SPIFFS but will run with send text/plain

Postby pwm802 » Thu Jan 05, 2023 6:16 pm

Hi,
I am working in PlatformIO and I'm trying to get the ESPAsyncWebServer running on a NodeMCU-32S and I cannot get the server to run with send(SPIFFS,"/index.html")
  1. server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
  2.     request->send(SPIFFS, "/index.html");

I can get the server to start with:

  1. server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){
  2.     request->send(200, "text/plain", "This is a test string");

I can see in both cases that the wifi connects but with the send(SPIFFS) port 80 is not opened. If I use send(text/plain) port 80 is opened.

I have tried several examples but none of them will run the server with send(SPIFFS). I tried to debug in PlatformIO with my J-link but I can't configure my J-link to use the WINUSB driver with my J-link version. I ordered a Olimex ARM-USB-OCD-H JTAG probe that should let me debug in PlatformIO but wondered if there was something I could do with serial.println() that would give me some insight into why the server is not starting?

Who is online

Users browsing this forum: Bing [Bot] and 97 guests