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

JAMF Self-Service URI Broken in 1.1.14.X #551

Closed
jshirle2 opened this issue Feb 23, 2024 · 18 comments
Closed

JAMF Self-Service URI Broken in 1.1.14.X #551

jshirle2 opened this issue Feb 23, 2024 · 18 comments

Comments

@jshirle2
Copy link

I have been in the process of upgrading my fleet of Macs to the latest version of Nudge. We are also in the process of attempting to upgrade users by having them directed to a Self-Service policy in JAMF (we have renamed our JAMF app to Software Center). While testing Nudge with this new workflow, I have found that the URI functionality to direct a user to a policy in Self Service does not work. Or rather, I should say that Nudge crashes when I attempt to use this functionality:

2024-02-23 11:21:00.155527-0800 localhost Nudge[14234]: [com.github.macadmins.Nudge:user-interface] Unable to find major upgrade application, exiting Nudge

We have tested this with older versions of Nudge (1.13 and older) and it seems to work fine. To be specific, here is the plist key:

<key>actionButtonPath</key>
<string>jamfselfservice://content?entity=policy&amp;id=2237&amp;action=view</string>

Let me know if you need any further information.

@erikng
Copy link
Member

erikng commented Feb 23, 2024

hm, I tested the URI functionality with munki. I'm wondering if it's rejecting certain characters. Do you have a simple URI path you could try?

@jshirle2
Copy link
Author

I am not super familiar with URI honestly. Do you have any suggestions? The URI I used is from a JAMF policy, taken directly from the policy page.

@erikng
Copy link
Member

erikng commented Feb 24, 2024

Can you try some of these and report back if any of them work?

https://github.com/SKaplanOfficial/macOS-URL-Schemes-for-macOS-Applications

@staze
Copy link

staze commented Feb 24, 2024

Hey @erikng I'm @jshirle2's coworker. Tried changing to just jamfselfservice:// and same result.
But if I just do "open jamfselfservice://" in terminal, it properly opens jamf self service.

Testing with "ical://" and even downloading munki software center and trying "munki://" doesn't work. All of them just throw back "unable to find major upgrade application".

I unconfigured "attemptToFetchMajorUpgrade" and the error changed to "Unable to fetch major upgrade and application missing, exiting nudge". Configuring again, and setting to false, returned to the previous error "unable to find major upgrade application, exiting Nudge".

Here's our plist at this point: https://pastebin.com/9MBCYZPp

@erikng
Copy link
Member

erikng commented Feb 26, 2024

I am able to use actionButtonPath on the latest release but I have a suspicion you are running on macOS 13 or lower and attempting to go to a major upgrade version. Is that the case?

I see you are putting the key in the exact same spot in my test (within osVersionRequirements).

My test was a macOS 14.3.1 device pretending to update to 14.99.99

@erikng
Copy link
Member

erikng commented Feb 26, 2024

If I make it 15.99.99, I receive the same message, as Nudge cannot understand how to enforce this event without additional keys being set.

@erikng
Copy link
Member

erikng commented Feb 26, 2024

so you need to set majorUpgradeAppPath for devices that require major upgrades. By default nudge will look for backup paths, but if they do not exist, you will get that message

    func getBackupMajorUpgradeAppPath() -> String {
        switch VersionManager.getMajorRequiredNudgeOSVersion() {
            case 12:
                return "/Applications/Install macOS Monterey.app"
            case 13:
                return "/Applications/Install macOS Ventura.app"
            case 14:
                return "/Applications/Install macOS Sonoma.app"
            default:
                return "/Applications/Install macOS Monterey.app"
        }
    }

Someone in the #nudge channel posted this as a solution a few days ago

<key>osVersionRequirements</key>
    <array>
      <dict>
        <key>actionButtonPath</key>
        <string>[jamfselfservice://content?entity=policy&amp;id=161&amp;action=execute](jamfselfservice://content?entity=policy&id=161&action=execute)</string>
        <key>majorUpgradeAppPath</key>
        <string>/System/Library/CoreServices/Software Update.app</string>
        <key>requiredInstallationDate</key>
        <string>2024-03-15T11:00:00Z</string>
        <key>requiredMinimumOSVersion</key>
        <string>14.3.1</string>
      </dict>
    </array>
</key>

@erikng
Copy link
Member

erikng commented Feb 26, 2024

I think I have found an alternative workaround that I am happy with that solves the issue without you needing to change your config.

Please try https://github.com/macadmins/nudge/releases/tag/v1.1.14.81547

@staze
Copy link

staze commented Feb 26, 2024

Thanks @erikng . we'll give that a shot shortly. yes, this is on macOS 12 and 13, since we're trying to push people to Ventura/Sonoma (respectively).

Stay tuned... =)

@staze
Copy link

staze commented Feb 26, 2024

Doesn't seem to work at least on Monterey. Ventura also doesn't work. =/

@erikng
Copy link
Member

erikng commented Feb 26, 2024

Can you define what isn't working? Is nudge still exiting or is the button not working?

If the former, what happens when you deploy the key I mentioned above that someone else did?

@jshirle2
Copy link
Author

Adding in that key worked. Seems odd that that key is required when trying to have the workflow go through Self Service. In any case, much appreciate the assistance on this one.

One thing I did notice is that the aggressiveUserFullScreenExperience key does not seem to be working. Does that key only work in later OS versions?

@erikng
Copy link
Member

erikng commented Feb 26, 2024

That key shouldn't have been needed since my solution was the backup to that key. I would love to have logs prior to you trying the key.

As far as aggressive mode, it should be working, but again I need logs, preferably debug logs to understand. It also only triggers after the requiredInstallationDate has been passed.

@jshirle2
Copy link
Author

How can I go about getting the debug logs? I cannot find info on them in the wiki and I can't recall anything on it.

@erikng
Copy link
Member

erikng commented Feb 26, 2024

It's in the wiki but

log show --predicate 'subsystem == "com.github.macadmins.Nudge"' --info --style json --debug

@erikng
Copy link
Member

erikng commented Feb 27, 2024

I think I have discovered that it is a mix of several keys being set in different out of box configurations that lead to this not working, specifically attemptToFetchMajorUpgrade with actionButtonPath for major upgrades.

When in this case, new logic was written to exit Nudge because of the primary keys not being set and nudge's backup files being set. With this new build, I will now warn about this behavior because it is still non-ideal from a major upgrade, but that the admin has created their own set of workarounds.

Please try https://github.com/macadmins/nudge/releases/tag/v1.1.14.81549

@jshirle2
Copy link
Author

Great thanks for that new version it worked like a charm even after I removed the majorUpgradePath key.

@erikng
Copy link
Member

erikng commented Feb 27, 2024

Fantastic. Thanks for the report and confirmation it's fixed.

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

3 participants