Fail to Upload File System

I get the following error on all of my projects now when trying to Upload File System image from the PlatformIO Project Tasks toolbar. This happens on every project I have.

To test, I created a new project, created a data directory, and tried it with that clean project. I still get the following error (same with alll my projects):

Executing task: C:\Users\lee\.platformio\penv\Scripts\platformio.exe run --target uploadfs <

Processing d1_mini (platform: espressif8266; board: d1_mini; framework: arduino)

Verbose mode can be enabled via `-v, --verbose` option
PLATFORM: Espressif 8266 2.3.3 > WeMos D1 R2 and mini
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
 - framework-arduinoespressif8266 3.20603.200130 (2.6.3)
 - tool-esptool 1.413.0 (4.13)
 - tool-esptoolpy 1.20800.0 (2.8.0)
 - tool-mkspiffs 1.200.0 (2.0)
 - toolchain-xtensa 2.40802.191122 (4.8.2)
LDF: Library Dependency Finder ->
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 29 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Building SPIFFS image from 'data' directory to .pio\build\d1_mini\spiffs.bin
error: failed to open image file
*** [.pio\build\d1_mini\spiffs.bin] Error 1
======================================================================================== [FAILED] Took 0.72 seconds ========================================================================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

I recently uninstalled and reinstalled PIO and since then it’s not worked.

I have tried touching a small file in the data directory, erasing flash, etc… No change.

  • Windows 10
  • VSCode

And, freaking antivirus. :slight_smile:


I take it your AV was having a freak out and blocking the executable responsible for creating the SPIFFS image? I found out the hard way… don’t leave your PlatformIO projects directory in the standard Documents folder if you use Bitdefender 2020, as it’s anti-ransomware module protects access to your Documents folder with the utmost ruthlessness… and makes it so you need to allow every single executable in the toolchain… one by one! :man_facepalming:

Exactly that - I have Bitdefender as well.

I am used to going through that iterative process to “whitelist” all of the executables when it does block during compilation. This time it did not happen, however - I was not prompted so I did not think it was the AV. What I ended up doing was turning off the “Safe Files” feature, removing all the whitelisted executables, and then turning it back on again whereupon I went through the whitelisting process again.

It sure would be nice if we could whitelist all of the executables in a directory.

Having my projects in “Documents” is a bit of a pain as you point out, but I use a cloud provider as one of my backup and versioning methods. So, it’s less of a pain than to lose everything, I suppose. It also lets me develop on two separate systems without an interim version control system. Those are great, but if I forget to commit, I’d not have access to what was done. Yes, that makes me a bad developer - not doing regular commits. :slight_smile:

1 Like

Nothing wrong with having cloud sync AND git commits. :wink: I have a separate ‘Projects’ directory, and use Syncthing to keep my systems in sync. As well as a self-hosted Gitea for version control of different projects.

Yeah, being able to white-list a directory would be good! :confused:

I found white-listing one by one too much of a pain, as I use multiple architectures, and sometimes specific versions for different projects, so it was getting to be a pretty long and convoluted whitelist process… hence the separate Projects directory.

Oh these are projects I have on GitHub - I am just a horrible person and do not commit daily. :slight_smile:
I’ll have a look at those tools though - they might fit in well with some of my other stuff.

1 Like