Description
Describe the problem
I have a program for which ota updates were working fine.
device name was A
password was A
In my code, I then changed these to
device name B
password B
I did an over the air update, selecting the old device (A) from the port list, and providing the old password (A).
The upload worked fine.
Now, the program is showing as:
device name B in the ports list (as expected).
However, the Arduino IDE is not prompting me for a password when I try and do a OTA update, rather it is failing with:
Authenticating...FAIL
16:33:39 [ERROR]: Authentication Failed
Failed uploading: uploading error: exit status 1
I tried exiting and restarting the Arduino IDE.
I tried rebooting my computer.
I tried the nightly build of the Arduino IDE.
The same error re-appears.
To reproduce
As described above
Expected behavior
If the authentication fails on an OTA update attempt, on the next OTA update attempt the IDE should prompt the user for the password (rather than, I assume, continuing to use a bad cached password).
Arduino IDE version
2.2.1
Operating system
Windows
Operating system version
11
Additional context
this issue seems to be some what similar to #1443
However, in this case restarting the IDE does not resolve the issue.
I have checked show verbose in the settings, and the output from the upload process shows
... 192.168.1.195 -p 3232 --auth=Password ...
the IP address for the device is correct, but the password is just the word Password (i.e. the letters 'P' 'a' 's' 's' 'w' 'o' 'r' 'd'; it is neither the old or new password).
Issue checklist
- I searched for previous reports in the issue trackerI verified the problem still occurs when using the latest nightly buildMy report contains all necessary details
Activity
roblatour commentedon Sep 18, 2023
roblatour commentedon Sep 18, 2023
2nd Update: I found a second, more acceptable, work around.
I moved the program folder for my project to a newly created folder.
for example, my old project folder was:
D:/Arduino_Programs/Folder_A/myprogram
and my ino file was:
D:/Arduino_Programs/Folder_A/myprogram/myprogram.ino
I moved the whole myprogram folder to: D:/Arduino_Programs/Folder_B/myprogram
and my ino file is now:
D:/Arduino_Programs/Folder_B/myprogram/myprogram.ino
and with that I ran an OTA update, the Arduino IDE prompted me for a password, I entered my new password, and it worked fine.
per1234 commentedon Sep 21, 2023
per1234 commentedon Sep 21, 2023
I had a breakthrough in the investigation thanks to some information provided in a report of the same problem on the forum (I guess that is also you @roblatour???):
https://forum.arduino.cc/t/ide-2-2-1-fails-with-incorrect-ota-password-and-does-not-prompt-for-new-one/1169963
The essential condition that was not mentioned here is that the upload is made to the associated board+port that was automatically selected by Arduino IDE when the sketch is restored on Arduino IDE startup.
To reproduce
Equipment
Examples:
Steps
ⓘ This step is performed in order to associate the board+network port selection with a sketch that can be restored on IDE startup.
The saved sketches that were open during the previous session will be restored.
🐛 The "Configure and Upload" dialog does not appear.
🐛 If you have verbose upload output enabled, you will see that a default password of "Password" is used in the upload command.
🐛 You can't because the "Configure and Upload" menu item is disabled.
🙂 The "Configure and Upload" dialog does appear.
Arduino IDE version
2.2.1
Operating system
Additional context
I bisected the regression to 69ae38e / #2165 (does not occur when using the build from the previous commit 9a6a457)
Workaround
After doing that, when you start an upload Arduino IDE will present you with a "Configure and Upload" dialog that will allow you to set the password.
roblatour commentedon Sep 21, 2023
@per1234 I cannot take credit for the post from by @robgw as that is someone else.
Regardless, I'm glad you have identified more of what lays at the heart of this, as well as an easier work around (as noted in the post above).
Well done.
Hope a code fix to address this will be possible.
Cheers
fix: refresh the user-fields at app startup
4 remaining items