• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Build Web Servers – example 1.2 webserver from SPIFFS – no web page

Q&A Forum › Category: ESP32 › Build Web Servers – example 1.2 webserver from SPIFFS – no web page
0 Vote Up Vote Down
Darryl Withnall asked 4 months ago

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:
[env:esp32dev]
platform = espressif32@3.5.0
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps = https://github.com/me-no-dev/ESPAsyncWebServer.git

7 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 4 months ago

Hi.
 
The files were probably not uploaded to the ESP332 filesystem.
You can open the JavaScript console on the browser and check if there are any errors.
 
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.
Regards,
Sara
 
 

0 Vote Up Vote Down
Darryl Withnall answered 4 months ago

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.

0 Vote Up Vote Down
Darryl Withnall answered 4 months ago

Starting a new project seems to have done the trick.

0 Vote Up Vote Down
Sara Santos Staff answered 4 months ago

That’s great.
I’ll mark this issue as resolved. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

0 Vote Up Vote Down
Ydalir answered 4 months ago

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

0 Vote Up Vote Down
Darryl Withnall answered 4 months ago

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.

0 Vote Up Vote Down
Sara Santos Staff answered 4 months ago

Hi Ydalir.
You may need to hard reset your web browser after loading a new HTML file on the same board because of browser cache.

You also need to reset your board.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.