[GH-ISSUE #1558] Entering wrong password to your AP = never ending lock #1329

Open
opened 2026-02-28 01:29:36 +03:00 by kerem · 25 comments
Owner

Originally created by @Jagakatt on GitHub (Jan 31, 2023).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1558

Wrong password in portal and you are stuck.

My first post, and I will probably piss some one off because I missed something. My deepest apologies in advance!

Hardware

WiFimanager Branch/Release: Master(?) 2.0.15-rc.1

Esp8266

Hardware: ESP-12e, esp01, esp25

Core Version: No clue... Arduindo IDE 2.0.3..?

Description

Problem description
// When starting up in "portal mode" and you enter the portal, click on "Configure WiFi", select your SSID, and enter THE WRONG PASSWORD.
// Now you are stuck. A reset (button press) does not help. You have to connect to another network, then close it down do get another try.
// Not possible to recover without connecting to another "valid network"

Settings in IDE, STANDARD

Module: NodeMcu, Wemos D1

Additional libraries:

Sketch


// Test, is it a bug if wrong WiFi-AP-password is entered?
// When starting up in "portal mode" and you enter the portal, click on "Configure WiFi", select your SSID, and enter THE WRONG PASSWORD.
// Now you are stuck. A reset (button press) does not help. You have to connect to another network, then close it down do get another try.
// Not possible to recover without connecting to another "valid network"

// Based on: https://github.com/tzapu/WiFiManager/blob/master/examples/NonBlocking/AutoConnectNonBlocking/AutoConnectNonBlocking.ino
// WiFimanager Tzapu 2.0.15-rc.1
// Arduino IDE 2.0
// WEMOS D1 Mini pro ESP8266

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

void setup() {
  WiFi.mode(WIFI_STA);  // explicitly set mode, esp defaults to STA+AP
  // put your setup code here, to run once:
  Serial.begin(115200);

  //reset settings - wipe credentials for testing
  //wm.resetSettings();

  wm.setConfigPortalBlocking(false);
  wm.setConfigPortalTimeout(60);
  //automatically connect using saved credentials if they exist
  //If connection fails it starts an access point with the specified name
  if (wm.autoConnect("AutoConnectAP", "wwwwwwww")) {
    Serial.println("connected...yeey :)");
  } else {
    Serial.println("Configportal running");
  }
}

String WiFiString;
String previousWiFiString;

void loop() {
  wm.process();
  // put your main code here, to run repeatedly:

  if (WiFi.status() == WL_IDLE_STATUS) {  // when not connected to a network, but powered on
    WiFiString = "WL_IDLE_STATUS 0";
  } else if (WiFi.status() == WL_NO_SSID_AVAIL) {
    WiFiString = "WL_NO_SSID_AVAIL 1 ";
  } else if (WiFi.status() == WL_SCAN_COMPLETED) {
    WiFiString = "WL_SCAN_COMPLETED 2";
  } else if (WiFi.status() == WL_CONNECTED) {
    WiFiString = "WL_CONNECTED 3";
  } else if (WiFi.status() == WL_CONNECT_FAILED) {
    WiFiString = "WL_CONNECT_FAILED 4";
  } else if (WiFi.status() == WL_CONNECTION_LOST) {
    WiFiString = "WL_CONNECTION_LOST 5 ";
  } else if (WiFi.status() == WL_DISCONNECTED) {
    WiFiString = "WL_DISCONNECTED 6 ";
  }

  if (WiFiString != previousWiFiString) {
    Serial.print("WiFi.status                      : ");
    Serial.println(WiFiString);
    previousWiFiString = WiFiString;
  }
}


Debug Messages

/*21:29:22.684 -> {ll��|�l�<�$�c|ǃ��s�#�c��g'�l'o���cp�lrl{lx�n��lĜb'�|���c��gn�dćd`�ng$`'{���o#d�dp�g�;������co�|�c��'o�l`�g'l`o;Ǜ�gc��`s��'c��`�$���d`��g�d*wm:AutoConnect 
21:29:22.877 -> *wm:Connecting to SAVED AP: turbo2
21:29:23.358 -> *wm:connectTimeout not set, ESP waitForConnectResult... 
21:29:26.629 -> *wm:AutoConnect: FAILED 
21:29:26.629 -> *wm:StartAP with SSID:  AutoConnectAP
21:29:28.620 -> *wm:AP IP address: 192.168.4.1
21:29:28.620 -> *wm:Starting Web Portal 
21:29:28.716 -> Configportal running
21:29:28.716 -> WiFi.status                      : WL_IDLE_STATUS 0
21:29:57.195 -> *wm:3 networks found
21:30:41.042 -> *wm:4 networks found
21:30:45.309 -> *wm:4 networks found
21:30:56.658 -> *wm:Connecting to NEW AP: turbo2
21:30:56.787 -> *wm:connectTimeout not set, ESP waitForConnectResult... 
21:31:03.046 -> *wm:[ERROR] Connect to new AP Failed 
21:31:19.638 -> *wm:3 networks found

// Entered the INCORRECT password and saved, and waited...... And nothing. Resetted the device and it comes up in portal mode again. Grrr!


21:32:02.534 -> sd$��|�l�|�d�b|����;�c�c��og�lgn���cp��dsd;lx�o��l��c'�|���c��'o�d��d`�gnl`n{���obd�dp�g�;������co�<�c��o'�$`�no$`gs�ۓo#��`{��o#��`�$Ǐ�$`��g�l*wm:AutoConnect 
21:32:02.728 -> *wm:Connecting to SAVED AP: turbo2
21:32:03.304 -> *wm:connectTimeout not set, ESP waitForConnectResult... 
21:32:09.270 -> *wm:AutoConnect: FAILED 
21:32:09.270 -> *wm:StartAP with SSID:  AutoConnectAP
21:32:11.261 -> *wm:AP IP address: 192.168.4.1
21:32:11.261 -> *wm:Starting Web Portal 
21:32:11.389 -> Configportal running
21:32:11.389 -> WiFi.status                      : WL_IDLE_STATUS 0
21:32:27.628 -> *wm:3 networks found

// Entered the CORRECT password and saved, and waited...... And nothing. Resetted the device and it comes up in portal mode again. Grrr!


21:33:11.574 -> ;ld��|�$�|�d�b<����s�b�#��no�$g'���cp��ds$sdp�g��l��c'�|���b��ng�$��l �no$`'{���ocd�lx�n�{�ܜ���co�<�c��no�d`�no$`'{���gcĒ s��'c��`�$���$`��g�d*wm:AutoConnect 
21:33:11.767 -> *wm:Connecting to SAVED AP: turbo2
21:33:12.246 -> *wm:connectTimeout not set, ESP waitForConnectResult... 
21:33:18.245 -> *wm:AutoConnect: FAILED 
21:33:18.245 -> *wm:StartAP with SSID:  AutoConnectAP
21:33:20.235 -> *wm:AP IP address: 192.168.4.1
21:33:20.235 -> *wm:Starting Web Portal 
21:33:20.363 -> Configportal running
21:33:20.363 -> WiFi.status                      : WL_IDLE_STATUS 0
*/
Originally created by @Jagakatt on GitHub (Jan 31, 2023). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1558 ### Wrong password in portal and you are stuck. My first post, and I will probably piss some one off because I missed something. My deepest apologies in advance! #### Hardware WiFimanager Branch/Release: Master(?) 2.0.15-rc.1 Esp8266 Hardware: ESP-12e, esp01, esp25 Core Version: No clue... Arduindo IDE 2.0.3..? ### Description Problem description // When starting up in "portal mode" and you enter the portal, click on "Configure WiFi", select your SSID, and enter THE WRONG PASSWORD. // Now you are stuck. A reset (button press) does not help. You have to connect to another network, then close it down do get another try. // Not possible to recover without connecting to another "valid network" ### Settings in IDE, STANDARD Module: NodeMcu, Wemos D1 Additional libraries: ### Sketch ```cpp // Test, is it a bug if wrong WiFi-AP-password is entered? // When starting up in "portal mode" and you enter the portal, click on "Configure WiFi", select your SSID, and enter THE WRONG PASSWORD. // Now you are stuck. A reset (button press) does not help. You have to connect to another network, then close it down do get another try. // Not possible to recover without connecting to another "valid network" // Based on: https://github.com/tzapu/WiFiManager/blob/master/examples/NonBlocking/AutoConnectNonBlocking/AutoConnectNonBlocking.ino // WiFimanager Tzapu 2.0.15-rc.1 // Arduino IDE 2.0 // WEMOS D1 Mini pro ESP8266 #include <WiFiManager.h> // https://github.com/tzapu/WiFiManager WiFiManager wm; void setup() { WiFi.mode(WIFI_STA); // explicitly set mode, esp defaults to STA+AP // put your setup code here, to run once: Serial.begin(115200); //reset settings - wipe credentials for testing //wm.resetSettings(); wm.setConfigPortalBlocking(false); wm.setConfigPortalTimeout(60); //automatically connect using saved credentials if they exist //If connection fails it starts an access point with the specified name if (wm.autoConnect("AutoConnectAP", "wwwwwwww")) { Serial.println("connected...yeey :)"); } else { Serial.println("Configportal running"); } } String WiFiString; String previousWiFiString; void loop() { wm.process(); // put your main code here, to run repeatedly: if (WiFi.status() == WL_IDLE_STATUS) { // when not connected to a network, but powered on WiFiString = "WL_IDLE_STATUS 0"; } else if (WiFi.status() == WL_NO_SSID_AVAIL) { WiFiString = "WL_NO_SSID_AVAIL 1 "; } else if (WiFi.status() == WL_SCAN_COMPLETED) { WiFiString = "WL_SCAN_COMPLETED 2"; } else if (WiFi.status() == WL_CONNECTED) { WiFiString = "WL_CONNECTED 3"; } else if (WiFi.status() == WL_CONNECT_FAILED) { WiFiString = "WL_CONNECT_FAILED 4"; } else if (WiFi.status() == WL_CONNECTION_LOST) { WiFiString = "WL_CONNECTION_LOST 5 "; } else if (WiFi.status() == WL_DISCONNECTED) { WiFiString = "WL_DISCONNECTED 6 "; } if (WiFiString != previousWiFiString) { Serial.print("WiFi.status : "); Serial.println(WiFiString); previousWiFiString = WiFiString; } } ``` ### Debug Messages ``` /*21:29:22.684 -> {ll��|�l�< �$�c|ǃ��s�#�c��g'�l'o���cp�lrl{lx�n� �lĜ b '�|��� c��gn�dćd`�ng$`'{���o #d�dp�g� ;������ co�| � c��'o� l`�g' l`o;Ǜ�g c��`s��' c��`� $��� d`��g�d*wm:AutoConnect 21:29:22.877 -> *wm:Connecting to SAVED AP: turbo2 21:29:23.358 -> *wm:connectTimeout not set, ESP waitForConnectResult... 21:29:26.629 -> *wm:AutoConnect: FAILED 21:29:26.629 -> *wm:StartAP with SSID: AutoConnectAP 21:29:28.620 -> *wm:AP IP address: 192.168.4.1 21:29:28.620 -> *wm:Starting Web Portal 21:29:28.716 -> Configportal running 21:29:28.716 -> WiFi.status : WL_IDLE_STATUS 0 21:29:57.195 -> *wm:3 networks found 21:30:41.042 -> *wm:4 networks found 21:30:45.309 -> *wm:4 networks found 21:30:56.658 -> *wm:Connecting to NEW AP: turbo2 21:30:56.787 -> *wm:connectTimeout not set, ESP waitForConnectResult... 21:31:03.046 -> *wm:[ERROR] Connect to new AP Failed 21:31:19.638 -> *wm:3 networks found // Entered the INCORRECT password and saved, and waited...... And nothing. Resetted the device and it comes up in portal mode again. Grrr! 21:32:02.534 -> sd$��|�l�| � d� b|����;�c�c��og�lgn���cp��dsd;lx�o� � l�� c '�|� �� c��'o�d��d`�gn l`n{���obd�dp�g� ;������ co�< �c��o'� $`�no$`gs�ۓo #��`{��o #��`� $Ǐ� $`��g�l*wm:AutoConnect 21:32:02.728 -> *wm:Connecting to SAVED AP: turbo2 21:32:03.304 -> *wm:connectTimeout not set, ESP waitForConnectResult... 21:32:09.270 -> *wm:AutoConnect: FAILED 21:32:09.270 -> *wm:StartAP with SSID: AutoConnectAP 21:32:11.261 -> *wm:AP IP address: 192.168.4.1 21:32:11.261 -> *wm:Starting Web Portal 21:32:11.389 -> Configportal running 21:32:11.389 -> WiFi.status : WL_IDLE_STATUS 0 21:32:27.628 -> *wm:3 networks found // Entered the CORRECT password and saved, and waited...... And nothing. Resetted the device and it comes up in portal mode again. Grrr! 21:33:11.574 -> ;ld��|�$�| � d� b<����s�b� #��no�$g'���cp��ds$sdp�g��l�� c '�|� �� b��ng�$��l �no$`'{���ocd�lx�n� {�ܜ���co�< � c��no� d`�no$`'{���g cĒ s��' c��`� $���$`��g�d*wm:AutoConnect 21:33:11.767 -> *wm:Connecting to SAVED AP: turbo2 21:33:12.246 -> *wm:connectTimeout not set, ESP waitForConnectResult... 21:33:18.245 -> *wm:AutoConnect: FAILED 21:33:18.245 -> *wm:StartAP with SSID: AutoConnectAP 21:33:20.235 -> *wm:AP IP address: 192.168.4.1 21:33:20.235 -> *wm:Starting Web Portal 21:33:20.363 -> Configportal running 21:33:20.363 -> WiFi.status : WL_IDLE_STATUS 0 */ ```
Author
Owner

@tablatronix commented on GitHub (Jan 31, 2023):

are you SURE you are using that version ? this looks like a very old bug

<!-- gh-comment-id:1411119803 --> @tablatronix commented on GitHub (Jan 31, 2023): are you SURE you are using that version ? this looks like a very old bug
Author
Owner

@Jagakatt commented on GitHub (Jan 31, 2023):

I just installed thru the library manager in Arduino IDE.

cat library.properties

name=WiFiManager
version=2.0.15-rc.1
author=tzapu
maintainer=tablatronix
sentence=WiFi Configuration manager with web configuration portal for Espressif ESPx boards, by tzapu
paragraph=Library for configuring ESP8266/ESP32 modules WiFi credentials and custom parameters at runtime with captive portal.
category=Communication
url=https://github.com/tzapu/WiFiManager.git
architectures=esp8266,esp32
pepe@turbo2:~/Arduino/libraries/WiFiManager$

<!-- gh-comment-id:1411141281 --> @Jagakatt commented on GitHub (Jan 31, 2023): I just installed thru the library manager in Arduino IDE. cat library.properties name=WiFiManager version=2.0.15-rc.1 author=tzapu maintainer=tablatronix sentence=WiFi Configuration manager with web configuration portal for Espressif ESPx boards, by tzapu paragraph=Library for configuring ESP8266/ESP32 modules WiFi credentials and custom parameters at runtime with captive portal. category=Communication url=https://github.com/tzapu/WiFiManager.git architectures=esp8266,esp32 pepe@turbo2:~/Arduino/libraries/WiFiManager$
Author
Owner

@tablatronix commented on GitHub (Feb 1, 2023):

This is what debug_level 3 should look like saving a new password
*wm:[1] Connecting to NEW AP

*wm:[2] <- HTTP WiFi save  
*wm:[3] Method: POST
*wm:[3] Sent wifi save page 
*wm:[2] processing save 
*wm:[2] Connecting as wifi client... 
*wm:[3] STA static IP:
*wm:[2] setSTAConfig static ip not set, skipping 
*wm:[1] Connecting to NEW AP: leela
*wm:[3] Using Password: xxxxxxx
*wm:[3] WiFi_enableSTA enable

is your ssid input somehow empty? I do not think there is a check for empty ssid, thats the only thing I can see

<!-- gh-comment-id:1411355526 --> @tablatronix commented on GitHub (Feb 1, 2023): This is what debug_level 3 should look like saving a new password `*wm:[1] Connecting to NEW AP` ``` *wm:[2] <- HTTP WiFi save *wm:[3] Method: POST *wm:[3] Sent wifi save page *wm:[2] processing save *wm:[2] Connecting as wifi client... *wm:[3] STA static IP: *wm:[2] setSTAConfig static ip not set, skipping *wm:[1] Connecting to NEW AP: leela *wm:[3] Using Password: xxxxxxx *wm:[3] WiFi_enableSTA enable ``` is your ssid input somehow empty? I do not think there is a check for empty ssid, thats the only thing I can see
Author
Owner

@Jagakatt commented on GitHub (Feb 1, 2023):

Seam to be working as it should. Was fooled by the automatic pre-filled-in SSID in the portal (realize now it's grey and not black text). Looked like it was only the password missing to do the connection. Much headache for nothing but really happy it's working. Sorry for my post. Should I click "Close and Completed" here below? I'm new to this...

Screenshot_20230201-01
Screenshot_20230201-03
Screenshot_20230201-02

<!-- gh-comment-id:1411554230 --> @Jagakatt commented on GitHub (Feb 1, 2023): Seam to be working as it should. Was fooled by the automatic pre-filled-in SSID in the portal (realize now it's grey and not black text). Looked like it was only the password missing to do the connection. Much headache for nothing but really happy it's working. Sorry for my post. Should I click "Close and Completed" here below? I'm new to this... ![Screenshot_20230201-01](https://user-images.githubusercontent.com/59456277/215972557-659ccced-00c2-4db8-a044-74dee3598be4.png) ![Screenshot_20230201-03](https://user-images.githubusercontent.com/59456277/215972558-10d1f97e-61d1-48be-abaf-3045b4e1cefa.png) ![Screenshot_20230201-02](https://user-images.githubusercontent.com/59456277/215972560-3b2bcd50-8ff2-47fd-8ee2-d949018ae505.png)
Author
Owner

@tablatronix commented on GitHub (Feb 1, 2023):

What browser are you using? the placeholder should also be the value and submitted still, thats odd

<!-- gh-comment-id:1412190104 --> @tablatronix commented on GitHub (Feb 1, 2023): What browser are you using? the placeholder should also be the value and submitted still, thats odd
Author
Owner

@Jagakatt commented on GitHub (Feb 1, 2023):

Looks like it's the ESP that outputs the SSID in grey if you have a previous successful connection (and now SSID is unavailable).
Or if you have a previous unsuccessful connection attempt with incorrect password.

Well it's easy to go around it by tapping on the correct network in the list when you know it. But at least it fooled me when it looked like it was already in place. ;- )

Do not know what browser-components launched in the phone when accessing "Config portal" from the WiFi-setting.
But it's the same behavior on the following phones:

Xiaomi Redmi Note 8 Pro
Kernel 4.14.141-g95d4269
Model M1906g7g
Android 10 QP1A.190711.020
MIUI Global 12.0.8
Chrome: 109.0.5414.117

Doogee S96Pro
Doogee-s96pro-EEA-Android10.0-20211116
Chrome: 109.0.5414.86

Samsung Galaxy A5
Android 8.0.0

Doogee s98
Android 12

<!-- gh-comment-id:1412550349 --> @Jagakatt commented on GitHub (Feb 1, 2023): Looks like it's the ESP that outputs the SSID in grey if you have a previous successful connection (and now SSID is unavailable). Or if you have a previous unsuccessful connection attempt with incorrect password. Well it's easy to go around it by tapping on the correct network in the list when you know it. But at least it fooled me when it looked like it was already in place. ;- ) Do not know what browser-components launched in the phone when accessing "Config portal" from the WiFi-setting. But it's the same behavior on the following phones: Xiaomi Redmi Note 8 Pro Kernel 4.14.141-g95d4269 Model M1906g7g Android 10 QP1A.190711.020 MIUI Global 12.0.8 Chrome: 109.0.5414.117 Doogee S96Pro Doogee-s96pro-EEA-Android10.0-20211116 Chrome: 109.0.5414.86 Samsung Galaxy A5 Android 8.0.0 Doogee s98 Android 12
Author
Owner

@tablatronix commented on GitHub (Feb 1, 2023):

Let me check a few things, if its in grey it should be resbumitted on save, I did not have to reset the AP when changing password so there must be a condition that changes, but perhaps not always working, or not being prefilled correctly sometimes?

I am adding argument debugging ( you can see arguments by turning on esp debugging also )

<!-- gh-comment-id:1412560296 --> @tablatronix commented on GitHub (Feb 1, 2023): Let me check a few things, if its in grey it should be resbumitted on save, I did not have to reset the AP when changing password so there must be a condition that changes, but perhaps not always working, or not being prefilled correctly sometimes? I am adding argument debugging ( you can see arguments by turning on esp debugging also )
Author
Owner

@Project-Exhale commented on GitHub (May 6, 2023):

I just encountered the same bug, SSID looks prefilled and when saved, the missing SSID results in "Connect to new AP Failed" and ESP32 is locked until restart.

<!-- gh-comment-id:1537156499 --> @Project-Exhale commented on GitHub (May 6, 2023): I just encountered the same bug, SSID looks prefilled and when saved, the missing SSID results in "Connect to new AP Failed" and ESP32 is locked until restart.
Author
Owner

@prochazkapeter commented on GitHub (May 11, 2023):

Hello, I have similar issue. When I enter a bad password in the Configuration Portal it goes into endless loop of (xxxxx) wifi:Set status to INIT. When I reset the ESP32, it goes back to this loop. I have to call resetSettings() to fix this.

Example here:
17:41:41.460 -> *wm:AP IP address: 192.168.4.1
17:41:41.460 -> *wm:Starting Web Portal
17:41:50.006 -> *wm:20 networks found
17:41:57.518 -> *wm:Connecting to NEW AP: WB12-2G
17:41:57.611 -> *wm:connectTimeout not set, ESP waitForConnectResult...
17:42:04.740 -> E (31317) wifi:Set status to INIT
17:42:04.817 -> E (31376) wifi:Set status to INIT
17:42:04.817 -> E (31402) wifi:Set status to INIT
x
x
17:42:05.998 -> *wm:Connect Wifi, ATTEMPT # 2 of 33
17:42:05.998 -> *wm:Connecting to NEW AP: WB12-2G
17:42:05.998 -> *wm:connectTimeout not set, ESP waitForConnectResult...
17:42:05.998 -> E (32601) wifi:Set status to INIT
17:42:06.075 -> E (32636) wifi:Set status to INIT
17:42:06.122 -> E (32704) wifi:Set status to INIT

I would imagine, that the connection should fail due to the bad password and create the configuration portal again.

Thank you :-)

<!-- gh-comment-id:1544254257 --> @prochazkapeter commented on GitHub (May 11, 2023): Hello, I have similar issue. When I enter a bad password in the Configuration Portal it goes into endless loop of (xxxxx) wifi:Set status to INIT. When I reset the ESP32, it goes back to this loop. I have to call resetSettings() to fix this. Example here: 17:41:41.460 -> *wm:AP IP address: 192.168.4.1 17:41:41.460 -> *wm:Starting Web Portal 17:41:50.006 -> *wm:20 networks found 17:41:57.518 -> *wm:Connecting to NEW AP: WB12-2G 17:41:57.611 -> *wm:connectTimeout not set, ESP waitForConnectResult... 17:42:04.740 -> E (31317) wifi:Set status to INIT 17:42:04.817 -> E (31376) wifi:Set status to INIT 17:42:04.817 -> E (31402) wifi:Set status to INIT x x 17:42:05.998 -> *wm:Connect Wifi, ATTEMPT # 2 of 33 17:42:05.998 -> *wm:Connecting to NEW AP: WB12-2G 17:42:05.998 -> *wm:connectTimeout not set, ESP waitForConnectResult... 17:42:05.998 -> E (32601) wifi:Set status to INIT 17:42:06.075 -> E (32636) wifi:Set status to INIT 17:42:06.122 -> E (32704) wifi:Set status to INIT I would imagine, that the connection should fail due to the bad password and create the configuration portal again. Thank you :-)
Author
Owner

@tablatronix commented on GitHub (May 11, 2023):

Thanks!
i have no idea what
17:42:05.998 -> E (32601) wifi:Set status to INIT is...
hmm

are you all using git or the last release?

<!-- gh-comment-id:1544458340 --> @tablatronix commented on GitHub (May 11, 2023): Thanks! i have no idea what 17:42:05.998 -> E (32601) wifi:Set status to INIT is... hmm are you all using git or the last release?
Author
Owner

@chriskinal commented on GitHub (May 11, 2023):

I have seen that error as well when I turn off the AP the ESP32 is connected to. I was simulating losing connection to the AP while testing my other issue. It seemed to happen randomly with connection losses > 10 seconds.

I think it is coming from the program that is in the Setup() versus WiFiManager. The errors I get from WiFiManager are all prefixed with "wm:' since that is the name of the WiFiManager instance.

<!-- gh-comment-id:1544478206 --> @chriskinal commented on GitHub (May 11, 2023): I have seen that error as well when I turn off the AP the ESP32 is connected to. I was simulating losing connection to the AP while testing my other issue. It seemed to happen randomly with connection losses > 10 seconds. I think it is coming from the program that is in the Setup() versus WiFiManager. The errors I get from WiFiManager are all prefixed with "wm:' since that is the name of the WiFiManager instance.
Author
Owner

@tablatronix commented on GitHub (May 11, 2023):

#1563
#1540

<!-- gh-comment-id:1544497066 --> @tablatronix commented on GitHub (May 11, 2023): #1563 #1540
Author
Owner

@tablatronix commented on GitHub (May 11, 2023):

I pushed a release, made it release. It might have a fix for this already

<!-- gh-comment-id:1544552170 --> @tablatronix commented on GitHub (May 11, 2023): I pushed a release, made it release. It might have a fix for this already
Author
Owner

@tablatronix commented on GitHub (May 31, 2023):

Has anyone retested this?

<!-- gh-comment-id:1569361224 --> @tablatronix commented on GitHub (May 31, 2023): Has anyone retested this?
Author
Owner

@pho3nix06 commented on GitHub (Nov 13, 2023):

I am having the same issue, in AP mode when a wrong password is entered, the ESP is stuck, and showing "ESP waitForConnectResult...". And after one minute it is showing "[ERROR] Connect to new AP Failed ".

image

Is there any way that I can print the "wrong password" in serial terminal while the config portal keeping open?

<!-- gh-comment-id:1807967752 --> @pho3nix06 commented on GitHub (Nov 13, 2023): I am having the same issue, in AP mode when a wrong password is entered, the ESP is stuck, and showing "ESP waitForConnectResult...". And after one minute it is showing "[ERROR] Connect to new AP Failed ". ![image](https://github.com/tzapu/WiFiManager/assets/73868929/fc164938-607f-46cb-b898-08ec5201545e) Is there any way that I can print the "wrong password" in serial terminal while the config portal keeping open?
Author
Owner

@tablatronix commented on GitHub (Nov 15, 2023):

Thanks I will test this and see whats going on, sounds like a bug detecting the save as a change.

<!-- gh-comment-id:1811782218 --> @tablatronix commented on GitHub (Nov 15, 2023): Thanks I will test this and see whats going on, sounds like a bug detecting the save as a change.
Author
Owner

@tablatronix commented on GitHub (Nov 16, 2023):

Not sure how to reproduce this bug, for one, I cannot safe the wrong password, as wm does not save on fail by default..
So thats odd.

If I do use the wrong password, I can still just save the new one and no stuck ??

*wm:[SYS] WM version:  v2.0.15-rc.1
*wm:[SYS] Arduino version:  2.0.14
*wm:[SYS] ESP SDK version:  4.4.6.231024
*wm:[SYS] Free heap:        305700
*wm:[SYS] Chip ID: 3245692124
*wm:[SYS] Chip Model: ESP32-S3
.......
[WIFI] WIFI_INFO DEBUG
[WIFI] SAVED: YES
[WIFI] SSID: leela
[WIFI] PASS: wrongpassword
*wm:AutoConnect 
*wm:Connecting to SAVED AP: leela
*wm:connectTimeout not set, ESP waitForConnectResult... 
*wm:AutoConnect: FAILED for  13611 ms
*wm:StartAP with SSID:  WM_AutoConnectAP
*wm:AP IP address: 192.168.4.1
[CALLBACK] configModeCallback fired
*wm:Starting Web Portal 
*wm:5 networks found
*wm:Connecting to NEW AP: leela (RIGHT PASSWORD)
*wm:connectTimeout not set, ESP waitForConnectResult... 
*wm:Connect to new AP [SUCCESS] 
*wm:Got IP Address: 
*wm:192.168.20.254 
[CALLBACK] saveCallback fired
*wm:config portal exiting 
connected...yeey :)
<!-- gh-comment-id:1813718128 --> @tablatronix commented on GitHub (Nov 16, 2023): Not sure how to reproduce this bug, for one, I cannot safe the wrong password, as wm does not save on fail by default.. So thats odd. If I do use the wrong password, I can still just save the new one and no stuck ?? ```php *wm:[SYS] WM version: v2.0.15-rc.1 *wm:[SYS] Arduino version: 2.0.14 *wm:[SYS] ESP SDK version: 4.4.6.231024 *wm:[SYS] Free heap: 305700 *wm:[SYS] Chip ID: 3245692124 *wm:[SYS] Chip Model: ESP32-S3 ....... [WIFI] WIFI_INFO DEBUG [WIFI] SAVED: YES [WIFI] SSID: leela [WIFI] PASS: wrongpassword *wm:AutoConnect *wm:Connecting to SAVED AP: leela *wm:connectTimeout not set, ESP waitForConnectResult... *wm:AutoConnect: FAILED for 13611 ms *wm:StartAP with SSID: WM_AutoConnectAP *wm:AP IP address: 192.168.4.1 [CALLBACK] configModeCallback fired *wm:Starting Web Portal *wm:5 networks found *wm:Connecting to NEW AP: leela (RIGHT PASSWORD) *wm:connectTimeout not set, ESP waitForConnectResult... *wm:Connect to new AP [SUCCESS] *wm:Got IP Address: *wm:192.168.20.254 [CALLBACK] saveCallback fired *wm:config portal exiting connected...yeey :) ```
Author
Owner

@tablatronix commented on GitHub (Nov 16, 2023):

You have to enter the SSID, is that what you are talking about?
A placeholder does not get submitted in the form, you have to fill out the SSID, you cannot just change the password.

<!-- gh-comment-id:1813724196 --> @tablatronix commented on GitHub (Nov 16, 2023): You have to enter the SSID, is that what you are talking about? A placeholder does not get submitted in the form, you have to fill out the SSID, you cannot just change the password.
Author
Owner

@pho3nix06 commented on GitHub (Nov 16, 2023):

No, the SSID is automatically getting filled by clicking the SSIDs that's been showing after scan, there is no issue about that.
Let me elaborate a bit,

  • Lets say the portal is being opened for 5 minutes (setConfigPortalTimeout(300)) and the connect timeout is set for 10 seconds (setConnectTimeout(10)).

  • Now the portal will be opened for 5 minute, and will close either on successful configuration or after timeout (which is 5 minute in this case), and after entering the password, ESP will try to connect for 10 seconds.

  • During these 5 minutes if I enter a wrong password in the webpage, the ESP will try to connect for 10 seconds and will fail (ERROR Log message will be printed), so for successful connection I have to close the webpage and open it again.

Now my question is, how can I get an error callback(for entering wrong WiFi credentials) after spending 10 seconds of failed attempt while the config portal is still open (while the stack is still running)?
In the documentation, there is function setAPCallback() which will return on failed WiFi connection attempt. But it is returning after 5 minutes (setConfigPortalTimeout()).

<!-- gh-comment-id:1813924818 --> @pho3nix06 commented on GitHub (Nov 16, 2023): No, the SSID is automatically getting filled by clicking the SSIDs that's been showing after scan, there is no issue about that. Let me elaborate a bit, - Lets say the portal is being opened for 5 minutes (**_setConfigPortalTimeout(300))_** and the connect timeout is set for 10 seconds _**(setConnectTimeout(10))**_. - Now the portal will be opened for 5 minute, and will close either on successful configuration or after timeout (which is 5 minute in this case), and after entering the password, ESP will try to connect for 10 seconds. - During these 5 minutes if I enter a wrong password in the webpage, the ESP will try to connect for 10 seconds and will fail (ERROR Log message will be printed), so for successful connection I have to close the webpage and open it again. Now my question is, how can I get an error callback(for entering wrong WiFi credentials) after spending 10 seconds of failed attempt while the config portal is still open (while the stack is still running)? In the documentation, there is function _**setAPCallback()**_ which will return on failed WiFi connection attempt. But it is returning after 5 minutes **_(setConfigPortalTimeout())_**.
Author
Owner

@tablatronix commented on GitHub (Nov 16, 2023):

Thats is not the same issue here, also not sure what you mean close and open the browser again, I suggest you open another issue with this question. If you want to close the portal on failures, you can but you have to set breakafterconfig=true, or use a callback. If it fails and the portal is still open, you can still go back to the previous page, but I am not sure if you are using captiveportal or not, this needs a new issue to clearly explain this

<!-- gh-comment-id:1814932593 --> @tablatronix commented on GitHub (Nov 16, 2023): Thats is not the same issue here, also not sure what you mean close and open the browser again, I suggest you open another issue with this question. If you want to close the portal on failures, you can but you have to set breakafterconfig=true, or use a callback. If it fails and the portal is still open, you can still go back to the previous page, but I am not sure if you are using captiveportal or not, this needs a new issue to clearly explain this
Author
Owner

@tablatronix commented on GitHub (Nov 16, 2023):

Also what is 'ERROR scan waiting?' that is not WM..

<!-- gh-comment-id:1814945910 --> @tablatronix commented on GitHub (Nov 16, 2023): Also what is 'ERROR scan waiting?' that is not WM..
Author
Owner

@RFDarter commented on GitHub (Nov 17, 2023):

@tablatronix
Your recent "fix" in WiFIManagaer.cpp line 1817
if(_ssid = "" && _pass != ""){

made thing a lot worse. I took me a while to finde this mistake.

I guess you meant to write
if(_ssid == "" && _pass != ""){

<!-- gh-comment-id:1816532795 --> @RFDarter commented on GitHub (Nov 17, 2023): @tablatronix Your recent "fix" in WiFIManagaer.cpp line 1817 if(_ssid **=** "" && _pass != ""){ made thing a lot worse. I took me a while to finde this mistake. I guess you meant to write if(_ssid **==** "" && _pass != ""){
Author
Owner

@tablatronix commented on GitHub (Nov 17, 2023):

thanks, geez, thats the 2nd time, my bad, been working on 3 projects in 5 different languages
pushed

<!-- gh-comment-id:1816881550 --> @tablatronix commented on GitHub (Nov 17, 2023): thanks, geez, thats the 2nd time, my bad, been working on 3 projects in 5 different languages pushed
Author
Owner

@pho3nix06 commented on GitHub (Nov 18, 2023):

@tablatronix
Sure I will open another issue.
Regarding the ERROR scan waiting , not sure, I thought this is also from wm.
Let me look into this and will update if I find anything.

<!-- gh-comment-id:1817542905 --> @pho3nix06 commented on GitHub (Nov 18, 2023): @tablatronix Sure I will open another issue. Regarding the **_ERROR scan waiting_** , not sure, I thought this is also from wm. Let me look into this and will update if I find anything.
Author
Owner

@tablatronix commented on GitHub (Nov 18, 2023):

Yeah I definitely have a goal to get the saving flow better worked out but there are so many variables with accounting for captiveportals and ap stability when channel scanning for connects. So getting your info will help me figure out specific use cases

but lets make sure you are actually using this library

<!-- gh-comment-id:1817545535 --> @tablatronix commented on GitHub (Nov 18, 2023): Yeah I definitely have a goal to get the saving flow better worked out but there are so many variables with accounting for captiveportals and ap stability when channel scanning for connects. So getting your info will help me figure out specific use cases but lets make sure you are actually using this library
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#1329
No description provided.