Arduino Create Agent won't Launch

Hi, I am quite new to this. I am using a MacBook with Sonoma and downloaded the Arduino Create Agent multiple times (via Safari and Chrome) following the guide. After pulling the icon into the application folder and clicking it (including the security popout), the Arduino logo came out on the menu bar for a few seconds and disappeared. This happened every time I clicked it. My Arduino cloud cannot detect it either.

I need help regarding this matter, thanks a lot!

Hi @jinhang. I'm going to ask you to run Arduino Create Agent from the command line, then post the output in a reply here.


:exclamation: This procedure is not intended to solve the problem. The purpose is to gather more information.


Please do this:

  1. Open macOS Launchpad.
  2. Type terminal in the "Search" field.
  3. Click on the "Terminal" icon.
    A "Terminal" window will open.
  4. Type the following command in the Terminal window:
    "/Applications/ArduinoCreateAgent.app/Contents/MacOS/Arduino_Create_Agent"
    
  5. Press the Enter key.
  6. Wait for the Arduino Create Agent icon to disappear from the macOS menu bar.
  7. Switch back to the Terminal window.
  8. Press the Command+A keyboard shortcut.
    This will select all the text in the Terminal window.
  9. Press the Command+C keyboard shortcut.
    This will copy the selected text to the clipboard.
  10. Open a forum reply here by clicking the "Reply" button.
  11. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the output is correctly formatted.
    Code block icon on toolbar
  12. Press the Command+V keyboard shortcut.
    This will paste the output into the code block.
  13. Move the cursor outside of the code block markup before you add any additional text to your reply.
  14. Click the "Reply" button to post the output.

Please let me know if you have any questions or problems while following those instructions.

Last login: Wed Mar 27 00:09:00 on ttys000
jared@Jareds-MacBook-Pro-9 ~ % "/Applications/ArduinoCreateAgent.app/Contents/MacOS/Arduino_Create_Agent"
INFO[0000] using config from default: /Users/jared/Library/Application Support/ArduinoCreateAgent/config.ini 
INFO[0000] additional config file not found in config.ini 
INFO[0001] Version:1.4.0                                
INFO[0001] Hostname: Jareds-MacBook-Pro-9.local         
INFO[0001] Garbage collection is on using Standard mode, meaning we just let Golang determine when to garbage collect. 
INFO[0001] You specified a serial port regular expression filter: usb|acm|com 
ERRO[0001] open /Users/jared/Library/LaunchAgents/ArduinoCreateAgent.plist: permission denied 
INFO[0001] Quitting, another instance of the agent has been started by launchd 
jared@Jareds-MacBook-Pro-9 ~ % 










I think this is the relevant part of the logs. Unfortunately I don't know what would cause this error. This file causes Arduino Create Agent to be automatically launched. When you run Arduino Create Agent, it checks to see if the file is present and if not, creates it.

It seems that for some reason macOS is not allowing Arduino Create Agent access to that /Users/jared/Library/LaunchAgents/ folder. Do you have any idea why that might be?

What happens if you run this command from the terminal?:

ls /Users/jared/Library/LaunchAgents

The expected result is that it will produce a directory listing. For example, I get this when I run it on my computer:

% ls /Users/per/Library/LaunchAgents 
ArduinoCreateAgent.plist                com.google.GoogleUpdater.wake.plist     com.google.keystone.agent.plist         com.google.keystone.xpcservice.plist

It said permission denied

OK, great. I did some research and found that various things can cause the LaunchAgents folder to be misconfigured so that your macOS user account doesn't have access to it.

So that I can understand the exact nature of the misconfiguration, please run the following command and then post the output in a reply here on the forum thread:

stat /Users/jared/Library/LaunchAgents

Hi, this is the output I've got

16777223 1676888 drwxr-xr-x 3 root staff 0 96 "Apr  4 11:39:39 2021" "Mar 28 21:44:24 2021" "Mar 28 21:44:24 2021" "Mar 28 21:44:24 2021" 4096 0 0 /Users/jared/Library/LaunchAgents

Ok, I see the misconfiguration now. Your macOS user account doesn't have ownership of the folder.

Please follow these instructions to fix the configuration:

  1. Open macOS Launchpad.
  2. Type terminal in the "Search" field.
  3. Click on the "Terminal" icon.
    A "Terminal" window will open.
  4. Type the following command in the Terminal window:
    sudo chown -R per /Users/jared/Library/LaunchAgents
    
  5. Press the Enter key.

Now try starting Arduino Create Agent again as usual (you don't need to start it from the terminal). Hopefully this time it will work as expected.

Hi, unfortunately it shows this

Last login: Fri Apr  5 18:02:43 on ttys000
jared@Jareds-MacBook-Pro-9 ~ % sudo chown -R per /Users/jared/Library/LaunchAgents
Password:
chown: per: illegal user name

Sorry about that. I forgot to adjust one part of the command I used to test it so it had my macOS username (per) instead of your username (jared). I'll provide the corrected instructions:

  1. Open macOS Launchpad.
  2. Type terminal in the "Search" field.
  3. Click on the "Terminal" icon.
    A "Terminal" window will open.
  4. Type the following command in the Terminal window:
    sudo chown -R jared /Users/jared/Library/LaunchAgents
    
  5. Press the Enter key.

Now try starting Arduino Create Agent again as usual (you don't need to start it from the terminal). Hopefully this time it will work as expected.

It works! Thank you so much for helping out!

You are welcome. I'm glad it is working now.

Regards,
Per

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.