async-esp-fs-webserver icon indicating copy to clipboard operation
async-esp-fs-webserver copied to clipboard

Lot of config.json file corruption >> 0 byte (when flashing new program)

Open GregAscolab opened this issue 1 year ago • 1 comments

I notice a corruption of the config.json file very often when I flash a new firmware during my software development... Its about every 2 or 3 times...

I loose the content of the config.json file : File is "empty" : 0 bytes
So impossible to load options, and the file is not automatically recreated...

I don't know why... I take care to always close() the file or use it as readonly...

  1. I just asking myself if I'm the only one ???
  2. It seems to me it could come from recent update...

If someone has similiar experience, feel free to answer ;-)

GregAscolab avatar May 23 '24 13:05 GregAscolab

Hi all,

I still have this trouble very often. I notice that it suffisant for me to reset my device couple of times (2 or 3 times) and then the config.json file is corrupted.

0:00:00:00.0154 D system  FS partition: 36864/1179648 = 3%
0:00:00:00.0154 W system  Listing directory: /
0:00:00:00.0159 W system  Listing directory: /config
0:00:00:00.0176 W system  |__ FILE: config.json (0 bytes)

I try to debug access to this file without success for the moment. I use LittleFS filesystem, I don't know if it can be linked... I'm very surprise because I only open/read the options at startup, then I don't update or write to the file after. I'm asking myself also if my other part of code could write to the partition (bug pointer...) but this seems strange to me...

If anybody had already get this trouble here or in other project, I will be gratefull to get some clues or ideas. Thanks.

GregAscolab avatar Sep 05 '24 07:09 GregAscolab