Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload Filesystem Image OTA fails #8875

Closed
4 of 6 tasks
imsunburnt opened this issue Mar 1, 2023 · 1 comment
Closed
4 of 6 tasks

Upload Filesystem Image OTA fails #8875

imsunburnt opened this issue Mar 1, 2023 · 1 comment

Comments

@imsunburnt
Copy link

imsunburnt commented Mar 1, 2023

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: [other]
  • Core Version: [ ]
  • Development Env: [Platformio]
  • Operating System: [Windows]

Settings in IDE

  • Module: [d1_mini]
  • Flash Mode: [ ]
  • Flash Size: [4MB]
  • lwip Variant: [ ]
  • Reset Method: [ ]
  • Flash Frequency: [ ]
  • CPU Frequency: [ ]
  • Upload Using: [OTA]
  • Upload Speed: [ ] (OTA)

Problem Description

Upload Filesystem Image OTA fails in this version of Visual Studio Code that is targeting ESP8266 d1_mini.
Also, I have v3.0.0 of PlatformIO IDE extension installed.

Version: 1.75.1 (user setup)
Commit: 441438abd1ac652551dbe4d408dfcec8a499b8bf
Date: 2023-02-08T21:32:34.589Z
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: No

Output:

Executing task in folder ttp223-contact-switch: C:\Users\dave.platformio\penv\Scripts\platformio.exe run --target uploadfsota --environment d1_mini
...
Uploading .pio\build\d1_mini\spiffs.bin
21:29:49 [DEBUG]: Options: {'esp_ip': 'ttp223-contact-switch-2.local', 'host_ip': '0.0.0.0', 'esp_port': 8266, 'host_port': 52751, 'auth': '', 'image': '.pio\build\d1_mini\spiffs.bin', 'spiffs': False, 'debug': True, 'progress': True}

Note the setting: 'spiffs': False

My platformio.ini file:

[platformio]
hostname = ttp223-contact-switch

[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
monitor_speed = 115200
upload_speed = 921600
build_flags = '-D HOSTNAME="${platformio.hostname}"' '-D MDNSNAME="${platformio.hostname}"' '-D OTANAME="${platformio.hostname}"'
monitor_port = COM[3]
upload_port = ${platformio.hostname}.local
upload_protocol = espota

The command Upload Filesystem Image does work fine and uploads using OTA.

Debug Messages

Executing task in folder ttp223-contact-switch: C:\Users\dave\.platformio\penv\Scripts\platformio.exe run --target uploadfsota --environment d1_mini 

Warning! Ignore unknown configuration option `hostname` in section [platformio]
Processing d1_mini (platform: espressif8266; board: d1_mini; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/d1_mini.html
PLATFORM: Espressif 8266 (4.0.1) > WeMos D1 R2 and mini
HARDWARE: ESP8266 80MHz, 80KB RAM, 4MB Flash
PACKAGES:
 - framework-arduinoespressif8266 @ 3.30002.0 (3.0.2)
 - tool-esptool @ 1.413.0 (4.13)
 - tool-esptoolpy @ 1.30000.201119 (3.0.0)
 - tool-mklittlefs @ 1.203.210628 (2.3)
 - tool-mkspiffs @ 1.200.0 (2.0)
 - toolchain-xtensa @ 2.100300.210717 (10.3.0)
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 48 compatible libraries
Scanning dependencies...
Dependency Graph
|-- ArduinoOTA @ 1.0
|   |-- ESP8266WiFi @ 1.0    
|   |-- ESP8266mDNS @ 1.2    
|   |   |-- ESP8266WiFi @ 1.0
|-- ESP8266HTTPClient @ 1.2  
|   |-- ESP8266WiFi @ 1.0    
|-- ESP8266mDNS @ 1.2        
|   |-- ESP8266WiFi @ 1.0    
|-- ESP8266WebServer @ 1.0   
|   |-- ESP8266WiFi @ 1.0    
|-- ESP8266WiFi @ 1.0        
|-- NTPClient @ 3.1.0        
|-- Time @ 1.6
|-- WebSockets @ 2.3.7       
|   |-- Hash @ 1.0
|   |-- ESP8266WiFi @ 1.0    
|   |-- Ethernet @ 2.0.0     
|   |   |-- SPI @ 1.0        
|   |-- SPI @ 1.0
Building in release mode
Building file system image from 'data' directory to .pio\build\d1_mini\spiffs.bin
/dave.js
/favicon.ico
/index.html
/main.css
/manifest.json
/success.html
/upload.html
Uploading .pio\build\d1_mini\spiffs.bin
21:29:49 [DEBUG]: Options: {'esp_ip': 'ttp223-contact-switch-2.local', 'host_ip': '0.0.0.0', 'esp_port': 8266, 'host_port': 52751, 'auth': '', 'image': '.pio\\build\\d1_mini\\spiffs.bin', 'spiffs': False, 'debug': True, 'progress': True}
21:29:49 [INFO]: Starting on 0.0.0.0:52751
21:29:49 [INFO]: Upload size: 1024000
21:29:49 [INFO]: Sending invitation to: ttp223-contact-switch-2.local
21:29:50 [INFO]: Waiting for device...

Uploading: [                                                            ] 0% 
Uploading: [                                                            ] 0%
Uploading: [                                                            ] 0% 
Uploading: [                                                            ] 0%
Uploading: [                                                            ] 0% 
Uploading: [                                                            ] 0% 
Uploading: [=                                                           ] 0% 
...
Uploading: [============================================================] 100% Done...


21:30:07 [INFO]: Waiting for result...

21:30:07 [ERROR]: ERROR[10]:
*** [uploadfsota] Error 1
==================================================================== [FAILED] Took 18.37 seconds ====================================================================
 *  The terminal process "C:\Users\dave\.platformio\penv\Scripts\platformio.exe 'run', '--target', 'uploadfsota', '--environment', 'd1_mini'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

@mcspr
Copy link
Collaborator

mcspr commented Mar 20, 2023

-> platformio/platform-espressif8266#294

biggest clue is this

'spiffs': False

espota.py has to have -s switch for FS uploads, but only uploadfs target appends it
https://github.com/platformio/platform-espressif8266/blob/05c070e9fbf9c6163761cc3d77faa88c0c77055b/builder/main.py#L311

(which uploadfsota should probably mirror, but looks like some legacy code snuck in while updating to upload protocols option)

@mcspr mcspr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants