IDE 2.2.1 fails with incorrect OTA password and does not prompt for new one

IDE 2.2.1 If a successful OTA upload is performed and then the IDE is closed and later re-opened the IDE appears to "remember" the board/port OTA password combination and attempts to upload the OTA code without asking for an OTA password. This upload fails and the following message is added to the log

Authenticating...FAIL
[ERROR]: Authentication Failed
Failed uploading: uploading error: exit status 1

but no prompt for an alternative password is displayed and subsequent attempts to upload fail with the same message.

I seem to have a work around which involves uploading the code to a listed but not connected to an Arduino COM port and when that fails exiting and restarting the IDE. This time an OTA upload to the valid network port prompts for a password and uploads the code. If the wrong password is used at this point the IDE re prompts for a password as expected but if the IDE is now closed and reopened the problem reoccurs.

Has anyone got any ideas about this?

Rob

OS is Windows 10

This is worse than I thought. I shutdown IDE and opened a totally different source file for a different Arduino type. When I tried to do an OTA upload IDE did not ask for a password and then failed as before.

The only way I could get the OTA upload to work for this totally different hardware/network port combination was again to try to upload to a non Arduino COM port, let that fail and then retry with the OTA network port.

Am I really the only one seeing this?

Hi @robgw. Thanks for your report. The Arduino IDE developers are tracking this bug here:

That is more complex than is necessary. I'll provide a more simple workaround:

  1. Select any other board from the Tools > Board menu in Arduino IDE.
  2. Select the target board in Arduino IDE once again.

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.

Thx m8, I finally solved with your workaround, atm the bug have not been fixed!

You are welcome. I'm glad it is working now.

The bug has indeed been fixed:

That fix was made after the time of the Arduino IDE 2.2.1 release, so you will still experience the bug if using Arduino IDE 2.2.1. The fix is available from the nightly build of Arduino IDE though. If you would like to give it a try, the download links are listed here:

https://www.arduino.cc/en/software#nightly-builds

You can have the release version and the nightly build installed at the same time on your computer without any problems so there is no need to uninstall Arduino IDE 2.2.1 before installing the nightly if you don't like.