espflash icon indicating copy to clipboard operation
espflash copied to clipboard

Unable to exit while stuck connecting to wrong port using Ctrl + C

Open laundmo opened this issue 2 years ago • 6 comments
trafficstars

Afte accidentally choosing the wrong COM port, espflash got stuck Connecting... and i was not able to exit it using Ctrl + C

laundmo avatar Aug 23 '23 18:08 laundmo

Could you provide some more details? I guess that you are using Windows, but which espflash version, which terminal ...

SergioGasquez avatar Jan 25 '24 14:01 SergioGasquez

I've also seen this happen, mainly on connect and when the chip doesn't respond. I have to wait for it to timeout even if a spam Ctrl+C - not very helpful I know, but another data point at least.

MabezDev avatar Jan 25 '24 14:01 MabezDev

Could you provide some more details? I guess that you are using Windows, but which espflash version, which terminal ...

sorry i really should have teminal: powershell in vscode version: sorry i dont recall but it should have been the latest release as of the original post. installed using cargo install.

laundmo avatar Jan 25 '24 14:01 laundmo

We are using crossterm to catch this:
https://github.com/esp-rs/espflash/blob/main/espflash/src/cli/monitor/mod.rs#L115-L136

They have the most common terminals tested: https://github.com/crossterm-rs/crossterm#tested-terminals. Not sure what we could do beside opening an issue upstream or switching the method we use

SergioGasquez avatar Jan 25 '24 14:01 SergioGasquez

Could you provide some more details? I guess that you are using Windows, but which espflash version, which terminal ...

sorry i really should have teminal: powershell in vscode version: sorry i dont recall but it should have been the latest release as of the original post. installed using cargo install.

Could you try using Console Host as its a tested terminal from crossterm and see if the issue is also present?

SergioGasquez avatar Jan 25 '24 14:01 SergioGasquez

sorry, i don't have any device with me i could test with in the next week. maybe @MabezDev could?

laundmo avatar Jan 25 '24 15:01 laundmo