arduino-create-agent icon indicating copy to clipboard operation
arduino-create-agent copied to clipboard

Opening Create Agent twice creates two new instances

Open ghost opened this issue 2 years ago • 1 comments

Describe the problem

So I accidentally opened Arduino Create Agent twice and two instances of it appeared on my taskbar. Similarly, I opened it 6 times and this happened: image

To reproduce

Open Create Agent more than one time.

Expected behavior

I expected nothing would happen.

Arduino Create Agent version

1.2.6-b3c91fc

Operating system

Windows

Operating system version

11

Browser

Brave

Browser version

1.43.93 Chromium: 105.0.5195.127 (Official Build) (64-bit)

Additional context

Multiple instances of Create Agent also appear in the Task Manager: image

Issue checklist

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

ghost avatar Sep 17 '22 06:09 ghost

Hello! The Arduino Create Agent does not have a mechanism to exit if an instance of the agent is already running. This is because during the installation, 2 instances are being run: one for the HTTPS certs install, and the other one is the real agent. See here https://github.com/arduino/arduino-create-agent/issues/217#issuecomment-380022633 Also the agent starts by default on port 8991, if it finds this port already busy it starts listening on the next one, and so on I don't know if this will be implemented in the future.

umbynos avatar Sep 19 '22 10:09 umbynos