A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet

hi guys i am trying to uload code in my esp32 but it is showing" A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header" error . I even tried to press the boot button while uploading the code but it didnt worked why?
please help me out

Hi Its same case for me as well. I tried with holding boot/flash button while connecting it to ESP32 but didnot worked.
I also tried with connecting 10 microFahrad elctrolytic Capacitor between enable and ground button and still didnot worked. Try this way if it works for you.
Can alybody help me out on this case as well.

Thanks