me-no-dev / ESPAsyncWebServer

Async Web Server for ESP8266 and ESP32
3.61k stars 1.17k forks source link

AsyncEventSource events("/events"), does not work! #1161

Closed MalushSasha closed 1 year ago

MalushSasha commented 2 years ago

I'm trying to repeat the example with the "ESPAsyncWebServer" library. When adding a line to the project: // AsyncEventSource events("/events"); Gives the following message. What could be the reason? Thanks in advance.

c:/users/zav/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\libae0\libESP Async WebServer.a(WebAuthentication.cpp.o):(.literal._ZL6getMD5PhtPc+0x4): undefined reference to `mbedtls_md5_starts'

c:/users/zav/.platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32doit-devkit-v1\libae0\libESP Async WebServer.a(WebAuthentication.cpp.o): in function `getMD5(unsigned char*, unsigned short, char*)':

E:\Arduino\webserver\ESP32_wifi_serv/.pio/libdeps/esp32doit-devkit-v1/ESP Async WebServer/src/WebAuthentication.cpp:73: undefined reference to `mbedtls_md5_starts'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32doit-devkit-v1\firmware.elf] Error 1
#include <Arduino.h>
#include <WiFi.h>
#include <DHT.h>
#include <Adafruit_Sensor.h>
#include "ESPAsyncWebServer.h"
// #include "SPIFFS.h"
#include <Arduino_JSON.h>
#include <AsyncTCP.h>
#include "LittleFS.h"

const char* ssid     = "jadina hahol";
const char* password = "zaharhvulka";
uint8_t DHTPIN = 4;
DHT dht(DHTPIN, DHT22);
const int ledPin = 2; 
float Temperature;
float Humidity; 

unsigned long lastTime = 0;
unsigned long timerDelay = 2000;
IPAddress local_IP(192,168,12,12);
IPAddress gateway(192,168,12,12); 
IPAddress subnet(255,255,255,0);
AsyncWebServer server(80);  

// AsyncEventSource events("/events");

Platformio.ini

[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
monitor_speed = 115200
framework = arduino
board_build.filesystem = littlefs
lib_deps = 
    arduino-libraries/Arduino_JSON@^0.1.0
    me-no-dev/ESP Async WebServer@^1.2.3
    ; me-no-dev/AsyncTCP;@^1.1.1
    adafruit/DHT sensor library@^1.4.3
    adafruit/Adafruit Unified Sensor@^1.1.5
stale[bot] commented 1 year ago

[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions.