Skip to content

fix(LaunchAgents+LaunchDaemons): Program is using Array instead of String #63

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

Conversation

spacelatte
Copy link
Contributor

Problem: Object is wrong type. Expected: NSString Got: __NSArrayM appears in the system.log (Console.app)

Solution: Took out argument <string></string> from <array></array> element.

bartreardon and others added 3 commits April 17, 2025 15:17
update version of macos
update apple-actions 
set create draft to true
…ring

Problem: `Object is wrong type.  Expected: NSString  Got: __NSArrayM` appears in the system.log (`Console.app`)

Solution: Took out argument `<string></string>` from `<array></array>` element.
@spacelatte spacelatte marked this pull request as ready for review July 31, 2025 10:02
Copy link
Contributor

@HowardGMac HowardGMac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm that this change is correct, per documentation found in
man launchd.plist

<key>Program</key> expects a single string.
<key>ProgramArguments</key> expects an array of strings.

This also appears to fix the bug in issue #60

@wakco
Copy link

wakco commented Jul 31, 2025

I can confirm this as well, I assume the error was someone cleaning up to using both keys, but being absent-minded about what else needed to change, failing to remember that the Program key is not an array.

@bartreardon
Copy link
Contributor

agree - happy with this PR

@bartreardon bartreardon changed the base branch from main to dev_4.2.0 August 1, 2025 02:08
@bartreardon bartreardon merged commit 497df79 into macadmins:dev_4.2.0 Aug 1, 2025
@bartreardon
Copy link
Contributor

Give this a crack and let me know if it looks good

https://github.com/macadmins/outset/releases/tag/v4.2.0.21970

@spacelatte
Copy link
Contributor Author

I think I was running an older version, hence the on-demand-privileged file was not present on my device. (It's on the company provisioned device)

I will open another PR to fix the same issue on the on-demand-privileged service.

https://github.com/macadmins/outset/blob/main/Package/Library/LaunchDaemons/io.macadmins.Outset.on-demand-privileged.plist

@spacelatte spacelatte deleted the spacelatte/fix-program-array-to-string branch August 5, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants