I've recently encountered this problem, in which I sometimes try to save some data (come configurations, no more than 100 characters in total) in a file using this function fs.writeFile(), but after like 2 or 3 tries, it just stop working, and the function returns false every time...
I also tried to use the E.openFile() and File.close() pattern, but sadly I'm getting the same results. Does anyone else have this problem? I'm using firmware version 1.95 btw
Hmm, 1.95 is old, better upgrade and try again.
Same issue in 2.14. I think the filesystem just crashes silently if there are is not enough heap or too few variables.
A webserver serving multiple files in parallel can crash the filesystem, or a webserver and some other background processes can lead to a crash (using E.pipe).
It doesn't crash by repeated read access, if there's a sufficient free memory available. Storage is much more stable (require('Storage')).
Disclaimer: My experience comes from the ESP8266 with a custom firmware build. Yet, I'm pretty sure there are some undiscovered bugs in the filesystem (require('fs')).
I only use Storage. Can you add a sample to reproduce the crash, or just add infos to https://github.com/espruino/Espruino/issues/1777
Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.
For a full reference visit the Markdown syntax.
© Espruino, powered by microcosm.
Report a problem