Closed remusache closed 5 years ago
Hey @remusache,
What version of the script are you using? Are you using the latest version? Are you using the script during DEP Enrollment or for another purpose?
The reason I ask is because Arek and I changed the logic to look for the Setup Assistant Process rather than users or BOM files in v1.1.0 of the script that was released last week. If you have the older version looking for users and BOM files, there is a likelihood that the script would kick off prior to Setup Assistant completion if the user to a rather long time finishing the Apple related setup.
Hey @kbareis !
Thank you so much for getting back to me!
I am using the one that I attached bellow. Don't know if it's the latest one. I think is the one before the last one you posted. I am using the script in a policy that is triggered at Enrollment Complete.
@remusache
Hmm, that should have the updated code. Do you know if Setup Assistant changes it's name based on native language?
When your Mac first boots into the Setup Assistant, could you hold down Control + Option + Command + T. That should open the Terminal. Once Terminal is open, could you then run the following command: pgrep -l "Setup Assistant"
If that command comes back with no process IDs then the Setup Assistant must have a different name.
If it comes back with something, then I would continue going thru the Setup Assistant and run the above command after every screen is completed.
If that doesn't show any issues, then I would wait at the last screen prior to seeing the "Getting Started" screen that ends in going to the desktop. While there, you can still access the Terminal and can run the following command on a file that will give us more information. tail -f /var/tmp/depNotifyDebug.log
That log file is created once DEP Notify is installed and the script is running. You should see many alerts saying that the Setup Assistant is still running.
Here's a screenshot of what you should see:
Hey @kbareis
pgrep -l "Setup Assistant" shows PID 348. So the Setup Assistant doesn't change its name while on Swedish.
This what I get from tail -f /tmp/depNotifyDebug.log
Tue Oct 02 09:31:43: Setup Assistant Still Running. PID 348 Setup Assistant. Tue Oct 02 09:31:53: Setup Assistant Still Running. PID 348 Setup Assistant. Tue Oct 02 09:32:03: Setup Assistant Still Running. PID 348 Setup Assistant. Tue Oct 02 09:32:13: Setup Assistant Still Running. PID 348 Setup Assistant. Tue Oct 02 09:32:23: Current user set to remus1.
Unfortunately the GUI still doesn't want to cooperate. Very stubborn GUI… 😁
@remusache
I'm glad you were able to get to the log. However, that last bit Tue Oct 02 09:32:23: Current user set to remus1.
shouldn't show up at all while you are sitting in the Setup Assistant.
@kbareis I'm running 10.13.6 on the test machine. DEPNotify 1.1.0, build 29. I am using this for first time enrollment via DEP.
That Tue Oct 02 09:32:23: Current user set to remus1 is from when I ran again tail -f from when I was already logged in. So that is OK I think. I think that last line comes from: CURRENT_USER=$(stat -f "%Su" "/dev/console") echo "$(date "+%a %h %d %H:%M:%S"): Current user set to $CURRENT_USER." >> "$TMP_DEBUG_LOG"
It did not appeared when I ran tail -f from the Setup Assistant windows.
Am I the only one experiencing this, are you unable to reproduce this?
@remusache Where are you installing DEPNotify? The script assumes that it is installed into /Applications/Utilities
. That is the default location if you download the .pkg installer from the GitLab repo.
Are you installing DEPNotify in a different location or renaming it by chance?
If you are then you ether need to change where you are installing DEPNotify or change this line of code: DEP_NOTIFY_APP="/Applications/Utilities/DEPNotify.app"
As far as only one experiencing this, I am not sure. I cannot reproduce the issue so I have to imagine that is some sort of configuration or pathing issue.
@remusache
I found something! You have a few lines that are different then the published script. Look for
sudo -u "$CURRENT_USER" "$DEP_NOTIFY_APP" -path "$DEP_NOTIFY_CONFIG" -fullScreen&
sudo -u "$CURRENT_USER" "$DEP_NOTIFY_APP" -path "$DEP_NOTIFY_CONFIG"&
Notice the missing /Contents/MacOS/DEPNotify
after the $DEP_NOTIFY_APP
variable. It should look like this:
sudo -u "$CURRENT_USER" "$DEP_NOTIFY_APP"/Contents/MacOS/DEPNotify -path "$DEP_NOTIFY_CONFIG" -fullScreen&
sudo -u "$CURRENT_USER" "$DEP_NOTIFY_APP"/Contents/MacOS/DEPNotify -path "$DEP_NOTIFY_CONFIG"&
After cleaning this up, I am not seeing issues!
sudo -u "$CURRENT_USER" "$DEP_NOTIFY_APP"/Contents/MacOS/DEPNotify -path "$DEP_NOTIFY_CONFIG" -fullScreen& ......
It was llike that before and it still didn't work. I changed back today and tried again… no dice. The packages install without the GUI.
And when the GUI starts, it happens once in awhile (that is the strange part), I immediately get the installation complete. Press Quit to continue.
aaaaa… 😫 I give up! I don't wanna stress you anymore.
Hey @remusache,
You are not a stress and I want to get to the bottom of this like you!
I cleaned up a few lines and ran it against my 10.13.6 test machine with DEPNotify 1.1.0 and Jamf Pro 10.7.1. Attached is the exact copy I ran along with a screenshot of some other info.
Hey @kbareis
Using now the script that you attached…
After manually starting DEPNotify, because it did not start by itself, again… :) I noticed that "Waiting for the Dock" message plus those other 2 bellow the Dock one in the logs. Does that mean anything to you?
Last login: Thu Oct 4 08:42:40 on console
mb-00319:~ lnuadmin$ /Applications/Utilities/DEPNotify.app/Contents/MacOS/DEPNotify ; exit;
Waiting for the Dock
2018-10-04 08:44:36.043 DEPNotify[7479:27556] Failed to set (keyPath) user defined inspected property on (DEPNotify.WindowController): [<DEPNotify.WindowController 0x7fed95419240> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.
2018-10-04 08:44:36.043 DEPNotify[7479:27556] Failed to set (backgroundColor) user defined inspected property on (DEPNotify.ViewController): [<DEPNotify.ViewController 0x7fed9541ea30> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key backgroundColor.
Reticulating splines...
Change observed
Reticulating splines...
tail: : No such file or directory
Command observed
MainTitle: Välkommen till Linnéuniversitetet
Command observed
MainText: Den här processen installerar några program som är nödvändiga för datorn. Processen tar mellan 20-30 minuter att utföra.
Command observed
Help: https://serviceportalen.lnu.se/
Installationen startar...
Change observed
Installationen startar...
Command observed
Determinate: 29
Installerar Adobe Acrobat Reader DC...
Change observed
Installerar Adobe Acrobat Reader DC...
Installerar Adobe FlashPlayer...
Change observed
I think I know why is not working, I think… I have the PreStage like this:
I want to Skip Account Creation.
This way, when the initial setup is done, the OS waits for us to log in - in this case with lnuadmin. So after we log in, the script starts installing the packages with no GUI, or maybe it starts even before we log in…
If I sudo jamf deleteSetupDone
and then go thru DEP again (without formating the HD), this time Setup Assistant asks for a username and a password and logs in automatically - then, the GUI starts and works as it should.
Is there a chance that we and I mean you 😊 can tell DEPNotify and Company to wait until the user logs in?
Hey @remusache!
That is it! That is the missing piece. Let me rephrase your workflow so that I understand it.
What I need to add to the script is an additional check after the Setup Assistant is done. This check would put back in code that looked at /dev/console and who the user is.
This change should take me just a few days to write and verify via testing.
Hey @kbareis 🙂
Yes, that is exactly how my workflow flows! 😋 Yeeeey… we are moving forward. Thank you so much for taking the time to get to the bottom of this.
Quick suggestion @kbareis - like you don't already have enough on your plate! 😜
When installing the packages, the Mac wants to go to sleep - the nerve of that guy… Doest it take a lot of script work, to pump some caffeine into its system while installing the packages?
@remusache I added a check for the Finder process which should help with what you are seeing. Please verify that the new version of the script works better for you. If it works, please close out this issue.
As far as sleep goes, I had been thinking about that too. I will add it to the idea list.
Pushed the update yesterday. Looking at the finder process as that was the most consistent. Please verify and close if it works!
Apologies for the delay @kbareis It was crazy at work today.
I tested the script on two machines already and I must say… if you are ever in Sweden I'll buy a lunch :) It works!
Thank you so much for your time and help.
Hi DEPNotify is not launching for me either. It looks like there is a fix, would you be able to provide that script in english? Thank you in advance.
I'm having this same exact issue... Any update since this thread?
I am also seeing the UI not launching until I directly open the DEPNotify app. Im going to try a wipe and reimage of my test machine so I can confirm. My settings are set to create a management user and a local admin user. Then I just click through to login and no window pops up until I open DEPNotify.
Hey @kbareis! I've noticed that the DEPNotify.app has a bad habit of not starting. It happens in 95% of the cases. The script is performing the installation (no argues there) but there is no GUI, which defeats the purpose of the entire thing 🙂 If a double click the DEPNotify.app in the Utilities folder, than the app starts and I can see the progress and such. But by itself, I mean automatically, DEPNotify.app, doesn't start most of the times. 😕