ESPAsyncWebServer not working

Hey all. I’m trying to use the ESPAsyncWebServer library but having issues getting any of the example code to work.
Running the perftest example: ESPAsyncWebServer/examples/PerfTests/PerfTests.ino at main · ESP32Async/ESPAsyncWebServer · GitHub
I’m using platformio with the following settings

platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_compat_mode = strict
lib_ldf_mode = chain
lib_deps = 
    mike-matera/FastPID@^1.3.1
    madhephaestus/ESP32Servo@^3.0.6 
    ESP32Async/AsyncTCP
    ESP32Async/ESPAsyncWebServer

Not seeing any signs of life over the serial port or any connections to the wifi. Interestingly the following ifdef is false, but not sure why or if this has an affect on my issue.

#if SOC_WIFI_SUPPORTED || CONFIG_ESP_WIFI_REMOTE_ENABLED || LT_ARD_HAS_WIFI
  WiFi.mode(WIFI_AP);
  WiFi.softAP("esp-captive");
#endif

These flags are from Arduino 3.x core and not available in Arduino 2.x

Either remove the #if section around those two lines or update to Arduino 3.x.

To get the latest Espressif32 Arduino 3.x core you can use pioarduino’s platform-espressif32 simply by changing the platform setting. At the same time, you should remove unnecessary settings from your paltformio.ini:

[env:esp32dev]
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps = 
  ESP32Async/ESPAsyncWebServer

There should be output on the Serial
If the lines are disabled, the ESP crashes and logs that to the serial:

assert failed: tcpip_api_call IDF/components/lwip/lwip/src/api/tcpip.c:497 (Invalid mbox)


Backtrace: 0x400835b9:0x3ffb2020 0x4008859d:0x3ffb2040 0x4008d681:0x3ffb2060 0x400e86da:0x3ffb2190 0x400f5b03:0x3ffb21c0 0x400d73e5:0x3ffb2200 0x400d236f:0x3ffb2220 0x400da39e:0x3ffb2290

If the lines are enabled the expected output should appear:

Uptime:   2 s, requests:   0, Free heap: 240284
Uptime:   4 s, requests:   0, Free heap: 240292
Uptime:   6 s, requests:   0, Free heap: 240284
Uptime:   8 s, requests:   0, Free heap: 240292
Uptime:  10 s, requests:   0, Free heap: 240284
Uptime:  12 s, requests:   0, Free heap: 240292
Uptime:  14 s, requests:   0, Free heap: 240292
Uptime:  16 s, requests:   0, Free heap: 240292
Uptime:  18 s, requests:   0, Free heap: 240292
...

Do you use the correct board setting and does a “Hello World” or “blink” sketch work?

Switching to platform-expressif32 fixed it!
platform = https://github.com/pioarduino/platform-espressif32/releases/download/stable/platform-espressif32.zip