ESP device "prepare for first use" didn't work

Hello. In chrome I try to instal the ESPHome stuff on a brand new ESP32S2. My Mac recognize it in the port “ESP32-S2 (cu.usbmodem01) paired”. When I clic on the “prepare for first use” after a while, I receive the message “Failed to initialize. Try resetting your device or holding the BOOT button while selecting your serial port until it starts preparing the installation.” Can someone help me? I thank you in advance

Which exact S2 board? Is it the mini (like this one)?

I couldn’t get it to flash the first time via ESPHome even when I held the boot button on boot. The only way I could do the first flash was using Adafruit ESPTool Web Flasher.

After that, you can switch back to ESPHome and use normal OTA flashing.

It this one:

If you’re holding down the Boot button before plugging it in and it’s still not flashing, use the flasher I suggested above.
Frome the link you posted:
“Remember to put the board in bootloader mode. This is done manually via the buttons - press and hold button BUT1, press and release button RST1, release button BUT1. After programming is done, remember to manually reset the board via RST1 button to leave bootloader mode”

Yes, I pressed the button. In fact, i only view my esp32 in the esp home web interface when the button is pressed. Do you know where I can find the bin file to be installed in a way to use ESPHome-Flasher?

There should be an option in the 3 dots menu to download as explained here.

Re-read your initial post & realised you’re on Mac. Do you have the serial drivers installed, and are they compatible with Mac? The link I gave you has links to the drivers, but I’m not sure if they only work with Windows.

I think the drivers are ok because in Chrome, when I maintain the button and then I plug the board, it appaers in the list of device as i mention in the post

Your Pc could be loading default drivers which recognise basic info about the device but can’t flash it. I’m basing this statement based on the fact that I never saw cu.usbmodem01 in the device list using the drivers It’s listed as USB_SERIAL CH340 in Device Manager. This is on Windows though - not sure how a Mac behaves because I don’t have one.

Try to attempt to install the drivers and see if anything changes. Google around for installing the driver on a Mac if you don’t see changes. If everything else fails, try the flasher I mentioned.