[GH-ISSUE #1297] autoConnect() does not respect setEnableConfigPortal() when there are no WiFi credentials saved #1112

Closed
opened 2026-02-28 01:28:34 +03:00 by kerem · 1 comment
Owner

Originally created by @gotlaufs on GitHub (Sep 29, 2021).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1297

Basic Infos

Hardware

WiFimanager Branch/Release: 2.0.4-beta+sha.8984863

Esp8266/Esp32: ESP32

Hardware: NodeMCU ESP32-S

Core Version: 2.4.0, staging

Description

When there are no WiFi credentials stored, if I specify setEnableConfigPortal(false), autoConnect() still opens config portal and does not return.

Settings in IDE

Module: NodeMCU ESP32-S

Additional libraries:

Sketch

#include <Arduino.h>
WiFiManager wm;
void setup() {
  wm.setEnableConfigPortal(false);
  wm.autoConnect(); // <- This should return if unable to connect
}

void loop() {

}
#END

Debug Messages

*wm:[1] AutoConnect 
*wm:[1] No Credentials are Saved, skipping connect 
*wm:[2] Starting Config Portal 
*wm:[2] Disabling STA 
*wm:[2] Enabling AP 
*wm:[1] StartAP with SSID:  ESP32_EC4F5FC
*wm:[2] AP has anonymous access! 
*wm:[1] AP IP address: 192.168.4.1
*wm:[1] Starting Web Portal 
*wm:[2] HTTP server started 
*wm:[2] Config Portal Running, blocking, waiting for clients... 
Originally created by @gotlaufs on GitHub (Sep 29, 2021). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1297 ### Basic Infos #### Hardware WiFimanager Branch/Release: 2.0.4-beta+sha.8984863 Esp8266/Esp32: ESP32 Hardware: NodeMCU ESP32-S Core Version: 2.4.0, staging ### Description When there are no WiFi credentials stored, if I specify `setEnableConfigPortal(false)`, `autoConnect()` still opens config portal and does not return. ### Settings in IDE Module: NodeMCU ESP32-S Additional libraries: ### Sketch ```cpp #include <Arduino.h> WiFiManager wm; void setup() { wm.setEnableConfigPortal(false); wm.autoConnect(); // <- This should return if unable to connect } void loop() { } #END ``` ### Debug Messages ``` *wm:[1] AutoConnect *wm:[1] No Credentials are Saved, skipping connect *wm:[2] Starting Config Portal *wm:[2] Disabling STA *wm:[2] Enabling AP *wm:[1] StartAP with SSID: ESP32_EC4F5FC *wm:[2] AP has anonymous access! *wm:[1] AP IP address: 192.168.4.1 *wm:[1] Starting Web Portal *wm:[2] HTTP server started *wm:[2] Config Portal Running, blocking, waiting for clients... ```
kerem 2026-02-28 01:28:34 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@tablatronix commented on GitHub (Sep 29, 2021):

Thanks, good catch

<!-- gh-comment-id:930448880 --> @tablatronix commented on GitHub (Sep 29, 2021): Thanks, good catch
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1112
No description provided.