- Notifications
You must be signed in to change notification settings - Fork7.8k
Update HTTPUpdateServer.h to Fix SPIFFS Update error: Bad Size Given#11586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
if (!Update.begin(SPIFFS.totalBytes(), U_SPIFFS)) { throws an error "Update error: Bad Size Given". Changing to if (!Update.begin(UPDATE_SIZE_UNKNOWN, U_SPIFFS)) {fixesespressif#9967CLAassistant commentedJul 11, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
github-actionsbot commentedJul 11, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
👋Hello kapyaar, we appreciate your contribution to this project! 📘 Please review the project'sContributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you haveread and signed theContributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Jason2866 commentedJul 13, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@me-no-dev is it planned to replace the dead horse spiffs with LittleFS in HTTPUpdateServer? |
me-no-dev commentedJul 14, 2025
Actually here the size of the FS partition should be read and used. Code can be abstracted to flash any FS type, instead of just SPIFFS |
kapyaar commentedJul 14, 2025
If there is a better approach to handle this, Please update or let me know, I can do another PR. One way or the other, It would be great to get this fixed, as at this point, with each release (for backward compatibility), a manual update of this file is the only way out. |
Removed SPIFFS.h include from HTTPUpdateServer.h
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
54154c7 intoespressif:masterUh oh!
There was an error while loading.Please reload this page.
me-no-dev commentedSep 16, 2025
Sorry for the delay! Will be part of 3.3.1 tomorrrow |
if (!Update.begin(SPIFFS.totalBytes(), U_SPIFFS)) {
throws an error "Update error: Bad Size Given". Changing to
if (!Update.begin(UPDATE_SIZE_UNKNOWN, U_SPIFFS)) {
fixes#9967. Submitting a PR as per#9967 (comment)