Giter Site home page Giter Site logo

yubox-node-org / espasyncwebserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from me-no-dev/espasyncwebserver

22.0 22.0 16.0 3.05 MB

Async Web Server for ESP8266 and ESP32

C++ 76.42% C 11.86% HTML 10.01% Makefile 0.03% CMake 0.11% Batchfile 1.56%

espasyncwebserver's People

Contributors

adam5wu avatar andig avatar anisimovsergey avatar atanisoft avatar avillacis avatar baggior avatar blackhack avatar bmooij avatar buddydvd avatar dmytrokorniienko avatar everslick avatar gitter-badger avatar hagai-shatz avatar hallard avatar herm avatar ivankravets avatar lorol avatar matt123p avatar me-no-dev avatar me21 avatar merlinschumacher avatar nut-code-monkey avatar omersiar avatar probonopd avatar robert-alfaro avatar sharksharp avatar sticilface avatar tripplet avatar trygvis avatar tuanpmt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

espasyncwebserver's Issues

Always restarts on page refresh with the same exception. Even with new sketch. ( _sockIsReadable() )

Hi! If i refresh a page more then twice which includes three minified and gzipped files ( max 5kb each ! ) my esp always restarts with always the same exception:

Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC      : 0x400d7579  PS      : 0x00060c30  A0      : 0x800e89b0  A1 
     : 0x3ffe8100
A2      : 0x00000000  A3      : 0x3ffc9b3c  A4      : 0x3ffe36e4  A5 
     : 0x025b69d9
A6      : 0x0000000d  A7      : 0x00000000  A8      : 0x800d7576  A9 
     : 0x3ffe80e0
A10     : 0x3ffe8134  A11     : 0x3f400c5a  A12     : 0x025b69d9  A13     : 0x3ffc9b3c
A14     : 0x00000000  A15     : 0x3ffe814c  SAR     : 0x00000004  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffa

ELF file SHA256: 0000000000000000

Backtrace: 0x400d7579:0x3ffe8100 0x400e89ad:0x3ffe8180 0x400e5f0d:0x3ffe81d0 0x400e5fd9:0x3ffe8210 0x400e6241:0x3ffe8250 0x4016ae62:0x3ffe8270 0x4016a9b2:0x3ffe82a0 0x4008a32e:0x3ffe82f0
  #0  0x400d7579:0x3ffe8100 in std::_Function_handler<void (AsyncWebServerRequest*), sSystem::adminEndpoints()::{lambda(AsyncWebServerRequest*)#3}>::_M_invoke(std::_Any_data const&, AsyncWebServerRequest*&&) at lib\ArduinoJson-6.x\src/ArduinoJson/Numbers/parseNumber.hpp:144  
      (inlined by) _M_invoke at c:\users\pc\.platformio\packages\toolchain-xtensa32@2.50200.97\xtensa-esp32-elf\include\c++\5.2.0/functional:1871
  #1  0x400e89ad:0x3ffe8180 in std::function<void (AsyncWebServerRequest*)>::operator()(AsyncWebServerRequest*) const at lib\ESPAsyncWebServer-yuboxfixes-0xFEEDC0DE64-cleanup\src/WebServer.cpp:197
      (inlined by) AsyncCallbackWebHandler::handleRequest(AsyncWebServerRequest*) at lib\ESPAsyncWebServer-yuboxfixes-0xFEEDC0DE64-cleanup\src/WebHandlerImpl.h:132
  #2  0x400e5f0d:0x3ffe81d0 in AsyncWebServerRequest::_parseLine() at lib\ESPAsyncWebServer-yuboxfixes-0xFEEDC0DE64-cleanup\src/WebRequest.cpp:814
  #3  0x400e5fd9:0x3ffe8210 in AsyncWebServerRequest::_onData(void*, 
unsigned int) at lib\ESPAsyncWebServer-yuboxfixes-0xFEEDC0DE64-cleanup\src/WebRequest.cpp:814
  #4  0x400e6241:0x3ffe8250 in std::_Function_handler<void (void*, AsyncClient*, void*, unsigned int), AsyncWebServerRequest::AsyncWebServerRequest(AsyncWebServer*, AsyncClient*)::{lambda(void*, AsyncClient*, void*, unsigned int)#6}>::_M_invoke(std::_Any_data const&, void*&&, AsyncClient*&&, std::_Any_data const&, unsigned int&&) at lib\ESPAsyncWebServer-yuboxfixes-0xFEEDC0DE64-cleanup\src/WebRequest.cpp:814   
      (inlined by) _M_invoke at c:\users\pc\.platformio\packages\toolchain-xtensa32@2.50200.97\xtensa-esp32-elf\include\c++\5.2.0/functional:1871
  #5  0x4016ae62:0x3ffe8270 in std::function<void (void*, AsyncClient*, void*, unsigned int)>::operator()(void*, AsyncClient*, void*, unsigned int) const at lib\AsyncTCPSock\src/AsyncTCP.cpp:360
      (inlined by) AsyncClient::_sockIsReadable() at lib\AsyncTCPSock\src/AsyncTCP.cpp:885
  #6  0x4016a9b2:0x3ffe82a0 in _asynctcpsock_task(void*) at lib\AsyncTCPSock\src/AsyncTCP.cpp:360
  #7  0x4008a32e:0x3ffe82f0 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Rebooting...

For example this is the endpoint handler for a particular page:

// hsh_Server.adminIsIn is just a flag.
// hsh_Server.adminLastExtendTime is a long

server.on("/admin", HTTP_GET, [](AsyncWebServerRequest *request){
    if( !request->authenticate("admin", "admin") ){
        return request->requestAuthentication();
    }
    if( hsh_Server.adminIsIn && millis() - hsh_Server.adminLastExtendTime < 2000 ){
        request->send(200, "text/html",
            "<head><meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' />\
            <meta name='viewport' content='width=device-width'/></head>\
            <style>body{margin: 0px;padding: 0px;width: 100%;}\
                html {-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;}\
            </style>\
            <div style='width:100%;height:100%;display:flex;justify-content:center;align-items:center;font-weight:bold;'>\
                <h1 style='text-align: center;'>An admin is already logged in.</h1>\
            </div>");
    }else{
        String path = hsh_fileSystem.correctPath("/admin/bundles/zipped/admin.html");
        AsyncWebServerResponse *response = request->beginResponse(LITTLEFS, path, getMimeType(path));
        response->addHeader("Server","HsH Server");
        response->addHeader("Content-Encoding","gzip");
        request->send(response);
    }
});

With two files which minified and gzipped. ( max 5kb each )

server.on("/adminStyle.bundle.css", HTTP_GET, [](AsyncWebServerRequest *request){
    String path = hsh_fileSystem.correctPath("/admin/bundles/zipped/adminStyle.bundle.css");
    AsyncWebServerResponse *response = request->beginResponse(LITTLEFS, path, getMimeType(path));
    response->addHeader("Server","HsH Server");
    response->addHeader("Content-Encoding","gzip");
    request->send(response);
});

server.on("/adminScript.bundle.js", HTTP_GET, [](AsyncWebServerRequest *request){
    String path = hsh_fileSystem.correctPath("/admin/bundles/zipped/adminScript.bundle.js");
    AsyncWebServerResponse *response = request->beginResponse(LITTLEFS, path, getMimeType(path));
    response->addHeader("Server","HsH Server");
    response->addHeader("Content-Encoding","gzip");
    request->send(response);
});

There is nothing more to it except the Websocket connection which will happen almost immidiately after page load.
But the crash is not on the websocket open callback but right on the endpoint handler.

Only two or three refresh what it needs to reboot the esp with this exception code.

Can you help?

How to install this library in PIO

I have been using this library without issue in Arduino framework (esp32) however until now it seemed impossible to get this library for PIO.
It seems that the library has installed but I am issues with the compiler. I will attach a screen shot,that I hope helps.
compiler error..pdf
I hope this makes sense to some one. Many thanks,
Mal

ESP8266 webserver and websocket server same port.

hi youbox,

im was using the original espasyncwebserver, but had the same issue (but different exception). my problem is, that im running a webserver and websocketserver at the same time. without the webserver, all seems to work fine. but when im having handler attached (only 1) and i am firing websocket commands (abt 100ms time between), than after some time, its crashing.

Exception (9):
epc1=0x402047fc epc2=0x00000000 epc3=0x00000000 excvaddr=0x6c6d782e depc=0x00000000

Exception 9: LoadStoreAlignmentCause: Load or store to an unaligned address
PC: 0x402047fc
EXCVADDR: 0x6c6d782e

Decoding stack results
0x40249961: ip4_input at core/ipv4/ip4.c line 901
0x402147c6: __frame_state_for at /workdir/repo/gcc-gnu/libgcc/unwind-dw2.c line 1374
0x402149e4: _Unwind_Resume at /workdir/repo/gcc-gnu/libgcc/unwind.inc line 247
0x40248a55: igmp_start at core/ipv4/igmp.c line 134
0x40248850: ip4addr_aton at core/ipv4/ip4_addr.c line 243
0x40243aa4: tcp_kill_state at core/tcp.c line 1768
0x40228754: std::__cxx11::money_put > >::_M_insert (std::ostreambuf_iterator >, std::ios_base&, char, std::__cxx11::basic_string , std::allocator > const&) const at /workdir/arena.x86_64/gcc-gnu/xtensa-lx106-elf/libstdc++-v3/include/bits/char_traits.h line 329
0x40216100: _printf_float at /workdir/repo/newlib/newlib/libc/stdio/nano-vfprintf_float.c line 330

Can you help me somehow? maybe u need some code? im really clueless, why and whats going on :(
tnx. mike.

Error connecting

I think I am using the wrong version?
platformio.ini

[env:esp32dev]
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
board = esp32dev
framework = arduino
platform_packages = 
	platformio/framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32.git#2.0.2
lib_ldf_mode = deep
lib_deps = 
	https://github.com/yubox-node-org/ESPAsyncWebServer.git#master
	https://github.com/yubox-node-org/AsyncTCPSock.git
	thebigpotatoe/Effortless-SPIFFS@^2.3.0
	bblanchon/ArduinoJson@^6.19.1
upload_protocol = espota
upload_port = 192.168.0.203
monitor_speed = 115200
build_flags = 
	-DBOARD_HAS_PSRAM
	-mfix-esp32-psram-cache-issue

> Executing task: platformio run <

Processing esp32dev (platform: https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream; board: esp32dev; framework: arduino)
-------------------------------------------------------------------------------------------------------------------------------
* Adding toolchain toolchain-riscv32-esp with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32 with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32s2 with version 8.4.0+2021r2
Verbose mode can be enabled via `-v, --verbose` option
* Adding toolchain toolchain-riscv32-esp with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32 with version 8.4.0+2021r2
* Adding toolchain toolchain-xtensa-esp32s2 with version 8.4.0+2021r2
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (3.3.1+sha.3784198) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES: 
 - framework-arduinoespressif32 0.0.0+sha.caef400 
 - tool-esptoolpy 1.30100.210531 (3.1.0) 
 - tool-openocd-esp32 2.1000.20210721 (10.0) 
 - toolchain-xtensa-esp32 8.4.0+2021r2
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ deep, Compatibility ~ soft
Found 38 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ESP Async WebServer> 1.2.3+sha.67ae103
|   |-- <AsyncTCP> 1.1.1
|   |-- <ArduinoJson> 6.19.2
|   |-- <FS> 2.0.0
|   |-- <WiFi> 2.0.0
|-- <AsyncTCPSock> 0.0.1+sha.350501e
|   |-- <WiFiClientSecure> 2.0.0
|   |   |-- <WiFi> 2.0.0
|-- <Effortless-SPIFFS> 2.3.0
|   |-- <FS> 2.0.0
|   |-- <SPIFFS> 2.0.0
|   |   |-- <FS> 2.0.0
|   |-- <LittleFS> 2.0.0
|   |   |-- <FS> 2.0.0
|-- <ArduinoJson> 6.19.2
|-- <ArduinoOTA> 2.0.0
|   |-- <ESPmDNS> 2.0.0
|   |   |-- <WiFi> 2.0.0
|   |-- <Update> 2.0.0
|   |-- <WiFi> 2.0.0
|-- <AsyncTCP> 1.1.1
|-- <ESPmDNS> 2.0.0
|   |-- <WiFi> 2.0.0
|-- <FS> 2.0.0
|-- <SPI> 2.0.0
|-- <SPIFFS> 2.0.0
|   |-- <FS> 2.0.0
|-- <Ticker> 2.0.0
|-- <WiFi> 2.0.0
Building in release mode
Compiling .pio/build/esp32dev/src/main.cpp.o
Generating partitions .pio/build/esp32dev/partitions.bin
Compiling .pio/build/esp32dev/lib047/AsyncTCP/AsyncTCP.cpp.o
Compiling .pio/build/esp32dev/lib258/FS/FS.cpp.o
Compiling .pio/build/esp32dev/lib258/FS/vfs_api.cpp.o
Compiling .pio/build/esp32dev/lib63e/WiFi/WiFi.cpp.o
Compiling .pio/build/esp32dev/lib63e/WiFi/WiFiAP.cpp.o
Compiling .pio/build/esp32dev/lib63e/WiFi/WiFiClient.cpp.o
Compiling .pio/build/esp32dev/lib63e/WiFi/WiFiGeneric.cpp.o
Compiling .pio/build/esp32dev/lib63e/WiFi/WiFiMulti.cpp.o
Compiling .pio/build/esp32dev/lib63e/WiFi/WiFiSTA.cpp.o
Compiling .pio/build/esp32dev/lib63e/WiFi/WiFiScan.cpp.o
Compiling .pio/build/esp32dev/lib63e/WiFi/WiFiServer.cpp.o
Compiling .pio/build/esp32dev/lib63e/WiFi/WiFiUdp.cpp.o
Compiling .pio/build/esp32dev/lib6e0/ESP Async WebServer/AsyncEventSource.cpp.o
Compiling .pio/build/esp32dev/lib6e0/ESP Async WebServer/AsyncWebSocket.cpp.o
Compiling .pio/build/esp32dev/lib6e0/ESP Async WebServer/SPIFFSEditor.cpp.o
Compiling .pio/build/esp32dev/lib6e0/ESP Async WebServer/WebAuthentication.cpp.o
Archiving .pio/build/esp32dev/lib047/libAsyncTCP.a
Indexing .pio/build/esp32dev/lib047/libAsyncTCP.a
Compiling .pio/build/esp32dev/lib6e0/ESP Async WebServer/WebHandlers.cpp.o
Archiving .pio/build/esp32dev/lib258/libFS.a
Indexing .pio/build/esp32dev/lib258/libFS.a
Compiling .pio/build/esp32dev/lib6e0/ESP Async WebServer/WebRequest.cpp.o
Compiling .pio/build/esp32dev/lib6e0/ESP Async WebServer/WebResponses.cpp.o
Compiling .pio/build/esp32dev/lib6e0/ESP Async WebServer/WebServer.cpp.o
Compiling .pio/build/esp32dev/lib09c/WiFiClientSecure/WiFiClientSecure.cpp.o
Compiling .pio/build/esp32dev/lib09c/WiFiClientSecure/ssl_client.cpp.o
Compiling .pio/build/esp32dev/libc42/AsyncTCPSock/AsyncTCP.cpp.o
Compiling .pio/build/esp32dev/libc42/AsyncTCPSock/AsyncTCP_TLS_Context.cpp.o
Compiling .pio/build/esp32dev/lib23b/SPIFFS/SPIFFS.cpp.o
Compiling .pio/build/esp32dev/libab7/LittleFS/LittleFS.cpp.o
Compiling .pio/build/esp32dev/lib6ca/ESPmDNS/ESPmDNS.cpp.o
Archiving .pio/build/esp32dev/lib09c/libWiFiClientSecure.a
Archiving .pio/build/esp32dev/lib63e/libWiFi.a
Indexing .pio/build/esp32dev/lib09c/libWiFiClientSecure.a
Indexing .pio/build/esp32dev/lib63e/libWiFi.a
Compiling .pio/build/esp32dev/libf41/Update/HttpsOTAUpdate.cpp.o
Compiling .pio/build/esp32dev/libf41/Update/Updater.cpp.o
Compiling .pio/build/esp32dev/lib422/ArduinoOTA/ArduinoOTA.cpp.o
Compiling .pio/build/esp32dev/lib0e8/SPI/SPI.cpp.o
Compiling .pio/build/esp32dev/lib0bc/Ticker/Ticker.cpp.o
Archiving .pio/build/esp32dev/libFrameworkArduinoVariant.a
Indexing .pio/build/esp32dev/libFrameworkArduinoVariant.a
Compiling .pio/build/esp32dev/FrameworkArduino/Esp.cpp.o
Archiving .pio/build/esp32dev/lib6ca/libESPmDNS.a
Archiving .pio/build/esp32dev/lib0e8/libSPI.a
Archiving .pio/build/esp32dev/lib0bc/libTicker.a
Archiving .pio/build/esp32dev/lib6e0/libESP Async WebServer.a
Indexing .pio/build/esp32dev/lib6ca/libESPmDNS.a
Indexing .pio/build/esp32dev/lib0e8/libSPI.a
Indexing .pio/build/esp32dev/lib0bc/libTicker.a
Archiving .pio/build/esp32dev/libab7/libLittleFS.a
Archiving .pio/build/esp32dev/lib23b/libSPIFFS.a
Indexing .pio/build/esp32dev/libab7/libLittleFS.a
Indexing .pio/build/esp32dev/lib23b/libSPIFFS.a
Indexing .pio/build/esp32dev/lib6e0/libESP Async WebServer.a
Compiling .pio/build/esp32dev/FrameworkArduino/FirmwareMSC.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/FunctionalInterrupt.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/HWCDC.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/HardwareSerial.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/IPAddress.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/IPv6Address.cpp.o
Archiving .pio/build/esp32dev/libc42/libAsyncTCPSock.a
Compiling .pio/build/esp32dev/FrameworkArduino/MD5Builder.cpp.o
Indexing .pio/build/esp32dev/libc42/libAsyncTCPSock.a
Compiling .pio/build/esp32dev/FrameworkArduino/Print.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/Stream.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/StreamString.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/USB.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/USBCDC.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/USBMSC.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/WMath.cpp.o
Archiving .pio/build/esp32dev/libf41/libUpdate.a
Compiling .pio/build/esp32dev/FrameworkArduino/WString.cpp.o
Indexing .pio/build/esp32dev/libf41/libUpdate.a
Compiling .pio/build/esp32dev/FrameworkArduino/base64.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/cbuf.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-adc.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-bt.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-cpu.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-dac.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-gpio.c.o
Archiving .pio/build/esp32dev/lib422/libArduinoOTA.a
Indexing .pio/build/esp32dev/lib422/libArduinoOTA.a
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-i2c-slave.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-i2c.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-ledc.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-matrix.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-misc.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-psram.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-rmt.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-sigmadelta.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-spi.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-time.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-timer.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-tinyusb.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-touch.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/esp32-hal-uart.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/firmware_msc_fat.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/libb64/cdecode.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/libb64/cencode.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/main.cpp.o
Compiling .pio/build/esp32dev/FrameworkArduino/stdlib_noniso.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/wiring_pulse.c.o
Compiling .pio/build/esp32dev/FrameworkArduino/wiring_shift.c.o
Archiving .pio/build/esp32dev/libFrameworkArduino.a
Indexing .pio/build/esp32dev/libFrameworkArduino.a
Linking .pio/build/esp32dev/firmware.elf
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::connect(IPAddress, unsigned short)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:683: multiple definition of `AsyncClient::connect(IPAddress, unsigned short)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:489: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::connect(char const*, unsigned short)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:713: multiple definition of `AsyncClient::connect(char const*, unsigned short)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:551: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::abort()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:740: multiple definition of `AsyncClient::abort()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1111: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::space()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:748: multiple definition of `AsyncClient::space()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1003: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::add(char const*, unsigned int, unsigned char)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:755: multiple definition of `AsyncClient::add(char const*, unsigned int, unsigned char)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1009: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::send()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:772: multiple definition of `AsyncClient::send()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1045: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::free()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:982: multiple definition of `AsyncClient::free()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1086: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::write(char const*, unsigned int, unsigned char)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:999: multiple definition of `AsyncClient::write(char const*, unsigned int, unsigned char)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1098: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::write(char const*)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:992: multiple definition of `AsyncClient::write(char const*)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1091: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::setRxTimeout(unsigned int)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1007: multiple definition of `AsyncClient::setRxTimeout(unsigned int)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:324: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::getRxTimeout()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1011: multiple definition of `AsyncClient::getRxTimeout()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:328: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::getAckTimeout()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1015: multiple definition of `AsyncClient::getAckTimeout()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:332: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::setAckTimeout(unsigned int)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1019: multiple definition of `AsyncClient::setAckTimeout(unsigned int)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:336: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::setNoDelay(bool)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1023: multiple definition of `AsyncClient::setNoDelay(bool)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:340: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::getNoDelay()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1034: multiple definition of `AsyncClient::getNoDelay()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:350: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::getRemoteAddress()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1048: multiple definition of `AsyncClient::getRemoteAddress()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:415: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::getRemotePort()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1055: multiple definition of `AsyncClient::getRemotePort()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:428: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::getLocalAddress()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1062: multiple definition of `AsyncClient::getLocalAddress()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:441: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::getLocalPort()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1069: multiple definition of `AsyncClient::getLocalPort()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:454: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::remoteIP()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1076: multiple definition of `AsyncClient::remoteIP()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:467: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::remotePort()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1080: multiple definition of `AsyncClient::remotePort()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:471: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::localIP()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1084: multiple definition of `AsyncClient::localIP()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:475: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::localPort()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1088: multiple definition of `AsyncClient::localPort()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:479: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::connected()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1099: multiple definition of `AsyncClient::connected()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:401: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::freeable()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1127: multiple definition of `AsyncClient::freeable()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):AsyncTCP.cpp:(.text._ZN11AsyncClient8freeableEv+0x0): first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::errorToString(signed char)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1138: multiple definition of `AsyncClient::errorToString(signed char)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1146: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncServer::AsyncServer(IPAddress, unsigned short)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1218: multiple definition of `AsyncServer::AsyncServer(IPAddress, unsigned short)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1193: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncServer::AsyncServer(IPAddress, unsigned short)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1218: multiple definition of `AsyncServer::AsyncServer(IPAddress, unsigned short)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1193: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncServer::AsyncServer(unsigned short)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1227: multiple definition of `AsyncServer::AsyncServer(unsigned short)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1201: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncServer::AsyncServer(unsigned short)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1227: multiple definition of `AsyncServer::AsyncServer(unsigned short)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1201: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncServer::begin()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1245: multiple definition of `AsyncServer::begin()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1219: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncServer::end()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1282: multiple definition of `AsyncServer::end()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1255: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncServer::~AsyncServer()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1236: multiple definition of `AsyncServer::~AsyncServer()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1209: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncServer::~AsyncServer()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1236: multiple definition of `AsyncServer::~AsyncServer()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1209: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::_close()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:805: multiple definition of `AsyncClient::_close()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:965: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::~AsyncClient()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:588: multiple definition of `AsyncClient::~AsyncClient()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:314: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::~AsyncClient()':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:588: multiple definition of `AsyncClient::~AsyncClient()'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:314: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::close(bool)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:733: multiple definition of `AsyncClient::close(bool)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1107: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::_error(signed char)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:847: multiple definition of `AsyncClient::_error(signed char)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:984: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::onConnect(std::function<void (void*, AsyncClient*)>, void*)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:639: multiple definition of `AsyncClient::onConnect(std::function<void (void*, AsyncClient*)>, void*)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:366: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::onDisconnect(std::function<void (void*, AsyncClient*)>, void*)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:644: multiple definition of `AsyncClient::onDisconnect(std::function<void (void*, AsyncClient*)>, void*)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:371: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::onPoll(std::function<void (void*, AsyncClient*)>, void*)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:674: multiple definition of `AsyncClient::onPoll(std::function<void (void*, AsyncClient*)>, void*)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:396: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncServer::onClient(std::function<void (void*, AsyncClient*)>, void*)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:1240: multiple definition of `AsyncServer::onClient(std::function<void (void*, AsyncClient*)>, void*)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:1213: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::onAck(std::function<void (void*, AsyncClient*, unsigned int, unsigned int)>, void*)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:649: multiple definition of `AsyncClient::onAck(std::function<void (void*, AsyncClient*, unsigned int, unsigned int)>, void*)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:376: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::onError(std::function<void (void*, AsyncClient*, signed char)>, void*)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:654: multiple definition of `AsyncClient::onError(std::function<void (void*, AsyncClient*, signed char)>, void*)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:381: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::onData(std::function<void (void*, AsyncClient*, void*, unsigned int)>, void*)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:659: multiple definition of `AsyncClient::onData(std::function<void (void*, AsyncClient*, void*, unsigned int)>, void*)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:386: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/lib047/libAsyncTCP.a(AsyncTCP.cpp.o): in function `AsyncClient::onTimeout(std::function<void (void*, AsyncClient*, unsigned int)>, void*)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCP/src/AsyncTCP.cpp:669: multiple definition of `AsyncClient::onTimeout(std::function<void (void*, AsyncClient*, unsigned int)>, void*)'; .pio/build/esp32dev/libc42/libAsyncTCPSock.a(AsyncTCP.cpp.o):/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/AsyncTCPSock/src/AsyncTCP.cpp:391: first defined here
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/libbaa/libESP Async [email protected](AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x10): undefined reference to `SHA1Init'
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/libbaa/libESP Async [email protected](AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x14): undefined reference to `SHA1Update'
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/libbaa/libESP Async [email protected](AsyncWebSocket.cpp.o):(.literal._ZN22AsyncWebSocketResponseC2ERK6StringP14AsyncWebSocket+0x18): undefined reference to `SHA1Final'
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/libbaa/libESP Async [email protected](AsyncWebSocket.cpp.o): in function `AsyncWebSocketResponse::AsyncWebSocketResponse(String const&, AsyncWebSocket*)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/ESP Async WebServer@src-cd24fc77c1aa39c45262de9a2fb1e9b6/src/AsyncWebSocket.cpp:1272: undefined reference to `SHA1Init'
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/ESP Async WebServer@src-cd24fc77c1aa39c45262de9a2fb1e9b6/src/AsyncWebSocket.cpp:1273: undefined reference to `SHA1Update'
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/ESP Async WebServer@src-cd24fc77c1aa39c45262de9a2fb1e9b6/src/AsyncWebSocket.cpp:1274: undefined reference to `SHA1Final'
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/libbaa/libESP Async [email protected](WebAuthentication.cpp.o):(.literal._ZL6getMD5PhtPc+0x4): undefined reference to `mbedtls_md5_starts'
/home/lei/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pio/build/esp32dev/libbaa/libESP Async [email protected](WebAuthentication.cpp.o): in function `getMD5(unsigned char*, unsigned short, char*)':
/home/lei/PlatformIO/re_tai/.pio/libdeps/esp32dev/ESP Async WebServer@src-cd24fc77c1aa39c45262de9a2fb1e9b6/src/WebAuthentication.cpp:73: undefined reference to `mbedtls_md5_starts'
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32dev/firmware.elf] Error 1

Unable to build fixes branch due to usage of incomplete type

In AsyncWebSocket.h there is a forward declaration of AsyncWebSocketControl. Later in the header this declaration is referenced in defining AsyncWebSocketClient:

    class AsyncWebSocketControl; //Defined in AsyncWebSocket.cpp

    ...


    class AsyncWebSocketClient{
        std::deque<AsyncWebSocketControl> _controlQueue; 
        ...
    }

However, as far as I can tell std::deque requires a complete type definition, leading to this error:

error: invalid use of incomplete type 'std::deque<AsyncWebSocketControl>

I know C++17 allows certain containers to use incomplete types in declarations, but as far as I could find, std::deque is not one of them, I believe this branch is trying to limit itself to C++11 features

Has anyone else ran into this? A quick fix is to move the full declaration of AsyncWebSocketControl to the header file, but there are many commits after the commit that introduced the usage std::deque, some I'm wondering if it could be something with my environment or imports

Full logs, but it's mostly repeating the same error

Error while running

Hi, this fork works better than the original library but im getting this error while runing, somethings when a device connects or reloads a page.

[E][AsyncTCP.cpp:797] _flushWriteQueue(): socket 63 lwip_write() failed errno=104
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:1442 (xQueueGenericReceive)- assert failed!
abort() was called at PC 0x4008a605 on core 0

ELF file SHA256: 0000000000000000

Backtrace: 0x4008964c:0x3ffdf610 0x400898c9:0x3ffdf630 0x4008a605:0x3ffdf650 0x4017b638:0x3ffdf690 0x4017b782:0x3ffdf6b0 0x4017b81d:0x3ffdf6e0 0x4017c1f1:0x3ffdf710 0x4017b331:0x3ffdf770 0x4008a8da:0x3ffdf7c0
  #0  0x4008964c:0x3ffdf610 in invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #1  0x400898c9:0x3ffdf630 in abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:715
  #2  0x4008a605:0x3ffdf650 in xQueueGenericReceive at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/queue.c:2038
  #3  0x4017b638:0x3ffdf690 in AsyncClient::_clearWriteQueue() at .pio\libdeps\esp32dev\AsyncTCPSock\src/AsyncTCP.cpp:360
  #4  0x4017b782:0x3ffdf6b0 in AsyncClient::_error(signed char) at .pio\libdeps\esp32dev\AsyncTCPSock\src/AsyncTCP.cpp:360
  #5  0x4017b81d:0x3ffdf6e0 in AsyncClient::_notifyWrittenBuffers(std::deque<AsyncClient::notify_writebuf, std::allocator<AsyncClient::notify_writebuf> >&, int) at .pio\libdeps\esp32dev\AsyncTCPSock\src/AsyncTCP.cpp:360
  #6  0x4017c1f1:0x3ffdf710 in AsyncClient::_sockIsWriteable() at .pio\libdeps\esp32dev\AsyncTCPSock\src/AsyncTCP.cpp:360
  #7  0x4017b331:0x3ffdf770 in _asynctcpsock_task(void*) at .pio\libdeps\esp32dev\AsyncTCPSock\src/AsyncTCP.cpp:360
  #8  0x4008a8da:0x3ffdf7c0 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Rebooting...

Error on page request with captive portal

If the ESP is in STA mode, everything works fine. If i use it with it's AP mode and captive request handler it crashes sometimes on page load.

Here is the decoded trace:

CORRUPT HEAP: Bad head at 0x3ffd89f8. Expected 0xabba1234 got 0x00000000

assert failed: multi_heap_free multi_heap_poisoning.c:253 (head != NULL)


Backtrace:0x40083cbd:0x3ffd81100x4008ece5:0x3ffd8130 0x400944d9:0x3ffd8150 0x4009411f:0x3ffd8280 0x40084151:0x3ffd82a0 0x40094509:0x3ffd82c0 0x4010d9a5:0x3ffd82e0 0x4010d9b5:0x3ffd8300 0x40101ecb:0x3ffd8320 0x40101ef1:0x3ffd8340 0x401014f2:0x3ffd8360 0x4010388d:0x3ffd8380 0x400fea63:0x3ffd83a0 0x400fea71:0x3ffd83c0 0x4019e691:0x3ffd83e0 0x4019e99e:0x3ffd8410 0x4019e9b4:0x3ffd8430 0x4019ead6:0x3ffd8450

  #0  0x40083cbd:0x3ffd8110 in panic_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/panic.c:402
  #1  0x4008ece5:0x3ffd8130 in esp_system_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_system/esp_system.c:128
  #2  0x400944d9:0x3ffd8150 in __assert_func at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/assert.c:85
  #3  0x4009411f:0x3ffd8280 in multi_heap_free at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:253
      (inlined by) multi_heap_free at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/multi_heap_poisoning.c:245
  #4  0x40084151:0x3ffd82a0 in heap_caps_free at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c:340
  #5  0x40094509:0x3ffd82c0 in free at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/newlib/heap.c:39
  #6  0x4010d9a5:0x3ffd82e0 in String::invalidate() at C:/Users/Pc/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.cpp:175
  #7  0x4010d9b5:0x3ffd8300 in String::~String() at C:/Users/Pc/.platformio/packages/framework-arduinoespressif32/cores/esp32/WString.cpp:159
  #8  0x40101ecb:0x3ffd8320 in AsyncFileResponse::~AsyncFileResponse() at lib/ESPAsyncWebServer-yuboxfixes-0xFEEDC0DE64-cleanup/src/WebResponses.cpp:481
  #9  0x40101ef1:0x3ffd8340 in AsyncFileResponse::~AsyncFileResponse() at lib/ESPAsyncWebServer-yuboxfixes-0xFEEDC0DE64-cleanup/src/WebResponses.cpp:484
  #10 0x401014f2:0x3ffd8360 in AsyncWebServerRequest::~AsyncWebServerRequest() at lib/ESPAsyncWebServer-yuboxfixes-0xFEEDC0DE64-cleanup/src/WebRequest.cpp:85 (discriminator 1)
  #11 0x4010388d:0x3ffd8380 in AsyncWebServer::_handleDisconnect(AsyncWebServerRequest*) at lib/ESPAsyncWebServer-yuboxfixes-0xFEEDC0DE64-cleanup/src/WebServer.cpp:107 (discriminator 1)
  #12 0x400fea63:0x3ffd83a0 in AsyncWebServerRequest::_onDisconnect() at lib/ESPAsyncWebServer-yuboxfixes-0xFEEDC0DE64-cleanup/src/WebRequest.cpp:248
  #13 0x400fea71:0x3ffd83c0 in std::_Function_handler<void (void*, AsyncClient*), AsyncWebServerRequest::AsyncWebServerRequest(AsyncWebServer*, AsyncClient*)::{lambda(void*, AsyncClient*)#4}>::_M_invoke(std::_Any_data 
const&, void*&&, AsyncClient*&&) at lib/ESPAsyncWebServer-yuboxfixes-0xFEEDC0DE64-cleanup/src/WebRequest.cpp:70
      (inlined by) _M_invoke at c:\users\pc\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:297
  #14 0x4019e691:0x3ffd83e0 in std::function<void (void*, AsyncClient*)>::operator()(void*, AsyncClient*) const at c:\users\pc\.platformio\packages\toolchain-xtensa-esp32\xtensa-esp32-elf\include\c++\8.4.0\bits/std_function.h:687
  #15 0x4019e99e:0x3ffd8410 in AsyncClient::_fin(tcp_pcb*, signed char) at lib/AsyncTCP-master/src/AsyncTCP.cpp:908
      (inlined by) AsyncClient::_fin(tcp_pcb*, signed char) at lib/AsyncTCP-master/src/AsyncTCP.cpp:905      
  #16 0x4019e9b4:0x3ffd8430 in AsyncClient::_s_fin(void*, tcp_pcb*, signed char) at lib/AsyncTCP-master/src/AsyncTCP.cpp:1215
  #17 0x4019ead6:0x3ffd8450 in _async_service_task(void*) at lib/AsyncTCP-master/src/AsyncTCP.cpp:166        
      (inlined by) _async_service_task at lib/AsyncTCP-master/src/AsyncTCP.cpp:198




ELF file SHA256: 0000000000000000

Here is the request handler

class CaptiveRequestHandler : public AsyncWebHandler {
    bootHandler *handler;
    public:
        CaptiveRequestHandler() {
            captiveSerer.serveStatic("/", LittleFS, ASSETS_PATH).setCacheControl(MAX_CACHE_CONTROL_TIME);
            
            captiveSerer.on("/welcome.bundle.css", HTTP_GET, [this](AsyncWebServerRequest *request) {
                String path = fileSys.correctPath(WELCOME_PAGE_CSS_PATH);
                AsyncWebServerResponse *response = request->beginResponse(LittleFS, path, getMimeType(path));
                response->addHeader("Server", "HsH Server");
                if( path.indexOf("zipped") > 0 ){
                    response->addHeader("Content-Encoding", "gzip");
                }
                request->send(response);
            });

            captiveSerer.on("/welcome.bundle.js", HTTP_GET, [this](AsyncWebServerRequest *request) {
                String path = fileSys.correctPath(WELCOME_PAGE_JS_PATH);
                AsyncWebServerResponse *response = request->beginResponse(LittleFS, path, getMimeType(path));
                response->addHeader("Server", "HsH Server");
                if( path.indexOf("zipped") > 0 ){
                    response->addHeader("Content-Encoding", "gzip");
                }
                request->send(response);
            });

            captiveSerer.on("/summaryEnd", HTTP_POST, [this](AsyncWebServerRequest *request) {
                AsyncWebParameter* p = request->getParam(0);
                handler->handleConfig( p->value() );
                request->send(200, "text/plain", "OK");
            });
        
            /* NOT FOUND HANDLERS */
            captiveSerer.on("/notFound.css", HTTP_GET, [this](AsyncWebServerRequest *request) {
                String path = fileSys.correctPath(NOT_FOUND_STYLE_PATH);
                AsyncWebServerResponse *response = request->beginResponse(LittleFS, path, getMimeType(path));
                response->addHeader("Server", "HsH Server");
                if( path.indexOf("zipped") > 0 ){
                    response->addHeader("Content-Encoding", "gzip");
                }
                request->send(response);
            });

            captiveSerer.on("/notFound.js", HTTP_GET, [this](AsyncWebServerRequest *request) {
                String path = fileSys.correctPath(NOT_FOUND_SCRIPT_PATH);
                AsyncWebServerResponse *response = request->beginResponse(LittleFS, path, getMimeType(path));
                response->addHeader("Server", "HsH Server");
                if( path.indexOf("zipped") > 0 ){
                    response->addHeader("Content-Encoding", "gzip");
                }
                request->send(response);
            });

            captiveSerer.onNotFound([this](AsyncWebServerRequest *request) {
                String path = fileSys.correctPath(NOT_FOUND_PATH);
                AsyncWebServerResponse *response = request->beginResponse(LittleFS, path, getMimeType(path));
                response->addHeader("Server", "HsH Server");
                if( path.indexOf("zipped") > 0 ){
                    response->addHeader("Content-Encoding", "gzip");
                }
                request->send(response);
            });
        }

        virtual ~CaptiveRequestHandler() {}

        bool canHandle(AsyncWebServerRequest *request){
            //request->addInterestingHeader("ANY");
            return true;
        }

        void handleRequest(AsyncWebServerRequest *request) {
            String path = fileSys.correctPath(WELCOME_PAGE_PATH);
            AsyncWebServerResponse *response = request->beginResponse(LittleFS, path, "text/html");
            response->addHeader("Server", "HsH Setup");
            if( path.indexOf("zipped") > 0 ){
                response->addHeader("Content-Encoding", "gzip");
            }
            request->send(response);
        }
};

Here is how it is inited:

void bootHandler::initAP(){
    WiFi.softAPConfig(apIP, apIP, netMsk);
    WiFi.softAP(firstBootAP_NAME);
    dnsServer.start(53, "*", WiFi.softAPIP());
    IPAddress myIP = WiFi.softAPIP();
    Serial.print("AP IP address: ");
    Serial.println(myIP);
}

void bootHandler::initServer(){
    captiveSerer.addHandler(new CaptiveRequestHandler()).setFilter(ON_AP_FILTER);
    captiveSerer.begin();
}

void bootHandler::setup(){
    Serial.println("First boot handling started...");
    initAP();
    initServer();
}

And in the loop there is only the dnsServer request processor for the captive portal

void bootHandler::loop(){
    dnsServer.processNextRequest();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.