nudge icon indicating copy to clipboard operation
nudge copied to clipboard

Repeated "Failed to serialize profile configuration" message in Nudge log

Open MrCoBalt opened this issue 10 months ago • 5 comments

Running Nudge 2.0.12.81807 after upgrading from 1.1.16. We revised our deployment and config to use some of the new Nudge features but we're not sure what is causing this message. We deploy a JSON config, aren't using the SOFA feed, and confirmed we don't have any conflicting PLIST/Profile-based configurations deploying or already on the systems affected.

Here is a log excerpt showing some typical behaviour, but it shows up much more than this in the overall log (see screenshot below)

2025-03-20 10:59:36.219914-0600  localhost Nudge[72975]: [com.github.macadmins.Nudge:user-interface] Delaying initial run (in seconds) by: 63
2025-03-20 11:00:39.220864-0600  localhost Nudge[72975]: [com.github.macadmins.Nudge:user-interface] Finished delay
2025-03-20 11:00:39.223861-0600  localhost Nudge[72975]: [com.github.macadmins.Nudge:user-interface] allowedDeferralsUntilForcedSecondaryQuitButton has been passed: 15
2025-03-20 11:00:39.224389-0600  localhost Nudge[72975]: [com.github.macadmins.Nudge:softwareupdate-download] enforceMinorUpdates: true
2025-03-20 11:00:57.431798-0600  localhost Nudge[72975]: [com.github.macadmins.Nudge:utilities] Nudge detected an attempt to quit the application via CMD + Q shortcut key.
2025-03-20 11:02:53.725848-0600  localhost Nudge[72975]: [com.github.macadmins.Nudge:user-interface] User clicked secondaryQuitButton
2025-03-20 11:02:55.869859-0600  localhost Nudge[72975]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-03-20 11:02:55.869970-0600  localhost Nudge[72975]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-03-20 11:02:55.870249-0600  localhost Nudge[72975]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-03-20 11:02:55.870446-0600  localhost Nudge[72975]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-03-20 11:02:55.870472-0600  localhost Nudge[72975]: [com.github.macadmins.Nudge:user-interface] User clicked primaryQuitButton
2025-03-20 11:02:59.776521-0600  localhost Nudge[73627]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
Image

The only Nudge-related plist we can find is the one created for the active user in ~/Library/Preferences/com.github.macadmins.Nudge.plist (raw text of that embedded below) but I'm guessing the Nudge app shouldn't be looking at that for any of its actual settings if the JSON config is deployed into /Library/Preferences/?

Thanks!

PLIST:

<?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>NSWindow Frame SwiftUI.AnyView-1-AppWindow-1</key>
	<string>830 716 900 478 0 0 2560 1415 </string>
	<key>deferRunUntil</key>
	<date>2025-03-20T17:02:55Z</date>
	<key>requiredMinimumOSVersion</key>
	<string>15.3.2</string>
	<key>userDeferrals</key>
	<integer>19</integer>
	<key>userQuitDeferrals</key>
	<integer>17</integer>
	<key>userSessionDeferrals</key>
	<integer>2</integer>
</dict>
</plist>

MrCoBalt avatar Mar 20 '25 17:03 MrCoBalt

We are experiencing this issue too (fills the log with Failed to serialize profile configuration. )

In our case we do not deploy a config profile for Nudge. We host a json file that contains all our configurations. We use munki to deploy Nudge, and we configure our Nudge to use the json-file via defaults command (to /Library/Preferences/com.github.macadmins.Nudge.plist ) in a post-install script.

We noticed that if we create a "dummy" profile (a Nudge profile with like one key set), it fixes the problem, cause Nudge finds an config profile from the Mac.

We are waiting if this will be fixed, if not i think we'll just push a "dummy" profile for our Macs.

JiiJuuTee avatar Apr 02 '25 08:04 JiiJuuTee

This is cosmetic and the profile idea is not a bad idea. But for now just ignore the events. Not sure when I'll fix it.

erikng avatar Apr 02 '25 16:04 erikng

Thanks for looking into it @erikng!

@JiiJuuTee would you be able to expand on what you're pushing as your dummy profile and to what location? It sounds like you already have a profile being created at /Library/Preferences/com.github.macadmins.Nudge.plist via defaults write so is that enough to suppress the message? Or are you creating a different profile elsewhere on the system? (presumably with a single key that has no impact on your json-based deployment?)

As far as ignoring the events: we have some reporting scripts that snag the last 10 entries of the Nudge.log but that becomes less useful when the latest entries are solely like below (as reported by one of our systems 😄)

2025-04-02 17:41:03.298986-0600 localhost Nudge[1442]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-04-02 17:41:03.309430-0600 localhost Nudge[1442]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-04-02 17:41:03.309504-0600 localhost Nudge[1442]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-04-02 17:41:03.309830-0600 localhost Nudge[1442]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-04-02 17:51:03.356776-0600 localhost Nudge[1442]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-04-02 17:51:03.356851-0600 localhost Nudge[1442]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-04-02 17:51:03.356892-0600 localhost Nudge[1442]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-04-02 17:51:03.365926-0600 localhost Nudge[1442]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-04-02 17:51:03.366031-0600 localhost Nudge[1442]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration
2025-04-02 17:51:03.366823-0600 localhost Nudge[1442]: [com.github.macadmins.Nudge:user-interface] Failed to serialize profile configuration

For now we'll adjust the reporting scripts to filter out lines with that string (at least it's predictable!) and also look into the dummy profile options.

MrCoBalt avatar Apr 03 '25 15:04 MrCoBalt

Hi @MrCoBalt

Unfortunately the defaults write command did not resolve the issue. I have not read trough the Nudge's code, but it might check the profile from /Library/Managed Preferences (profile installed via MDM/Manually) or with cli tool like profiles?

And now when we write to /Library/Preferences/ it's not in the scope? I'm not sure. Maybe @erikng can clarify this.

But anyway, we installed a "dummy" profile via MDM to our Mac's and we do not get the error on logs anymore.

We tried to make the "dummy" profile as simple as possible (and have a value i will not likely change). We noticed that you have to have at least one proper key in the profile for it to work:

<?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>PayloadIdentifier</key>
			<string>fi.helsinki.mac......</string>
			<key>PayloadType</key>
			<string>com.github.macadmins.Nudge</string>
			<key>PayloadUUID</key>
			<string></string>
			<key>PayloadVersion</key>
			<integer>1</integer>
			<key>userInterface</key>
			<dict>
				<key>fallbackLanguage</key>
				<string>en</string>
			</dict>
		</dict>
	</array>
	<key>PayloadDescription</key>
	<string>Settings for Nudge</string>
	<key>PayloadDisplayName</key>
	<string>Nudge Settings</string>
	<key>PayloadIdentifier</key>
	<string>fi.helsinki.mac....</string>
	<key>PayloadOrganization</key>
	<string>Fill</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>

JiiJuuTee avatar Apr 04 '25 06:04 JiiJuuTee

Yes the defaults write will not work as that isn't a valid mdm configuration. You need to deploy it with mdm for it to accept the config.

Be aware that you did in fact set a configuration in the mdm profile and it will override any local config.

erikng avatar Apr 04 '25 14:04 erikng