The Nudge Launch Agent Do not open

Vinyboy
New Contributor III

Hello Team,

After installing Nudge and pushing the configuration profile, the Nudge Agent do not open. 
We have 12.4.0 version of OS Installed.


Please let me know what is that has to be changed/Modified.

 

I've install Nudge_Suite-1.1.8.81421.pkg and configured the profile too.

Upload File
PLIST file containing key value pairs for settings in the specified domain
 

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>PayloadContent</key> <array> <dict> <key>PayloadContent</key> <dict> <key>com.github.macadmins.Nudge</key> <dict> <key>Forced</key> <array> <dict> <key>mcx_preference_settings</key> <dict> <key>optionalFeatures</key> <dict> <key>acceptableApplicationBundleIDs</key> <array> <string>us.zoom.xos</string> <string>com.apple.iWork.Keynote</string> <string>com.apple.Keynote</string> <string>com.microsoft.Powerpoint</string> <string>com.cisco.webexmeetingsapp</string> <string>com.webex.meetingmanager</string> <string>Cisco-Systems.Spark</string> </array> <key>aggressiveUserExperience</key> <true/> <key>attemptToFetchMajorUpgrade</key> <true/> <key>enforceMinorUpdates</key> <true/> </dict> <key>osVersionRequirements</key> <array> <dict> <key>aboutUpdateURL</key> <string>https://support.apple.com/en-us/HT212585</string> <key>requiredInstallationDate</key> <string>2022-8-05T17:00:00Z</string> <key>requiredMinimumOSVersion</key> <string>12.5.0</string> <key>targetedOSVersionsRule</key> <string>12</string> </dict> </array> <key>userExperience</key> <dict/> <key>userInterface</key> <dict> <key>iconDarkPath</key> <string>/path/to/image.png</string> <key>iconLightPath</key> <string>/path/to/other-image.png</string> <key>showDeferralCount</key> <true/> <key>singleQuitButton</key> <true/> <key>updateElements</key> <array> <dict> <key>_language</key> <string>en</string> <key>mainContentText</key> <string>Hey there! \n\nWe noticed this Mac has available software updates. Keeping macOS up-to-date is an important part in keeping devices and data secure.\n\nPlease update this Mac by clicking the Update Device button to install the available updates.</string> <key>mainHeader</key> <string>This Mac requires a security update</string> <key>subHeader</key> <string>A friendly reminder from IT ❤️</string> </dict> </array> </dict> </dict> </dict> </array> </dict> </dict> <key>PayloadDisplayName</key> <string>Custom Settings</string> <key>PayloadIdentifier</key> <string> </string> <key>PayloadOrganization</key> <string> </string> <key>PayloadType</key> <string> </string> <key>PayloadUUID</key> <string> </string> <key>PayloadVersion</key> <integer>1</integer> </dict> </array> <key>PayloadDescription</key> <string></string> <key>PayloadDisplayName</key> <string>Nudge OS Update Settings</string> <key>PayloadEnabled</key> <true/> <key>PayloadIdentifier</key> <string> </string> <key>PayloadOrganization</key> <string> </string> <key>PayloadRemovalDisallowed</key> <true/> <key>PayloadScope</key> <string>System</string> <key>PayloadType</key> <string>Configuration</string> <key>PayloadUUID</key> <string> </string> <key>PayloadVersion</key> <integer>1</integer> </dict> </plist>

 

8 REPLIES 8

ckulesza
New Contributor III

Having the same issue hopefully someone will respond with some info

bwoods
Valued Contributor

I would suggest uploading the Jamf schema and turning on the required keys mentioned in the wiki. Also, is it not launching when you click on it or when you run your launch agent? Let me know if you need screenshots.

Vinyboy
New Contributor III

Hello bwoods,

The Launch agent do not turn on. It would be much appreciated if you can help me with modifed changed that has to be done in custom Schema with screenshot.

bwoods
Valued Contributor

The jamf schema can be found here. You can upload it to your jamf pro server using "External Applications" in the "Application & Custom Settings" payload. (This is a configuration profile payload)

Select "Custom Schema" as the source.

bwoods_0-1659574109012.png

The preference domain will be com.github.macadmins.Nudge

 

bwoods_1-1659574293856.png

 

Click "Add schema" and copy/paste the code block from the URL above.

bwoods_2-1659574359010.png

Click "Save" instead of "Upload". 

bwoods_3-1659574437681.png

You'll now have a simple GUI to activate and deactivate features.

According to the wiki, Nudge will not open until the following keys have been configured. ( I suggest only enabling these three keys before doing any thing else.)

bwoods_1-1659574878243.png

After configuring the keys above, you need to deploy the profile to a test machine and manually open nudge without a launch agent to see if it works. If it doesn't, something is wrong. If it does, move on to the launch agent. 

Below I have a script that creates and loads a custom launch agent for me. You can change the Start Interval to whatever you want. Below I have it set to 14400. ( 4 hours)

 

!/bin/bash

# Determine Current User
currentUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )

# Determine Current User ID
currentUserUID=`id -u "$currentUser"`

# Generate Nudge launch agent
echo "<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.github.macadmins.Nudge</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge</string>
	</array>
		<key>RunAtLoad</key>
			<true/>
	<key>StartInterval</key>
		<integer>14400</integer>
</dict>
</plist>" > /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist

# Load Launch Agent
/bin/launchctl asuser "$currentUserUID" launchctl load /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist

exit 0		## Success
exit 1		## Failure

 

 

 

Vinyboy
New Contributor III

Hello Bwoods,

Now I'm manually able to open the Nudge. as the Configuration you mentioned.
But now the launch agent is not opening automatically as you mentioned "custom launch agent". I've changed the start interval to 1600. But no pop-ups.
Note:- I haven't install the Launch Agent pkg yet.

bwoods
Valued Contributor

For the launch agent to work, you need to ensure that nudge is installed in the default path:

/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge

What path are you installing nudge in?

bwoods
Valued Contributor

Quick edit. The shebang is missing in the launch agent script. My bad. 

#!/bin/bash

# Determine Current User
currentUser=$( scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }' )

# Determine Current User ID
currentUserUID=`id -u "$currentUser"`

# Generate Nudge launch agent
echo "<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.github.macadmins.Nudge</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Applications/Utilities/Nudge.app/Contents/MacOS/Nudge</string>
	</array>
		<key>RunAtLoad</key>
			<true/>
	<key>StartInterval</key>
		<integer>14400</integer>
</dict>
</plist>" > /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist

# Load Launch Agent
/bin/launchctl asuser "$currentUserUID" launchctl load /Users/$currentUser/Library/LaunchAgents/com.github.macadmins.Nudge.plist

exit 0		## Success
exit 1		## Failure

Ismere
New Contributor III

Hi everyone,

If Nudge is still not starting you can also open up a Terminal and let the logstream run while trying to open it.
You can also increase the amount of Information in the logs according to the github page of it: https://github.com/macadmins/nudge/wiki/Logging

Default log:

log stream --predicate 'subsystem == "com.github.macadmins.Nudge"' --style syslog --color none

Sharing the output of this log would make it easier to help. 

I also see that you have defined the targetedOSVersionsRule:

<key>targetedOSVersionsRule</key> <string>12</string>

In theory this key works totally fine but for some reason, in our tests, Nudge never started on any MacOS 12 System as long as we did not used default as the Value for this key.