me-no-dev / arduino-esp32fs-plugin

Arduino plugin for uploading files to ESP32 file system
GNU General Public License v2.0
544 stars 144 forks source link

SPIFFS_write error(-10010): unknown #3

Closed vyruz1986 closed 6 years ago

vyruz1986 commented 6 years ago

Thanks so much for releasing this tool, I was waiting on this to continue work on my project (FlyballETS)

I have made an angular v5 web app using Angular-CLI which needs to go on the SPIFFS filesystem. The angular-cli build generates the necessary files for production use. I have uploaded a data.zip file containing the output of this production build: Link

When I put the contents of this zip file in a /data/ folder of my arduino sketch and run the ESP32 Sketch Data Upload, I get the following error:

[SPIFFS] data   : C:\Users\alexg\OneDrive\Projects\FlyballETS-Software\data
[SPIFFS] start  : 2691072
[SPIFFS] size   : 1468
[SPIFFS] page   : 256
[SPIFFS] block  : 4096
/3rdpartylicenses.txt
/assets/mdi.svg
/favicon.ico
/glyphicons-halflings-regular.448c34a56d699c29117a.woff2

SPIFFS_write error(-10010): unknown
error adding file!
SPIFFS Create Failed!

I did some testing and it seems the file name length is the problem, I tried just uploading one file from the package and then started renaming it using trial and error:

NOK : inline.a44fd682ff3096930d6e.bundle.js
OK  : inline.a44fd6823693.bundle.js
OK  : inline.a44fd68236933.bundle.js
NOK : inline.a44fd682369333.bundle.js

The 3rd line is 30 characters, 4th line is 31 chars.

me-no-dev commented 6 years ago

Yup :) SPIFFS file names can be 32 bytes max (including starting slash and zero at the end). This is a known limitation :)

vyruz1986 commented 6 years ago

Thanks for clarifying. Better return error from the tool would be a nice improvement though 🙂

On Tue, Oct 17, 2017, 02:11 Me No Dev notifications@github.com wrote:

Closed #3 https://github.com/me-no-dev/arduino-esp32fs-plugin/issues/3.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/me-no-dev/arduino-esp32fs-plugin/issues/3#event-1295913325, or mute the thread https://github.com/notifications/unsubscribe-auth/ADc9M8OCovBbusg9Oige5z0pic-Zz8ejks5ss_C3gaJpZM4P7NCY .