Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Old agent installation" error is not always triggered when expected #795

Closed
3 tasks done
seaxwi opened this issue Jun 1, 2023 · 2 comments · Fixed by #797
Closed
3 tasks done

"Old agent installation" error is not always triggered when expected #795

seaxwi opened this issue Jun 1, 2023 · 2 comments · Fixed by #797
Assignees
Labels
type: imperfection Perceived defect in any part of project

Comments

@seaxwi
Copy link

seaxwi commented Jun 1, 2023

Describe the problem

The new DMG file in ArduinoCreateAgent-1.3.1-osx-amd64-installer.dmg is a great improvement from the old installer. But since the new installation path (/Application/ArduinoCreateAgent.app) is different from the older one (/Users/sebastianwikstrom/Applications/ArduinoCreateAgent), this is will not result in the old application being overwritten. Instead, the user has to manually remove the old application.

In some cases, the presense of an older Create Agent version can trigger this error:

error

Problem 1: Assuming the default installation path

It seems like the trigger for the error is the presence of an ~/Applications/ArduinoCreateAgent folder.

An older version of the Create Agent can be present and running from a different location, without triggering the error. This results in two instances of the application running:

Screenshot 2023-06-01 at 15 35 18

On the other hand, the error is produced even if the ~/Applications/ArduinoCreateAgent folder is empty. This seems unnecessary.

Problem 2: Does not trigger if Create Agent is opened via Spotlight when a different version is running

Opening the application via Spotlight does not display the error or launch the application.

Screenshot 2023-06-01 at 14 41 17

To reproduce

Running two instances at the same time:

  1. Install or move ArduinoCreateAgent.app (1.2.7) to a path that is not ~/Applications/ArduinoCreateAgent
  2. Run ArduinoCreateAgent.app (1.2.7) so it appears in the menu bar
  3. If the ~/Applications/ArduinoCreateAgent folder exists, remove it.
  4. Run the new ArduinoCreateAgent.app (1.3.1)

🐛 Another instance of the application starts, with two Create Agent icons now appearing in the menu bar

Spotlight issue:

  1. Have both 1.2.7 and 1.3.1 installed.
  2. Run 1.2.7
  3. Press Command + Space to open Spotlight
  4. Search for 'ArduinoCreateAgent'
  5. Open the newer version (in Applications by default)

🐛 Nothing happens

Expected behavior

  • I think the application shouldn't care about the presence of any particular file or folder. I would only expect to get an error if another Create Agent process is currently running.
  • Opening the application via Spotlight should not prevent the error from being displayed.

Arduino Create Agent version

1.3.1

Operating system

macOS

Operating system version

13.2.1 (22D68)

Browser

Chrome

Browser version

Version 113.0.5672.126 (Official Build) (arm64)

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details
@seaxwi seaxwi added the type: imperfection Perceived defect in any part of project label Jun 1, 2023
@seaxwi seaxwi changed the title "Old agent installation found" error is not always triggered when expected "Old agent installation" error is not always triggered when expected Jun 1, 2023
@umbynos umbynos self-assigned this Jun 6, 2023
@umbynos
Copy link
Contributor

umbynos commented Jun 6, 2023

Hi @seaxwi.
Firstly, thanks a lot for the really detailed report.

Regarding Problem 1:

It seems like the trigger for the error is the presence of an ~/Applications/ArduinoCreateAgent folder.

You are absolutely right

An older version of the Create Agent can be present and running from a different location, without triggering the error. This results in two instances of the application running

Unfortunately, we have no other way to detect if the user changed the default installation location.

On the other hand, the error is produced even if the ~/Applications/ArduinoCreateAgent folder is empty. This seems unnecessary.

You are right, I'm preparing a fix for that. (#797) Test release here

Regarding Problem 2:

Running two instances at the same time:

  1. Install or move ArduinoCreateAgent.app (1.2.7) to a path that is not ~/Applications/ArduinoCreateAgent
  2. Run ArduinoCreateAgent.app (1.2.7) so it appears in the menu bar
  3. If the ~/Applications/ArduinoCreateAgent folder exists, remove it.
  4. Run the new ArduinoCreateAgent.app (1.3.1)

🐛 Another instance of the application starts, with two Create Agent icons now appearing in the menu bar

I would say this is expected: Unfortunately, we have no other way to detect if the user changed the default installation location.

Spotlight issue:

  1. Have both 1.2.7 and 1.3.1 installed.
  2. Run 1.2.7
  3. Press Command + Space to open Spotlight
  4. Search for 'ArduinoCreateAgent'
  5. Open the newer version (in Applications by default)

🐛 Nothing happens

This seems strange, I'm investigating this.

I think the application shouldn't care about the presence of any particular file or folder. I would only expect to get an error if another Create Agent process is currently running.

Unfortunately, this is not possible: #725 (comment)

@umbynos
Copy link
Contributor

umbynos commented Jun 8, 2023

@seaxwi let me know when you have the chance to test #797

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants