-
Notifications
You must be signed in to change notification settings - Fork 13.3k
OTA stuck when upload 8% - 44% progress #6718
New issue
Have a question about this project? No Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “No 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? No Sign in to your account
Comments
Compiling .pio/build/esp07/src/elektreckiy.ino.cpp.o |
I have also seen this happen (also with recent core 2.6.0 builds) Problem with this stuck behavior is that you have to reboot the unit to try again. (reboot cannot be done remote :( ) |
Hm... so does this mean the ESP is crashing? As shouldn't |
Investigation and PRs are welcome for consideration. |
I had similar behaviour when OTA-uploading to Itead/Sonoff switches. This was because of poor quality flash chips. I changed to a better 4MB flash (larger footprint, but works) and the problems went away. |
connected() false before all data read? |
I have also experience this problem. My solution has been the same as others, a manual reboot. I assumed (with no real evidence) that the problem was poor WiFi connectivity. This belief was reinforced by the observation that the problem has not occurs when the ESP8266 was near the router. The trouble with intermittents, of course is that it is easy to latch on to false leads. |
could you try this change? e219cb0#diff-a5fd274181d082a3211a59cb42a7e0d8L334 |
Thanks. I will have to wait until the problem occurs again. |
Given that #6827 is merged, is this issue still relevant in latest git? |
I think we can close it. |
The connected() function should return true if data are available |
I don't know if related but today my OTA upload was failing 100% of the times between 9% and 24% of the uploading. It was fixed disabling all work in loop function using a boolean and detaching all interruptions during the OTA upload. // setup function
ArduinoOTA.onStart([]()
{
_handlingOTA = true;
_interruptTimer.detachInterrupt();
}); // loop function
void loop()
{
ArduinoOTA.handle();
if(!_handlingOTA)
{
// rest of loop function
}
} |
I can't say I've used interrupts (actually, that may be a lie... see further) with OTA on an ESP8266, and I've not encountered this issue, so perhaps that is the main culprit. I would have thought that once the onStart fires, only that and the other OTA functions run - or at least this is what I rely on in my programs when I do things like screen updates when in OTA, etc - I've never had to use flags in the main loop to say 'inOtaSoDoNothing'. On second thought... I do remember having to stop a ticker function from running, or something similar in one project, which I believes does rely on interrupts to function (otherwise it would fail some way into the OTA upload). |
Platform
Settings in IDE
Problem Description
Each time of upload stuck on 43-44% without any reasons (some times 3-8%, but often 43%).
In the serial i see error [4] - OTA_END_ERROR
MCVE Sketch
PLATFORMIO INI
Debug Messages
The text was updated successfully, but these errors were encountered: