Skip to content

Stream read time out Error #2049

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

Closed
saaske opened this issue Nov 11, 2018 · 6 comments
Closed

Stream read time out Error #2049

saaske opened this issue Nov 11, 2018 · 6 comments
Labels
Status: Stale Issue is stale stage (outdated/stuck)

Comments

@saaske
Copy link

saaske commented Nov 11, 2018

Hardware:

Board: ESP32 Dev Module
IDE name: Arduino IDE
Flash Frequency: 80Mhz
Upload Speed: 115200?
Computer OS: Windows 10
Core Version 3.2

Got 948448 bytes from server
[D][Updater.cpp:129] begin(): OTA Partition: app0
Begin OTA. This may take a few mins to complete.
Written only : 148899/948448. Retry?
heap memory --283768
Error Occurred. Error #: 6

when I try to do OTA from amazon S3 it fails most of the time. I tried increasing the timeout to 3sec but no use.

@Jeroen88
Copy link
Contributor

My PR #1979 solves timeout issues, most probably yours too.

@saaske
Copy link
Author

saaske commented Nov 12, 2018

@Jeroen88 I pulled your code and tried running it but it still fails.

[V][HTTPClient.cpp:1072] handleHeaderResponse(): RX: 'Accept-Ranges: bytes'
[V][HTTPClient.cpp:1072] handleHeaderResponse(): RX: 'Content-Type: application/octet-stream'
[V][HTTPClient.cpp:1072] handleHeaderResponse(): RX: 'Content-Length: 948448'
[V][HTTPClient.cpp:1072] handleHeaderResponse(): RX: 'Server: AmazonS3'
[V][HTTPClient.cpp:1072] handleHeaderResponse(): RX: 'Connection: close'
[V][HTTPClient.cpp:1072] handleHeaderResponse(): RX: ''
[D][HTTPClient.cpp:1102] handleHeaderResponse(): code: 200
[D][HTTPClient.cpp:1105] handleHeaderResponse(): size: 948448
[D][HTTPUpdate.cpp:176] handleUpdate(): Header read fin.
[D][HTTPUpdate.cpp:177] handleUpdate(): Server header:
[D][HTTPUpdate.cpp:178] handleUpdate():  - code: 200
[D][HTTPUpdate.cpp:179] handleUpdate():  - len: 948448
[D][HTTPUpdate.cpp:185] handleUpdate(): ESP32 info:
[D][HTTPUpdate.cpp:229] handleUpdate(): runUpdate flash...
[D][Updater.cpp:136] begin(): OTA Partition: app1
[E][HTTPUpdate.cpp:339] runUpdate(): Update.writeStream failed! (Stream Read Timeout)
[E][HTTPUpdate.cpp:275] handleUpdate(): Update failed
[D][HTTPClient.cpp:358] disconnect(): tcp stop

@Jeroen88
Copy link
Contributor

Jeroen88 commented Nov 12, 2018

Maybe if you try to declare a HTTPUpdate myHttpUpdate(15000) yourself and use that? The default timeout is 8000.
If you call setLedPin(int ledPin = -1, uint8_t ledOn = HIGH) before starting the update (with the right LED pin), the led will start flashing during the update. It should flash regularly: it is on while reading a buffer from the server and off during writing a buffer to flash. This might give you a clue what is going on.

@cyberman54
Copy link
Contributor

I had similar problem and can confirm that the new Updater.cpp code solved the issue of disrupted writes streams. Be sure to set Timeout on your data stream (e.g. Wifi client) before starting OTA.

@stale
Copy link

stale bot commented Aug 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 1, 2019
@stale
Copy link

stale bot commented Aug 15, 2019

This stale issue has been automatically closed. Thank you for your contributions.

@stale stale bot closed this as completed Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Stale Issue is stale stage (outdated/stuck)
Projects
None yet
Development

No branches or pull requests

3 participants