I’m trying to build and upload data folder files but I got error while building image.
error is written below which I see in my serial monitor.
Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: Redirecting...
PLATFORM: Espressif 32 (6.0.0) > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20006.221224 (2.0.6)
- tool-esptoolpy @ 1.40400.0 (4.4.0)
- tool-mkspiffs @ 2.230.0 (2.30)
- toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 40 compatible libraries
Scanning dependencies…
Dependency Graph
|-- WebSockets @ 2.3.7
|-- ArduinoJson @ 6.21.0
|-- ESP Async WebServer @ 1.2.3+sha.f71e3d4
|-- ESPAsyncWebServer-esphome @ 3.0.0
|-- EEPROM @ 2.0.0
|-- SPIFFS @ 2.0.0
|-- WiFi @ 2.0.0
Building in release mode
Building FS image from ‘data’ directory to .pio\build\esp32doit-devkit-v1\spiffs.bin
/favicon.png
/index.html
/logo.svg
/robots.txt
/_app/immutable/assets/_layout.0e6de7f8.css
/_app/immutable/chunks/0.ddfa57f2.mjs
SPIFFS_write error(-10010): unknown
/_app/immutable/entry/app.04751647.mjs
/_app/version.json
error adding file!
Error for adding content from assets!
SPIFFS_write error(-10010): unknown
error adding file!
Error for adding content from chunks!
SPIFFS_write error(-10010): unknown
error adding file!
Error for adding content from entry!
Thanks but this is auto generated files with svelte kit so if i modify file name webpage will not load properly
The other path of allowing longer filenames is harder to achieve, you’d have to fork the Arduino-ESP32 core, possible recompiling the ESP-IDF base with a configuration change and the mkspiffs tool.
Maybe LitteFS has different limitations? Try that filesystem instead
https://docs.platformio.org/en/latest/platforms/espressif32.html#uploading-files-to-file-system
yes LittleFS can create filesystem image but the problem is when i load my webpage normally in esp32 AP mode at time esp32 get panic but when I load page by using slow 3G mode (Chrome DEV tool) at time webpage load fine.
here it’s setup code for webpage,
Serial.begin(115200);
WiFi.softAP("Motor_Test", "123456789"); // AP mode init
memory_init();
Serial.println("softap");
Serial.println("");
Serial.println(WiFi.softAPIP());
// file system init for sending files to webserver.
LittleFS.begin();
if (!LittleFS.begin())
{
Serial.println("An error occurred while mounting SPIFFS");
return;
}
// Serve the index.html files from SPIFFS
webServer.on("/", HTTP_GET, [](AsyncWebServerRequest *request)
{ request->send(LittleFS, "/index.html", "text/html"); });
// webserver loop for sending multiple files from one specific folder
webServer.on("/_app/immutable/assets", HTTP_GET, [](AsyncWebServerRequest *request)
{
String path = request->url();
if (path.endsWith(".html"))
{
request->send(LittleFS, path, "text/html");
}
else if (path.endsWith(".mjs"))
{
request->send(LittleFS, path, "text/javascript");
}
else if (path.endsWith(".css"))
{
request->send(LittleFS, path, "text/css");
}
else
{
request->send(404);
} });
webServer.on("/_app/immutable/entry", HTTP_GET, [](AsyncWebServerRequest *request)
{
String path = request->url();
if (path.endsWith(".html"))
{
request->send(LittleFS, path, "text/html");
}
else if (path.endsWith(".mjs"))
{
request->send(LittleFS, path, "text/javascript");
}
else if (path.endsWith(".css"))
{
request->send(LittleFS, path, "text/css");
}
else
{
request->send(404);
} });
webServer.on("/_app/immutable/chunks", HTTP_GET, [](AsyncWebServerRequest *request)
{
String path = request->url();
if (path.endsWith(".html"))
{
request->send(LittleFS, path, "text/html");
}
else if (path.endsWith(".mjs"))
{
request->send(LittleFS, path, "text/javascript");
}
else if (path.endsWith(".css"))
{
request->send(LittleFS, path, "text/css");
}
else
{
request->send(404);
} });
webServer.begin();
I’m afraid that’s a different issue. If you can reproduce it with the standard examples of the library, try contacting the library’s author.