mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #537] wifiManager.autoConnect crashes ESP on MDNS.begin with Fatal exception 28(LoadProhibitedCause): #450
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#450
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 @chadham on GitHub (Feb 21, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/537
Basic Infos
Hardware
WiFimanager Branch/Release: Development
Version 0.12.0 (per Arduino Library Manager)
Hardware: NodeMcu 1.0 (ESP12-E module)
Core Version: Version 0.12.0 (per Arduino Library Manager)
Downloaded the latest git and confirmed issue on it
Description
Problem description: If wifiManager.autoconnect is used to connect the esp8266, it crashes when MDNS.begin(..) is called
Settings in IDE
Module: NodeMcu 1.0 (ESP12-E module)
Additional libraries:
ESP8266mDNS.h
Sketch
Debug Messages
USING WIFIMANAGER.AUTOCONNECT
Works fine when using WiFi.being(said, password)
Here is that output
1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
~ld
;l�d⸮⸮|�⸮$⸮|⸮$⸮c|ǃ⸮⸮{⸮c⸮c⸮⸮og⸮l'o⸮⸮⸮#x⸮⸮l;l{lp⸮n⸮⸮d⸮⸮co⸮|l⸮⸮c⸮⸮'o⸮�d⸮⸮$
⸮no$'{⸮⸮⸮gc⸮ls⸮⸮'c⸮d܃⸮c⸮l`⸮⸮g⸮scandone...scandone
state: 0 -> 2 (b0)
.state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 5
cnt
connected with Router, channel 6
dhcp client start...
ip:10.0.1.111,mask:255.255.255.0,gw:10.0.1.1
Connected to Router ,IP address is 10.0.1.111 and signal strength is -53
Started MDNS
@tablatronix commented on GitHub (Feb 22, 2018):
Well for one you are removing wifi credentials every time you reboot
WiFi.disconnect();deletes credentials !@tablatronix commented on GitHub (Feb 22, 2018):
cannot reproduce with any combination of versions
@chadham commented on GitHub (Feb 22, 2018):
Wifi.disconnect call was intentional as I want to force wifiManager to load each time (for testing this issue, will be removed once fixed).
I stripped it down to the minimal code per above, and am able to reproduce on 2 NodeMCU's to eliminate (or at least reduce) the chance of flash corruption on one.
Also deleted and downloaded latest version from here.
Any chance Im on a older firmware version on the nodeMCU? How do I check the firmware version?
@tablatronix commented on GitHub (Feb 22, 2018):
What is your esp core?
@chadham commented on GitHub (Feb 22, 2018):
I’m not sure. It’s a stock wemos nodemcu dev board. How do I tell what the core version is?
@tablatronix commented on GitHub (Feb 22, 2018):
are you using esp staging, or 2.4.0 ?
@chadham commented on GitHub (Feb 22, 2018):
Im sorry, but I don't understand the question.
If you are asking about the WifiManager version, its whatever you get when you download the library from the clone or download button.
@chadham commented on GitHub (Feb 22, 2018):
its 2.4.0
@tablatronix commented on GitHub (Feb 22, 2018):
k
@tablatronix commented on GitHub (Feb 22, 2018):
still cannot reproduce, works for me
@tablatronix commented on GitHub (Feb 22, 2018):
If you use arduino ide you can install esp exception decoder tool and decode that exception. Also erase with esptool.
Not sure what else to suggest
@chadham commented on GitHub (Feb 22, 2018):
Still happening. Here is the stack trace
I don't know who David is and why its trying to access /home/david/... right after MDNSResponder::_listen()
and the last Serial..println I get is after the MDNS.begin call
Any idea what to make of this..?
0x40218773: igmp_joingroup at /home/david/dev/esp8266/origin/tools/sdk/lwip2/builder/lwip2-src/src/core/ipv4/igmp.c line 570
0x40202542: MDNSResponder::_listen() at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396
0x40100690: free at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/umm_malloc/umm_malloc.c line 1737
0x4020af2c: operator delete(void*) at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/abi.cpp line 84
0x402037de: MDNSResponder::begin(char const*) at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396
0x402021a8: _M_manager at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396
0x40202664: operator() at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/libraries/ESP8266mDNS/ESP8266mDNS.cpp line 396
0x4020a394: Print::println(int, int) at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/Print.cpp line 87
0x40202110: setup at /Users/mchadha/Documents/Arduino/wifiandMDNStest/wifiandMDNStest.ino line 23
0x4020b038: loop_wrapper at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/core_esp8266_main.cpp line 57
0x40100710: cont_norm at /Users/mchadha/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.0/cores/esp8266/cont.S line 109
@tablatronix commented on GitHub (Feb 22, 2018):
Whats all that json stuff?
@chadham commented on GitHub (Feb 22, 2018):
Replaced test harness stack above
@tablatronix commented on GitHub (Feb 22, 2018):
This looks like an mdns error
@chadham commented on GitHub (Feb 22, 2018):
Interesting question is why it works if I hardcode the ssid and password and fails if I connect through wifimanager
Sent from my iPhone
@tablatronix commented on GitHub (Feb 22, 2018):
We use webserver and dnsserver, we switch mode several times?
Try making sure the wifi is at the right state or a known state, before starting mdns, set mode etc.
I think there is a mdns debug flag in the files.
Not entirely sure whats going on here, but that stack seems far from wifimanager.
Another thing you can try put wifimanager in a different scope.
@tablatronix commented on GitHub (Feb 22, 2018):
What lwip do you have selected in arduino?
@chadham commented on GitHub (Feb 22, 2018):
Thanks, let me try checking the state.
Should I not assume that wifimanager.Connect blocks until WiFi is successfully setup?
Ie do u wait for connection success confirm before returning?
Sent from my iPhone
@tablatronix commented on GitHub (Feb 22, 2018):
Master, Yes by default, development has a lot more features to choose
@tablatronix commented on GitHub (Feb 22, 2018):
Actually Lwip might only be an option in staging esp.
@chadham commented on GitHub (Feb 22, 2018):
I’ll check WiFi state once back at my computer but if you only release on successful connection, count if that’s what is causing it. Stay tuned.
Sent from my iPhone
@chadham commented on GitHub (Feb 22, 2018):
What is lwip and how do I check?
Sent from my iPhone
@tablatronix commented on GitHub (Feb 22, 2018):
Have you tried esptool erase ?
@chadham commented on GitHub (Feb 22, 2018):
No. You think it’s corruption in the flash? I tied two different esp’s, same issue.
Let me read up on esptool erase
Sent from my iPhone
@chadham commented on GitHub (Feb 22, 2018):
Looks complex .. a couple of quick questions..
appreciate any guidance
@chadham commented on GitHub (Feb 22, 2018):
iwi variant is V2 Prebuilt
@chadham commented on GitHub (Feb 22, 2018):
Checked and confirmed WiFi.Status() is reporting connected (3)
@tablatronix commented on GitHub (Feb 23, 2018):
Esptool just erases flash
Needs python
Esptool.py -p /dev/tty/... erase_flash
Upload fine after
@tablatronix commented on GitHub (Feb 23, 2018):
There are corruption bugs in 2.4.0
@chadham commented on GitHub (Feb 24, 2018):
issue remains after erase_flash....
Not sure what else to try here...
@tablatronix commented on GitHub (Feb 24, 2018):
maybe someone else will reproduce, I have not been able to.
I even added mdns to the development branch and it worked fine.
@tablatronix commented on GitHub (Feb 24, 2018):
do you get this on release as well?
https://github.com/tzapu/WiFiManager/releases/tag/0.12
@tablatronix commented on GitHub (Feb 24, 2018):
maybe post to esp issues and someone will know what those are.
lwip ieee80211_output_pbuf etc
@tablatronix commented on GitHub (Mar 14, 2018):
Is this still an issue?
@MarcFontaine commented on GitHub (Mar 14, 2018):
MDNS did not work for me with 2.4.0 and work with 2.4.1
@chadham commented on GitHub (Mar 14, 2018):
Yes :(
Sent from my iPhone
@tablatronix commented on GitHub (Mar 14, 2018):
Try 2.4.1 or staging maybe. Still not seeing this, could it be router specific?
@myk3y commented on GitHub (Apr 5, 2018):
Im getting the same Exception 28 with MDNS and WiFiManager - 2.4.0 and 2.4.1 using the Arduino IDE.
If I bypass WiFiManager and hard-code my wireless setup, works fine with the same code.
Might try PlatformIO.
@tablatronix commented on GitHub (Apr 5, 2018):
hmm sketch code?
@tablatronix commented on GitHub (Apr 5, 2018):
There are 1 or 2 known issues with esp32 I have found, I have implemented some workarounds in the library, are you seeing this with the latest commits from development branch ? , have you pulled recently ?
I suspect this is a race condition issue , which makes sense since wm exposes it, and normal use does not, since wm switches modes back and forth alot.
@myk3y commented on GitHub (Apr 6, 2018):
Not using an esp32 - esp12e based Wemos mini lite.
Remove wifimanager from the equation and the exact same code works perfectly
Regards,
Mike
@tablatronix commented on GitHub (Apr 6, 2018):
Sorry I meant esp8266