Programming of ESP8266 mini with Arduino 2.3 does not work

Hi @torquayn. I believe you are being affected by the bug tracked here:

That bug is caused by a helper tool used by Arduino IDE 2.x, which is named serial-discovery. A change in the behavior of the latest version of that tool causes it to interfere with the upload under certain conditions.

The developers have already prepared a fix for that bug. I'll provide instructions you can follow to replace the bad installation of serial-discovery with the fixed version:

  1. If Arduino IDE 2.3.10 is running, select File > Quit from the Arduino IDE menus.
    All Arduino IDE windows will close.
  2. Start Windows File Explorer.
  3. Use File Explorer to navigate to the folder at the following path on your computer's hard drive:
    C:\Users\<username>\AppData\Local\Arduino15\packages\builtin\tools\serial-discovery\1.5.0
    
    (where <username> is your Windows username)
    • :red_exclamation_mark: The AppData folder is hidden by default. You can make it visible by opening the "View" menu in File Explorer, then checking the box next to "☐ Hidden items".
  4. You will see a file named serial-discovery.exe in the folder. Right click on that file.
    A context menu will open.
  5. Select "Rename" from the menu.
    The menu will close and the filename will now be an editable text field.
  6. Type serial-discovery-original in the text field.
  7. Press the Enter key.
    The filename change will be committed.
  8. Click the following link to download the fixed version of serial-discovery:
    serial-discovery_test-13c959e7be4f01527db4d60fbabfa180616cf0c8-git-snapshot_Windows_64bit.zip (2.2 MB)
  9. Wait for the download to finish.
  10. Extract the downloaded serial-discovery_test-13c959e7be4f01527db4d60fbabfa180616cf0c8-git-snapshot_Windows_64bit.zip file to any convenient location on your computer.
  11. Copy the serial-discovery.exe file from the extracted folder to the folder at the following path on your hard drive:
    C:\Users\<username>\AppData\Local\Arduino15\packages\builtin\tools\serial-discovery\1.5.0
    
    (where <username> is your Windows username)

Now start Arduino IDE 2.3.10 and try uploading again, just as you did before when you encountered the error. Hopefully it will be successful this time.

Please let us know if you have any questions or problems while following those instructions. Please also post a reply here to let us know if this does fix the error for you. That feedback will be very useful for validating the fix. We are not able to reproduce the error, so we are dependent on the feedback from affected users like you.