[GH-ISSUE #1852] Help no connection without WiFi.begin(); #1552

Open
opened 2026-02-28 01:30:30 +03:00 by kerem · 2 comments
Owner

Originally created by @kae90 on GitHub (Feb 26, 2026).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1852

Hi, I've been using WifiManager for a few years. Now I've made some updates to the FirebaseClient, replacing Service auth with user auth, and suddenly I've encountered a problem.
I've always started WifiManager like this:

#include <WiFiManager.h> // https://github.com/tzapu/WiFiManager

void setup(){
Serial.begin(115200);

WiFi.mode(WIFI_STA);
WiFiManager wm;
wm.setConnectTimeout(-1);
WiFi.setAutoReconnect(true);
wm.setBreakAfterConfig(true);

while (WiFi.status() != WL_CONNECTED) {
Serial.println(F("Not connected!"));
delay(1000);
if (digitalRead(D5) == LOW) {
wm.autoConnect("test","12345678");
delay(1000);
ESP.restart();
} }
timeClient.begin(); //NTP
timeClient.update();
InitializeFirebase();
}

After changing FirebaseClient access to "user auth," WiFiManager can't find the WiFi credentials and is stuck in the while loop on not connected.
To get the device to connect, I simply add WiFi.begin(); before WiFi.mode(WIFI_STA); and it connects immediately.
Am I doing something wrong with WifiManager?
Thanks and congratulations on the fantastic library.

Originally created by @kae90 on GitHub (Feb 26, 2026). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1852 Hi, I've been using WifiManager for a few years. Now I've made some updates to the FirebaseClient, replacing Service auth with user auth, and suddenly I've encountered a problem. I've always started WifiManager like this: #include <WiFiManager.h> // https://github.com/tzapu/WiFiManager void setup(){ Serial.begin(115200); WiFi.mode(WIFI_STA); WiFiManager wm; wm.setConnectTimeout(-1); WiFi.setAutoReconnect(true); wm.setBreakAfterConfig(true); while (WiFi.status() != WL_CONNECTED) { Serial.println(F("Not connected!")); delay(1000); if (digitalRead(D5) == LOW) { wm.autoConnect("test","12345678"); delay(1000); ESP.restart(); } } timeClient.begin(); //NTP timeClient.update(); InitializeFirebase(); } --------------------------------------------------------------------------- After changing FirebaseClient access to "user auth," WiFiManager can't find the WiFi credentials and is stuck in the while loop on not connected. To get the device to connect, I simply add WiFi.begin(); before WiFi.mode(WIFI_STA); and it connects immediately. Am I doing something wrong with WifiManager? Thanks and congratulations on the fantastic library.
Author
Owner

@tablatronix commented on GitHub (Feb 26, 2026):

Sounds like an odd issue, without debug logs no idea, my guess is something in the firebase lib is causing this and that it is an issue in espCore

<!-- gh-comment-id:3967983439 --> @tablatronix commented on GitHub (Feb 26, 2026): Sounds like an odd issue, without debug logs no idea, my guess is something in the firebase lib is causing this and that it is an issue in espCore
Author
Owner

@kae90 commented on GitHub (Feb 27, 2026):

Sounds like an odd issue, without debug logs no idea, my guess is something in the firebase lib is causing this and that it is an issue in espCore

What log can I show you? Are CORE and WIFI OK?
I noticed that if I don't use WiFi.begin(), no log is shown.
Thanks

<!-- gh-comment-id:3972122371 --> @kae90 commented on GitHub (Feb 27, 2026): > Sounds like an odd issue, without debug logs no idea, my guess is something in the firebase lib is causing this and that it is an issue in espCore What log can I show you? Are CORE and WIFI OK? I noticed that if I don't use WiFi.begin(), no log is shown. Thanks
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#1552
No description provided.