Skip to content

AsyncWebServerLogging doesnt compile on ESP8266 #379

@tanishqmanuja

Description

@tanishqmanuja

Platform

ESP8266

IDE / Tooling

PlatformIO

What happened?

First encountered this while compiling this on esphome@dev.

Main cause is that I disable serial logging on esp8266.

Stack Trace

Useful Snippet

mini/ESPAsyncWebServer/src/AsyncWebSocket.h:32,
                 from .piolibdeps/dimled-mini/ESPAsyncWebServer/src/ESPAsyncWebServer.h:1589,
                 from src/esphome/components/web_server_base/web_server_base.h:15,
                 from src/esphome/components/captive_portal/captive_portal.h:13,
                 from src/esphome/components/captive_portal/captive_portal.cpp:1:
.piolibdeps/dimled-mini/ESPAsyncWebServer/src/AsyncWebSocket.h: In constructor 'AsyncWebSocketControl::AsyncWebSocketControl(uint8_t, const uint8_t*, size_t, bool)':
.piolibdeps/dimled-mini/ESPAsyncWebServer/src/AsyncWebServerLogging.h:101:37: error: 'Serial' was not declared in this scope
  101 | #define async_ws_log_e(format, ...) Serial.printf_P(PSTR("E async_ws %d: " format "\n"), __LINE__, ##__VA_ARGS__)
      |                                     ^~~~~~
.piolibdeps/dimled-mini/ESPAsyncWebServer/src/AsyncWebSocket.h:86:9: note: in expansion of macro 'async_ws_log_e'
   86 |         async_ws_log_e("Failed to allocate");
      |         ^~~~~~~~~~~~~~
Compiling .pioenvs/dimled-mini/src/esphome/components/ddp/ddp_light_effect.cpp.o
Compiling .pioenvs/dimled-mini/src/esphome/components/ddp/ddp_light_effect_base.cpp.o
*** [.pioenvs/dimled-mini/src/esphome/components/captive_portal/captive_portal.cpp.o] Error 1
========================= [FAILED] Took 34.56 seconds =========================

Full Logs: https://github.com/tqlabs-in/dimled-mini/actions/runs/21462827254/job/61831213713

Minimal Reproductible Example (MRE)

Actual code is Internally generated via esphome. But this is the cause I guess

web_server:

logger:
  baud_rate: 0

I confirm that:

  • I have read the documentation.
  • I have searched for similar discussions.
  • I have searched for similar issues.
  • I have looked at the examples.
  • I have upgraded to the lasted version of ESPAsyncWebServer (and AsyncTCP for ESP32).

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions