Self Service Crashing During First Boot on Big Sur, Apple M1 & DEPNotify

nateee
New Contributor II

We are running into issues provisioning new machines with Big Sur and Apple M1 with the DEPNotify package. We have updated to the latest DEPNotify 1.1.6 package and revised our scripts and policies to make sure everything is compatible with Big Sur and Apple M1. I have reached the point of a stable provision, but almost every time a machine finishes the initial Apple setup, as soon as it reaches the desktop, Self Service crashes and says "Self Service quit unexpectedly". Which stalls the DEPNotify process and nothing happens. If I select the reopen button, or simply exit the error and reopen Self Service, the provisioning process kicks off as it normally should.

I checked the DEPnotifyDebug.log file and it says “Waiting for branding image from Jamf Pro.” This is because Self Service crashed, as soon as Self Service successfully opens, this message goes away and the provision process works.

When I check Jamf.log I see this error - "Unable to launch Self Service. Unable to determine the logged in user." I am have a feeling this is causing it to crash.

A handful of other users on MacAdmins are experiencing Self Service crashes on first boot of Big Sur.

Any suggestions on why this is happening?

11 REPLIES 11

walt
Contributor III

Do you have rosetta2 installed?
I havent been able to test with M1 myself yet, but have been using this Rosetta 2 installer as part of a preinstall script in my depnotify policy to ensure rosetta gets installed. so its sort of shooting blindly

#!/bin/bash

# Installs Rosetta as needed on Apple Silicon Macs.

exitcode=0

# Determine OS version
# Save current IFS state

OLDIFS=$IFS

IFS='.' read osvers_major osvers_minor osvers_dot_version <<< "$(/usr/bin/sw_vers -productVersion)"

# restore IFS to previous state

IFS=$OLDIFS

# Check to see if the Mac is reporting itself as running macOS 11

if [[ ${osvers_major} -ge 11 ]]; then

  # Check to see if the Mac needs Rosetta installed by testing the processor

  processor=$(/usr/sbin/sysctl -n machdep.cpu.brand_string | grep -o "Intel")

  if [[ -n "$processor" ]]; then
    echo "$processor processor installed. No need to install Rosetta."
  else

    # Check Rosetta LaunchDaemon. If no LaunchDaemon is found,
    # perform a non-interactive install of Rosetta.

    if [[ ! -f "/Library/Apple/System/Library/LaunchDaemons/com.apple.oahd.plist" ]]; then
        /usr/sbin/softwareupdate --install-rosetta --agree-to-license

        if [[ $? -eq 0 ]]; then
            echo "Rosetta has been successfully installed."
        else
            echo "Rosetta installation failed!"
            exitcode=1
        fi

    else
        echo "Rosetta is already installed. Nothing to do."
    fi
  fi
  else
    echo "Mac is running macOS $osvers_major.$osvers_minor.$osvers_dot_version."
    echo "No need to install Rosetta on this version of macOS."
fi

exit $exitcode

mohamed
New Contributor

For Monetary I can use the same with change 12 instead of 11

if [[ ${osvers_major} -ge 11 ]]; then

  or ill add only 12. x in Limitations

*Monterey osx

snowfox
Contributor III

I have no idea why self service is crashing. It shouldn't even be running if using Automated Device Enrolment.
Unless you're auto starting it via User Initiated Enrolment?
At any rate, it sounds like you have the DEP Notify script configured to use the icon from self service and/or its using custom branding.
Personally I changed the script from Jamf Professional Services (DEPNotify Starter) to point to the local /var/tmp directory. Here I first copy 'resources' for DEPNotify such as icons and a custom header image. This way when DEPNotfy runs, it has got nothing to do with Jamf Self service and it isn't trying to pull resources from it or has to wait for it to run etc. All required resources are stored locally on the machine, EULA.txt, Logo image, icons etc.

I've only done this on Intel machines but the principle is the same for ARM. It could be a work around.
I checked 10.26 and Jamf Self-service is a native ARM app so rosetta 2 shouldn't be needed in order for it to run.

nateee
New Contributor II

@walt, Rosetta is the first thing that installs after enrollment, before the DEPNotify script runs. The entire provisioning process works fine as long as I re-open Self Service after it initially crashes. Although I may bundle it in the DEPNotify script as the first thing that installs if I dont run into any errors.

@snowfox, I'm currently running DEPNotify immediately after the Apple enrollment. We have custom Self Service branding and use the branding for the DEPNotify header. I believe it is somehow crashing due to this. It only crashes at the very first time the desktop appears, but works after I reopen Self Service. I disabled custom branding in the DEPNotfy script and added our logo to the DEPNotify.pkg. Going to test and see if that resolves it.

Thanks

mroque-w2o
New Contributor

@nateee I am in the same boat now, did removing the custom branding work for you? Thanks!

MikeF
Contributor II

I am using DEP and it is working properly. The new M! were a little different but I found that the first command i have in the DEP Notify script is to install rosetta. i also install in the policy that installs DEP during the first enrollment. Might be overkill but i have my process installing every app properly like this. I am using Rich Trouton's script for this. https://derflounder.wordpress.com/2020/11/17/installing-rosetta-2-on-apple-silicon-macs/
I also am not having any issues with custom branding either.

dpratl
Contributor II

Hi all,

I'm facing the same problem, first time login to an enrolled and AD bound MacBook the Self Service fails to start. I have to reboot once, after that it is working like it should.
I can only see that on Big Sur and M1 Chip for now.
I have not FUT policies running, only some FEU.
Rosetta2 is installed at the very beginning because we have a bunch of x86_64 software that need to be installed.

Any other ideas?

Thank you
BR
Daniel

Keith__Myers
New Contributor III

...and I have the identical issue. Anyone find an answer?

-MacBook with M1 chip running Big Sur
-I install Rosetta at the beginning of my DEPNotify script
-Self Service crashes on initial boot but works fine after that

EDIT: I was able to resolve this by turning off the DEPNotify option to use the branded Self Service icon and instead packaged the icon with it.

--- Keith Myers

pdeswal
New Contributor

Hi, @snowfox I have the same issue when DEP notify try to pull the icon from self-service on first boot, I get this error Self-service quit unexpectedly and then DEPnotify starts with the default logo.

Can you walk me through how exactly did you resolve this?

pinsent
New Contributor III

I'm seeing this problem as well. I'm using DEPNotify but I'm pointing toward a separate directory (/var/tmp/branding) for the banner icon. I have no idea why Self Service is even starting to begin with, but start it does and it crashes. Once I follow the Reopen prompt, DEP then starts successfully. This is the experience on Intel as well as M1 machines whether it's Monterey or Big Sur.