[SOLVED] ESP8266 SPIFFS Upload Failed; Timed out waiting for packet header

Hi everyone,

I'm trying to setup an Adafruit HUZZAH ESP8266 breakout board with the ESP8266-FastLED-IoT-Webserver project. I've managed to follow the steps through step 3.1, where the software is uploaded to the board. The upload seems to work, however when I attempt the next step to upload the sketch data, I get the following error:

Connecting........_____....._____....._____....._____....._____....._____....._____
Traceback (most recent call last):
  File "C:\Users\Mark\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\3.0.2\tools\upload.py", line 66, in <module>
    esptool.main(cmdline)
  File "C:/Users/Mark/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool\esptool.py", line 3552, in main
    esp.connect(args.before, args.connect_attempts)
  File "C:/Users/Mark/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/3.0.2/tools/esptool\esptool.py", line 529, in connect
    raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
SPIFFS Upload failed!

I've been searching online for a fix, however fix I've attempted hasn't made it past this step. So far, I've tried the following:

  • Verified I'm using the correct serial port (COM4, which is only present while my board is connected to my computer via USB)
  • Change the esp8266 package version in Boards Manager (I've tried 3.0.2, 3.0.0, 2.7.2, 2.6.2, 2.5.2, and 2.5.0)
  • Re-installed the esp8266fs.jar file in the sketchbook tools, making sure to use the 0.5.0 version
  • Verified my python version (3.7.2)

I'm not finding many other options online, so I'm hoping someone here will be able to suggest another option. Any suggestions will be greatly appreciated.

Your topic was MOVED to its current forum category as it is more suitable than the original as it has noting to do with installation and troubleshooting of the IDE

I think it has to do with IDE (if the esptool to upload programs is seen as part of IDE.

What is your setup? Windows, mac?
Were you able to do uploads before without trouble?
What has changed since then?
Can you upload to other types of board like UNO?
Do you have a full USB cable (not one that can only charge)?

I have mac M1 and the only way to do uploads to esp is via such a thing:
https://www.coolblue.nl/product/834949/satechi-type-c-slim-multi-port-adapter-v2-grijs.html?cmt=c_a%2Ccid_16566003723%2Caid_135260091020%2Ctid_aud-1676968687670%3Apla-305226560772%2Cgn_g%2Cd_m&utm_source=google&utm_medium=cpc&utm_content=shopping&gclid=EAIaIQobChMI0uWBgefY-QIVkOF3Ch1WEwlPEAQYCyABEgI2IfD_BwE
Pretty expensive thingy to add pretty basic port facility to pretty expensive laptop...

  • I'm running on Windows 10.0.19043.
  • I've been able to do code uploads just fine, but I haven't attempted sketch data uploads before (I'm relatively new to arduino programming)
  • I have not tried on other board types
  • I'm using this USB cable, and have double checked that the pinouts are connected correctly

I work with another type of uploader (it uploads program and data in one go).
Did you reserve SPIFF space on the ESP?
In my version you need to set the size of the SPIFF.
Can you get a program that does not use SPIFF to work (i.e. a hello world or blink program).
I hope someone else has experience with your method and can get you further..

Yes, I've managed to get both a hello world and a blink test working.

I'll look into other uploaders and reserved SPIFF space. Thank you for the suggestions and help, I'll keep this thread updated if I find something

I managed to find a solution to this. Turns out, the data uploader I was using requires resetting the device and putting it back into bootloader mode between uploading the sketch and uploading the data. Didn't see anywhere mention this until I stumbled across a note halfway down on this page

Thanks for sharing your solution. This type of problems can be very annoying...