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

CFPaseboardREF error #24

Open
dannyhanes opened this issue Jul 10, 2017 · 12 comments
Open

CFPaseboardREF error #24

dannyhanes opened this issue Jul 10, 2017 · 12 comments
Labels

Comments

@dannyhanes
Copy link

dannyhanes commented Jul 10, 2017

I have tried running the script on a few machines and I keep getting the same error message. I am using the latest script as of today. Here are the logs from my JSS.

The macOS Sierra Installer is a composer package of /Applications/Install macOS Sierra.app

$4 = /Applications/Install macOS Sierra.app
$5 = 10.12.5
$6 = triggercachemacossierra

Disk Check: OK - 98GB Free Space Detected
2017-07-10 07:52:17.514 jamfHelper[4317:42126] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-07-10 07:52:17.515 jamfHelper[4317:42126] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-07-10 07:52:17.515 jamfHelper[4317:42126] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-07-10 07:52:17.516 jamfHelper[4317:42126] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
0Checking for policies triggered by "triggercachemacossierra" for user "SANITIZED_USER"...
Executing Policy CACHE - macOS Installer
Mounting SANITIZED_DP_1
Error: The package (macOS Sierra Installer.dmg) could not be found.
Retrying using distribution point SANITIZED_DP_2...
Mounting SANITIZED_DP_2
Installing macOS Sierra Installer.dmg...<
Closing package...
Unmounting file server...
Unmounting file server...
Submitting log to SANITIZED_JAMF_SERVER:8443/
mkdir: /usr/local/jamfps: File exists
Launching jamfHelper as FullScreen...
Launching startosinstall...
2017-07-10 08:36:47.971 jamfHelper[4467:44653] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-07-10 08:36:47.978 jamfHelper[4467:44653] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-07-10 08:36:47.978 jamfHelper[4467:44653] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-07-10 08:36:47.990 jamfHelper[4467:44653] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-07-10 08:36:48.433 jamfHelper[4467:44653] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
2017-07-10 08:36:48.433 jamfHelper[4467:44653] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create global data
@kc9wwh
Copy link
Owner

kc9wwh commented Jul 10, 2017

@dannyhanes The errors you are seeing are specifically related to the jamfHelper.

  • Do you see the dialogs come up still event though we see these errors?
  • If not, are all the other variables set as the default provided with the script?
  • Does the upgrade complete?

Comparing your errors to the script, you appear to be getting an error with jamfHelper in the download section starting at line 140 and then you also appear to be somehow catching lines 222-229 even though you meet the requirements and are running the first part of the IF statement.

Please also make sure that the script is set to Unix/Linux Line Endings and doesn't have any special characters anywhere that may have somehow found there way in there.

@dannyhanes
Copy link
Author

@kc9wwh I do get the pop-ups when the policy runs. To note, I am running this at the recurring check-in and not in SS. I am looking to use this to force the upgrade.

I copied your script to sublimetext to ensure unix endings before copying/pasting into my JSS.

I did put sudo -u $(ls -l /dev/console | awk '{print $3}') in front of all the jamfhelper commands per the jamfnation article found here.

That being said, I see the the full screen pop up, however it only stays up for about 10 seconds before closing.

Also, I did just realize that userDialog is not defined before the if statement. Should that still be a user variable?

@kc9wwh
Copy link
Owner

kc9wwh commented Jul 10, 2017

@dannyhanes userDialog is defined on line 59.

But if the jamfHelper is launching, I'd probably ignore the errors (although I understand its not ideal), I'll try to find someone internally to talk to and maybe find out more about that error itself.

If the fullscreen dialog comes up then that is working, and when it closes...well that is a kill command being issued by the macOS installer. Therefore if it closes after 10 seconds, there is some other issue there on why the installer is quitting immediately like that. I would try running the installer manually on one of the system that is having the issue. If the installer has been removed, re-install/cache using sudo jamf policy -event triggercachemacossierra and then run sudo "/Applications/Install macOS Sierra.app/Contents/Resources/startosinstall" --applicationpath "/Applications/Install macOS Sierra.app" --nointeraction.

See if you get any other errors when run directly. You can also check the install.log file on the test systems used.

@elmz
Copy link

elmz commented Jul 11, 2017

@kc9wwh i have also encountered this error
my code below:
if [[ ${userDialog} == 1 ]]; then /bin/echo "Launching jamfHelper as Utility Window..." sudo -u $(ls -l /dev/console | awk '{print $3}') /Library/Application\ Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper -windowType utility -title "$title" -icon "$icon" -heading "$heading" -description "$description" -iconSize 100 & jamfHelperPID=$(echo $!) fi /bin/echo "Finding volume..." volume=$( diskutil info / | grep "Volume Name:" | awk '{print $3}' ) ##Begin Upgrade /bin/echo "Launching startosinstall..." /bin/echo "Installing on $volume $jamfHelperPID" #/Users/Shared/Install\ macOS\ Sierra.app/Contents/Resources/startosinstall --applicationpath /Users/Shared/Install\ macOS\ Sierra.app --nointeraction --pidtosignal $jamfHelperPID & /Users/Shared/Install\ macOS\ Sierra.app/Contents/Resources/startosinstall --volume /Volumes/$volume --applicationpath /Users/Shared/Install\ macOS\ Sierra.app --nointeraction --pidtosignal $jamfHelperPID & /bin/sleep 3

@dannyhanes
Copy link
Author

@elmz Are you running this though Self Service, or at the recurring check-in? Are you running this on an El Capitan machine? From what I am reading, the errors occur on El Cap machines where you are calling jamfHelper as root and not as the current user.

@kc9wwh Running the command manually from terminal to kick off the installer worked without issue.

@elmz
Copy link

elmz commented Jul 12, 2017

@dannyhanes how do i run as user? i have tested with
sudo -u $(ls -l /dev/console | awk '{print $3}')
but it gives the same error.
Should we bypass the jamfhelper for El Capitan?

@dannyhanes
Copy link
Author

dannyhanes commented Jul 12, 2017

@elmz I ended up changing it to only show the jamfhelper window for 30 seconds, then moving on and starting the installation process afterwards. It seems the issue has to do with --pidtosignal not working properly. My modified code is below

Add variable for jamfhelper under user variables:
##JAMFHelper Location JAMFHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper"

Main updates/changes.

# APPLICATION
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

if [[ ${pwrStatus} == "OK" ]] && [[ ${spaceStatus} == "OK" ]]; then
    ##Launch jamfHelper
    if [[ ${userDialog} == 0 ]]; then
        /bin/echo "Launching jamfHelper as FullScreen..."
        "$JAMFHelper" -windowType fs -title "" -icon "$icon" -heading "$heading" -description "$description" -timeout 30
    fi
    if [[ ${userDialog} == 1 ]]; then
        /bin/echo "Launching jamfHelper as Utility Window..."
        "$JAMFHelper" -windowType utility -title "$title" -icon "$icon" -heading "$heading" -description "$description" -iconSize 100 -timeout 30
    fi

    ##Begin Upgrade
    /bin/echo "Launching startosinstall..."
    "$OSInstaller/Contents/Resources/startosinstall" --applicationpath "$OSInstaller" --nointeraction
else
    ## Remove Script
    /bin/rm -f /usr/local/jamfps/finishOSInstall.sh
    /bin/rm -f /Library/LaunchDaemons/com.jamfps.cleanupOSInstall.plist

    /bin/echo "Launching jamfHelper Dialog (Requirements Not Met)..."
    "$JAMFHelper" -windowType utility -title "$title" -icon "$icon" -heading "Requirements Not Met" -description "We were unable to prepare your computer for macOS Sierra. Please ensure you are connected to power and that you have at least 15GB of Free Space.
    
    If you continue to experience this issue, please contact the IT Support Center." -iconSize 100 -button1 "OK" -defaultButton 1

fi```

@kc9wwh kc9wwh added the bug label Jul 21, 2017
@kc9wwh
Copy link
Owner

kc9wwh commented Jul 21, 2017

@dannyhanes I'm glad you found a work-around for this. I'm really at a loss for what is causing it, as I am unable to duplicate this issue. l did reach out to one of our developers and they are taking a look at it.

@andrewjharms
Copy link

I'm also seeing this issue in testing, but it has been sporadic.

@kc9wwh
Copy link
Owner

kc9wwh commented Sep 8, 2017

I can say this does appear to be an issue with Jamf Helper in which the context it is being called. However I have been unable to duplicate this issue which makes it difficult to go back to Dev and get an answer/fix for it.

I need lots of specifics to help in troubleshooting this further.

@kenchan0130
Copy link
Collaborator

kenchan0130 commented Apr 11, 2019

This comment is a reference from #76 (comment).

Hi,

I've been trying to upgrade some of our clients from 10.11.6 to 10.13.6 and been seeing an issue with the part of the script that > start the jamfHelper session to inform the user the installation is preparing.

The error I'm receiving is this:

2018-10-12 16:06:33.306 jamfHelper[4196:181406] CFPasteboardRef CFPasteboardCreate(CFAllocatorRef, CFStringRef) : failed to create > global data

After some investigation, I found a Jamf Nation post mentioning this was an issue on 10.11 with jamfHelper.

https://www.jamf.com/jamf-nation/discussions/17457/jamfhelper-policy-error-failed-to-create-global-data

Any chance the workaround in that thread could be inputted to check if the machine is running 10.11 that it can run jamfHelper > properly?

I'm looking at trying to add this functionality myself and if I'm happy with the results, I make a pull request of my changes for you > to review.

Thanks!

@kenchan0130
Copy link
Collaborator

We somewhat have the following ideas.

Idea 1

Solution

  • Run jamfhelper with the login user privileges in this project regardless of OS version.

Side effects

  • The login user can remove or close the dialog (of jamfhelper).

Idea 2

Solution

  • Run jamfhelper with the login user privileges when OS version is 10.11 or occurred an error.

Side effects

  • The login user can remove or close the dialog (of jamfhelper) when OS version is 10.11 or occurred an error.
  • The this project developers need to put conditional branches for 10.11.

We want to know how much this problem is currently in demand.
Please tell us your needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants