-
Notifications
You must be signed in to change notification settings - Fork 89
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
SPIFFS randomly corrupted #87
Comments
I have seen this (or something related). After a number of updates to the config file using the HTTP UI I get to the point where the it can not be accessed for Read or Write. Only option is to re flash the M5 using the USB port. |
Moin Sieren, Schonmal in Betracht gezogen das SPIFFS selber der Verursacher sein könnte? |
Hi' @sieren Issue with occasional corrupt SPIFFS still persists I'm afraid. Issue can't be resolved with an OTA update but can only be recovered with a complete serial reflash. Ciao ! |
Thanks for checking, but yeah, sadly no news on that front. I'm afraid it's in the SPIFFS implementation itself and unrelated to Homepoint. |
Hi' @sieren There's definitely an issue with SPIFFS in HomePoint. Tried to upload my icon pack via web interface and it dies uploading file no. 12. So I tend more to believe that it's some sort of partition size issue, rather than an issue with repeated writes to eg. config.json Has released binary files by accident been compiled with some strange ultra, minimum SPIFFS partition scheme ? |
Just wanted to confirm I see similar behaviour on an M5Stack Core. Have had file uploads be refused, have had config not being written and have had config getting corrupted at different times. I sometimes see a 500 error with no descriptive text. My suspicion was also partition size, but not that alone as after reflash using USB and uploading the exact same files and writing the same config it will succeed. I was thinking it might be storing some version history, hence it running out after doing a bunch of things, not immediately. |
LittleFS will make it into ESP-IDF v4.2, but sadly the underlying Arduino Library doesn't support it yet. |
Hi' Matt. Yes, that would really make a huge improvement to replace SPIFFS. Ciao ! |
I just encountered this too after messing with some settings that I had a corrupted config.json it seems... |
It should be possible...at least when using the raw project you can update the spiffs bin with Your Arduino project needs to know where to upload the data. That's defined in the partition scheme ( |
reading up on this it seems that it's not that straight forward to have that partition layout handed to arduino IDE... I guess it requires creating a new board definition specifically with your partitions.csv layout ... darn why can't stuff be simpler :) |
ok messing around with mkspiffs ... I saw in your partitions.csv the spiffs is 500kB ? error adding file! error adding file! While it should fit according to this logic: so not sure what I am doing wrong there... googles on |
so after a bit more searching: spiffs by default use 4k block ... |
oh you may be onto something.. maybe this is the reason for the corruptions all along?? |
just wondering how you got all the data there in the end :/ |
This is really great info! We might be onto something here. It seems I need to create per-device SPIFFS Partition Schemes too, some ESP32 devices only support 4MB, others like the M5Stack are made for up to 16MB. But it looks like there was still some space to bump up the SPIFFS partition. I've attached a special build that remedies this. It'd be great if you could test it and report back. Mind you this requires a hard flash through USB with the |
Did not really find how to trigger it yet still trying with the current release v0.07.2 Now just flashed your above release... |
Hi' Sieren. Sorry about the extremely late reply. I've been quite busy at work last 14 days. I'll leave it active for a few days and see if i can crash this Home Point version abusing spiffs 😉 Ciao ! |
running it for a solid week now without problems... but then again since I didn't mess with it much I can't really say if its now gone :) |
Cool, sounds promising so far. Maybe once you had a chance to mess with it a bit more, let me know. Otherwise I'll roll this changes into the next update |
Leaving open for now |
Can't kill it, Matt !😉 Has been running stable and without any issues - loading files or otherwise. Ciao ! |
I today played a lot with the config, copy - pasting other configs and reloading... that's what trashed mine before, but this version has been running fine for 18 days now... |
I was just bitten by this, and since wifi is on the config, it's "bricked", have to reflash. I would suggest 2 features to solve this:
|
Using the version attached to this issue a few comments back? The fix hasn't been rolled into a main release yet |
No, I used the latest version, didn't saw that attachment. Will try that and see how it goes. |
Is the file attached to the Feb 24th post the latest? My core 2 seems unstable (though no space problems so far), it keeps restarting and has trouble connecting to the wifi, once it has connected it sometimes reboots or turns off on a click. |
I flashed 2 hours ago and so far so good 😄 |
so far been messing with it quite a bit ... not seen the spiffs corruption issue with the version attached to this thread... (did not get it corrupted despite rewriting a bunch of times the configs, adding a couple of extra icons etc...) |
Hi @sieren absolutely love this, I got it all running without any issues at first, but I've noticed that I experience this problem (cannot edit/create files) after I upload a new icon file. I've created two JPG files both 50px x 50px called Any advance on how to resolve this issue? Happy to try and help with it although my knowledge is probably nowhere near yours on this... Thank you |
Are you sure it's always the case that you can't edit it? I have a number of images I created. I upload them one after another after a fresh install, then edit my config (copy-paste) and then it's usually fine. If I have to edit the config again later I sometimes that it loads partially and I can't seem to save it again. If that happens I reset: do a fresh install and start from scratch. I believe the new code is very different, I tried it on my core2, but unfortunately I couldn't get creating my own images to work. I did not see the same issue with the config.json though. |
Maybe it helps reproducing this issue: on my M5 Stack, I entered a german letter, "ß" in the config.json-file as a name, e.g.
After I saw the message "Configuration invalid! Login via browser Could not Parse config file", it was not possible to edit the config-file. After some minutes, it was completely empty. I have reflashed the M5 Stack to get back to a working system again. |
Its a long shot.. might this be related to NTP & DHCP options? I dont have the serial log at this point, but I had a lot of NTP retry 1 - 10 errors, and also a set time error on the file system while updating config.json |
Occasionally SPIFFS gets corrupted in failsafe (or otherwise), resulting in files unable to be edited or created (deleting however always works).
Often files are only "half" written during save and afterwards cannot be overwritten properly.
Currently no steps to reproduce, seems random.
Only "fix" is to reflash the bin partition.
The text was updated successfully, but these errors were encountered: