Fix “Failed to execute 'open' on 'SerialPort': Failed to open serial port”
A browser flasher or serial monitor can't open the port. Another program has it, the driver is missing, or (Linux) your user lacks permission.
Community draft — report a mistake
What you see
Connecting...
Uncaught (in promise) NetworkError: Failed to execute 'open' on 'SerialPort': Failed to open serial port.Connecting... Uncaught (in promise) NetworkError: Failed to execute 'open' on 'SerialPort': Failed to open serial port.
Browsers talk to boards through the Web Serial API. Choosing the board in the pop-up only grants permission; the browser then asks the operating system to open the port, and that step failed.
The reasons are the same as for any desktop tool: another program holds the port, the driver is missing, or on Linux your user isn’t in the serial group.
Quick fix — try in order
- 1
Close the Arduino IDE Serial Monitor and other tools
Only one program can open a serial port. Arduino IDE (even in another window), Thonny, PuTTY and a second browser tab all count.
- 2
Unplug, replug and pick the port again
If a previous flash crashed, the browser may still hold a stale handle. Reloading the page and reconnecting the board clears it.
- 3
Install the USB-serial driver
The browser can only open a port the OS has a driver for. CH340 → WCH driver, CP2102 → Silicon Labs (links below).
- 4
Linux: join the dialout group
Chrome on Linux needs the same permission as any other tool:
sudo usermod -aG dialout $USER, then log out and in. See Permission denied on /dev/ttyUSB0. - 5
Use Chrome or Edge on a desktop
Web Serial works in Chrome, Edge and Opera on Windows, macOS, Linux and ChromeOS. Firefox, Safari and most phone browsers don't support it.
Why it happens
The port picker showed the board, so why does open fail?
The picker lists USB devices; opening asks the OS for exclusive access. If something else has the port, or a driver refuses, the open fails after you picked it.
Native-USB boards
ESP32-C3/S3 and the Pico change port when they reset into the bootloader. If the flasher asks again, pick the new entry — it's the same board.
Board-specific notes
FlashReady browser flasher: Our flasher handles download mode for you, but it still needs the port free. Close the IDE's Serial Monitor first.
Drivers — official sources only
Did this fix it?
Thanks — that helps us keep this page right.