mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1558] Entering wrong password to your AP = never ending lock #1329
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1329
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Debug Messages
@tablatronix commented on GitHub (Jan 31, 2023):
are you SURE you are using that version ? this looks like a very old bug
@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$
@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 APis your ssid input somehow empty? I do not think there is a check for empty ssid, thats the only thing I can see
@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...
@tablatronix commented on GitHub (Feb 1, 2023):
What browser are you using? the placeholder should also be the value and submitted still, thats odd
@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
@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 )
@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.
@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 :-)
@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?
@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.
@tablatronix commented on GitHub (May 11, 2023):
#1563
#1540
@tablatronix commented on GitHub (May 11, 2023):
I pushed a release, made it release. It might have a fix for this already
@tablatronix commented on GitHub (May 31, 2023):
Has anyone retested this?
@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 ".
Is there any way that I can print the "wrong password" in serial terminal while the config portal keeping open?
@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.
@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 ??
@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.
@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()).
@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
@tablatronix commented on GitHub (Nov 16, 2023):
Also what is 'ERROR scan waiting?' that is not WM..
@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 != ""){
@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
@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.
@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