As the title says... Chat on...

User avatar
By Rocco
#19744 I've been work with my esp-07 for a little while, making good progress in my project when all of a sudden, I'm no longer able to alter any of the files, add or delete files. All of the files are still there, I can read them, they execute properly, I just can't make any changes. What's happened? I've tried everything I can think of to resolve the problem, short of reflashing NodeMCU and reloading the files. How do I fix this?.
User avatar
By TerryE
#19757 you should always keep a master copy on your dev system, prefereably in Git or the equivalent and backed up somewher -- e.g. into Gihub if you don't mind your code being publicly accessible.

Also what does file.fsinfo() say?

But I wouldn't reflash your system. Have you tried doing a file.format()?
User avatar
By Rocco
#19769 Too late, I got frustrated, so I backed up everything, reflashed and reload from the backup, everything works as it should now. Nevertheless, I'd still like to know what happened, why and how to avoid it or deal with it in the future. BTW, here's my code : https://github.com/rocco86/esp_gpio_toggle
User avatar
By cal
#19797 Moin,

the file system of nodemcu is spiffs. It is"just" some c code that implements file handling behavior on top
of raw byte blocks in the flash. It has to manage information about free space, names, blocks of files making up the fs.
If some bug in sdk, nodemcu, spiffs damages that metadata everything can happen.
If it ever happens again the author may be interested in the raw contents of the underlying flash to
check for probable bugs.
Current version of spiffs seems to be 0.3.0.

Cal