arduino-cli icon indicating copy to clipboard operation
arduino-cli copied to clipboard

`board list --watch` occasionally fails to detect any serial ports on macOS

Open dankeboy36 opened this issue 11 months ago • 2 comments
trafficstars

Describe the problem

I have been experiencing an intermittent issue with the board list --watch command while using version 1.1.1 of the CLI on macOS. Occasionally, the command does not detect any serial ports, resulting in missing watch events via gRPC.

To reproduce

  1. Open a Terminal on macOS.
  2. Run the command: board list --watch
  3. Monitor the output for the detection of the serial ports.
  4. Press Ctrl+C to terminate the watch process.
  5. Repeat from 2.) until you hit the bug.
./arduino-cli board list --watch
Port Type Event Board Name FQBN Core



The OS can detect the serial ports with ls /dev/tty.* at the same time while the watch process runs.

Proof 👇

Image

Expected behavior

The board list --watch command should consistently detect the serial ports and trigger appropriate board list watch events.

Arduino CLI version

arduino-cli Version: 1.1.1 Commit: fa6eafcb Date: 2024-11-22T09:31:36Z

Operating system

macOS

Operating system version

11.7.10

Additional context

  • I initially suspected a potential bug in my code via grpc, but I could reproduce it from a shell.
  • I have never noticed this defect before 1.1.1.

Issue checklist

  • [x] I searched for previous reports in the issue tracker
  • [x] I verified the problem still occurs when using the nightly build
  • [x] My report contains all necessary details

dankeboy36 avatar Dec 16 '24 08:12 dankeboy36

I tried to reproduce it on my Mac, I've launched the CLI a hundred times, and never failed :-/.

Can I ask you to bisect and find the wrong commit? Is your Mac x86 or arm?

cmaglie avatar Jan 21 '25 16:01 cmaglie

Thank you for investigating the issue.

Is your Mac x86 or arm?

I encountered the bug on an Intel Mac, but I will check if I can reproduce it on a Mac with an ARM chip.

Can I ask you to bisect and find the wrong commit?

Sure. It's not my highest priority at the moment, but when I can reproduce it, I will update the thread.

Also, IDE users have experienced the same problem on Linux: https://github.com/arduino/arduino-ide/issues/2600.

dankeboy36 avatar Jan 21 '25 16:01 dankeboy36