Skip to content
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

Nudge 1.1.14.81542: multiple issues with deferrals not being stored correctly. #547

Closed
bradtchapman opened this issue Feb 21, 2024 · 2 comments

Comments

@bradtchapman
Copy link

bradtchapman commented Feb 21, 2024

Summary

  1. 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.
  2. 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?
  3. 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).
  4. The value of userDeferral value is being overwritten by userQuitDeferrals — 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

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.

@erikng
Copy link
Member

erikng commented Feb 22, 2024

Thanks for reporting all of this. Please try https://github.com/macadmins/nudge/releases/tag/v1.1.14.81546

@erikng
Copy link
Member

erikng commented Feb 23, 2024

Brad confirmed it's fixed.

@erikng erikng closed this as completed Feb 23, 2024
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

No branches or pull requests

2 participants