This example project now compiles and uploads after platformio.ini tweaks. The html/css image builds and seems to upload ok, but getting 404 (page not found) error on page. Previous web server example (1.1 no SPIFFS) worked fine.
OS – Win11
editor/programmer – VS Code/PlatformIO
My platformio.ini file:
platform = firstname.lastname@example.org
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git
The files were probably not uploaded to the ESP332 filesystem.
Please make sure you follow all the instructions carefully because you’ve probably missed one of the steps.
Let me know if you were able to solve it or if you need further help.
Thanks for the reply Sara, I had a few problems initially, with compiling/building the project using the default platformio.ini setting from the book. The settings I posted above, compiles without errors. I will start a new project with working
ESPAsyncWebServer settings from the start, and see how I go.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Hi Sara and Folks,
I had the very same problem this week, using slightly different code, in the end stripped down to the bare necessary code. On the phone I got a “404” and on the PC the browser window was “black”. I went here to ask and found this post.
With the html file I uploaded a text file, which was accessible by the code. So the hint on “no file on SPIFFS uploaded” seemed not to fit here.
I inserted code to check whether the html file is available:
SPIFFS.exist("/index.html") and as a fact “index.html” did not show up.
I KNEW that the file package spiffs.bin was uploaded quite correctly AND I tested the index.html directly in a browser being functional.
The solution was to RENAME the html file (I think the actual name doesn’t matter) from index.html and build and upload the spiffs.bin again (besides adapting the sketch to fit the new file name) and behold, the file was available and the web page showed up on the mobile and the PC.
I am coding C++ for ESP32 using VSCode and PlatformIO
Ydalir, I have since gone on to the other chapters in the book, and have experienced failed program, and file image uploads a couple of times after VS Code is first opened. After the first fail, subsequent build/uploads work ok.