-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP crashes with {} in custom dashboard #3873
Comments
Hmm I just took a quick look at the function to handle the custom page. I will try to reproduce it here too with a debugger attached. It would be great to know if there are other builds between this quite large range of builds you tested to see where it may have been broken. |
It seems like the ESP is then entering some infinite loop. |
The deice reboots almost instantly. I have not tried it with serial port attached if some more details are visible. |
I tried your sample code on an ESP32 and it keeps "running" or at least is not rebooting. Also the ESP is no longer responsible until I reboot. I think it may be a bug in |
Yep the bug is in there. |
{} is just the simpliest example.
No crash:
|
Can you test the fix I made here? |
Well it fixes the crash for {} but also removes it from HTML code which is also valid for evrything inbetween for cases it used to crash.
Turns into
Code stays with removed whitespace at begining of line. Hard to tell which option is better. |
It is a simple fix to leave the {} in the text. |
Just pushed a new commit which should be the best of both world:
|
It works great, thanks a lot for super fast fix. |
Great! Will merge it now and it will be included in the next build. (hopefully tomorrow) |
[dashboard] Fix crash on parsing empty command {} (#3873)
Steps already tried...
.bin
files are included in the ZIP)Summarize of the problem/feature request
Device reboots if custom dashboard source file contains {}
Expected behavior
YOUR TEXT GOES HERE
Actual behavior
After upgrading to ESP_Easy_mega_20210802_normal_ESP8266_4M1M my custom dashboard stopped working and device resets when *.esp is accessed. Same results are with ESP_Easy_mega_20211105_normal_ESP8266_4M1M. It worked fine with ESP_Easy_mega-20200410_normal_ESP8266_4M1M and 20200801 release.
I tried to narrow down what part of my HTML code causes it. So far main issue seems to be related to curly braces but not all appearances. The simplies example that triggers the issue is below.
I have some javascript code in .esp files and this makes it impossible to use them.
Steps to reproduce
Upload file test.esp and access it http://ESP_IP/test.esp
Content of test.esp is below.
Rebooting or powering off produces same result.
System configuration
Rules and NTP enabled
Hardware: ESP12E
ESP Easy version: ESP_Easy_mega_20210802_normal_ESP8266_4M1M, ESP_Easy_mega_20211105_normal_ESP8266_4M1M
Rules or log data
The text was updated successfully, but these errors were encountered: