Platform
ESP32
IDE / Tooling
Arduino (IDE/CLI)
What happened?
I updated from 3.9.6 to 3.10.1 and this code is now always returning 404
AsyncCallbackJsonWebHandler* loginHandler = new AsyncCallbackJsonWebHandler("/oca-timer/login", handlePostLogin);
server.addHandler(loginHandler);
The first line in the handler is just a Serial Print but it never shows.
I downgraded to 3.10.0 and it worked.
AsyncTCP is 3.4.10
Stack Trace
n/a
P.S. On another note the please decode it link does not work
Minimal Reproductible Example (MRE)
#include <Arduino.h>
#include <AsyncTCP.h>
#include <WiFi.h>
#include <ESPAsyncWebServer.h>
#include <ArduinoJson.h>
AsyncWebServer server(80);
void connectToWifi (char* ssid, char*password)
{
WiFi.disconnect(false);
WiFi.persistent(false);
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
bool ret = false;
Serial.println("");
int i = 0;
while (WiFi.status() != WL_CONNECTED && i < 60) {
delay(1000);
Serial.print(".");
i++;
}
Serial.println("");
char msg[100];
sprintf (msg, "WiFi connected IP: %d.%d.%d.%d", WiFi.localIP()[0], WiFi.localIP()[1], WiFi.localIP()[2], WiFi.localIP()[3]);
Serial.println (msg);
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
connectToWifi("SSID", "PASSWORD");
AsyncCallbackJsonWebHandler *testHandler =
new AsyncCallbackJsonWebHandler("/test", handlePostTest);
server.addHandler(testHandler);
server.begin();
}
void handlePostTest (AsyncWebServerRequest *req, JsonVariant &json)
{
Serial.println ("In Test Handler");
AsyncWebServerResponse *response;
if (req->method() == HTTP_POST) {
response = req->beginResponse(200, "application/json", "{\"msg\": \"OK\"}");
}
else
{
req->beginResponse(501, "application/json", "{\"msg\": \"Not Implemented\"}");
}
req->send(response);
}
void loop() {
// put your main code here, to run repeatedly:
}
v 3.10.0

v3.10.1
I confirm that:
Platform
ESP32
IDE / Tooling
Arduino (IDE/CLI)
What happened?
I updated from 3.9.6 to 3.10.1 and this code is now always returning 404
The first line in the handler is just a Serial Print but it never shows.
I downgraded to 3.10.0 and it worked.
AsyncTCP is 3.4.10
Stack Trace
n/a
P.S. On another note the please decode it link does not work
Minimal Reproductible Example (MRE)
v 3.10.0

v3.10.1
I confirm that: