Nudge 1.1.14.81542: multiple issues with deferrals not being stored correctly.
bradtchapman opened this issue · comments
Summary
- The current session's Deferral Count per session is not being recorded to
userSessionDeferrals
in Nudge's preferences domain at all, whether actively running, or having been quit by a deferral choice. - After the user finally selects a deferral (instead of ignoring Nudge forever), that session's Deferral Count is written to
userDeferrals
. Isn't it supposed to be recorded to userSessionDeferrals? - On the next launch of Nudge, it seems to be picking up the stored value of
userQuitDeferrals
and displaying that on screen (instead of the total deferral count of quits + sessions). - The value of
userDeferral
value is being overwritten byuserQuitDeferrals
— the one value actually recorded correctly in every single case. And it's still not accurate because all those session deferrals were thrown away.
NOTE: if this behavior is because I missed something in the Wiki, please tell me
Nudge configuration settings (excerpt):
(note: the extremely short intervals are for testing only, and not something I would actually do to my end users)
optionalFeatures = {
acceptableCameraUsage = 1;
acceptableScreenSharingUsage = 1;
aggressiveUserExperience = 0;
aggressiveUserFullScreenExperience = 1;
attemptToBlockApplicationLaunches = 0;
attemptToFetchMajorUpgrade = 0;
disableSoftwareUpdateWorkflow = 1;
terminateApplicationsOnLaunch = 0;
};
userExperience = {
allowLaterDeferralButton = 1;
allowUserQuitDeferrals = 1;
allowedDeferralsUntilForcedSecondaryQuitButton = 2;
approachingRefreshCycle = 30;
approachingWindowTime = 336;
elapsedRefreshCycle = 900;
imminentRefreshCycle = 30;
imminentWindowTime = 96;
nudgeRefreshCycle = 30;
};
userInterface = {
showDeferralCount = 1;
simpleMode = 0;
singleQuitButton = 0;
}
Description of Issue / Reason for filing
We use a Jamf Extension Attribute to understand users' responses to Nudge. At a glance, it appears there are several issues revolving around the storing and retrieval of deferral data to the preference domain. And since Nudge is only exposing a single value of Deferral Count to the end user, whatever formula it uses to compute that number is not squaring up with the values I expect to be stored in the preferences.
While Nudge is running and on screen, if user keeps ignoring the Nudge window, Nudge pops up and the deferral count increases by one each time.
I understood that each of these popups was a userSessionDeferral
, but this is not being recorded at all in the .plist while Nudge is running. Instead, it's being stored to userDeferrals
after Nudge quits (due to deferral). Meanwhile, userQuitDeferrals
is always correctly indicating the number of times I actually quit-deferred Nudge.
In the screenshot below, I am periodically reading the contents of the plist with defaults read com.github.macadmins.Nudge
and it is obvious the active session's deferral count is not being written to disk.
![Screenshot 2024-02-21 at 2 19 41 PM](https://private-user-images.githubusercontent.com/32527656/306794171-48e6e54e-1d32-4273-88d1-0df749742950.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMzNjA4MTgsIm5iZiI6MTcyMzM2MDUxOCwicGF0aCI6Ii8zMjUyNzY1Ni8zMDY3OTQxNzEtNDhlNmU1NGUtMWQzMi00MjczLTg4ZDEtMGRmNzQ5NzQyOTUwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODExVDA3MTUxOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTk5ZmViOGUxNDU0ODI4NDllZGE0Y2NlOTk3NGM2MDZmNTM3OWJhZjc1NzE3NTU4N2NhMDgxZWVhNjNhOWFlMWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.FWvl8V6GodhJv76XV1SZZBTYcookxpLZU7vE6cl-zLo)
The third time that Nudge starts up, though, the plist values have been changed:
userDeferrals = 3
userQuitDeferrals = 3
userSessionDeferrals = 0
And Nudge is counting deferrals from 3, which is way too low.
I expected the displayed Deferral Count to be the sum total of userDeferrals
plus userSessionDeferrals
that was recorded from the last session.
Every time Nudge starts up, the value of userQuitDeferrals
is written to userDeferrals
. Now that Nudge is running again, the Deferral Count in the window is the value of userDeferrals
plus any session deferrals that happened while it was running and being ignored by the user.
Thanks for reporting all of this. Please try https://github.com/macadmins/nudge/releases/tag/v1.1.14.81546
Brad confirmed it's fixed.