Issue with Google Chrome launch agent

Flaurian
Contributor

Hello everyone, 

I already configured this kind of launch agent in the past but actually I'm having a weird issue about not seeing the launch agent is running. On my test machine the Google Chrome is not up to date which means the launch agent has to start in 60 seconds to use googles software update agent to identify updates but I can't see the launch agent is running with launchctl list or even on my test machine via Google Chrome which should me give a notification to update it. I got no error or something like also when I try to start the launch agent by terminal.

 

 

<key>RelaunchNotification</key>
<integer>2</integer>
<key>RelaunchNotificationPeriod</key>
<integer>3600000</integer>

 

 


That's the plist file which is stored in /Library/LaunchAgents/

 

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>Label</key>
	<string>com.test.google.softwareupdatecheck</string>
	<key>LimitLoadToSessionType</key>
	<string>Aqua</string>
	<key>ProgramArguments</key>
	<array>
		<string>/Library/Google/GoogleSoftwareUpdate/GoogleSoftwareUpdate.bundle/Contents/Resources/GoogleSoftwareUpdateAgent.app/Contents/MacOS/GoogleSoftwareUpdateAgent</string>
		<string>-runMode</string>
		<string>oneshot</string>
		<string>-userInitiated</string>
		<string>YES</string>
		<string>”$@”</string>
	</array>
	<key>RunAtLoad</key>
	<true/>
	<key>StartInterval</key>
	<integer>60</integer>
</dict>
</plist>

 

 

That's the post install script 

 

 

CurrentActiveUser=$(scutil <<< "show State:/Users/ConsoleUser" | awk '/Name :/ && ! /loginwindow/ { print $3 }')
CurrentActiveUserID=$(id -u "${CurrentActiveUser}")

sudo chown root:wheel /Library/LaunchAgents/com.test.google.softwareupdatecheck.plist
sudo chmod 644 /Library/LaunchAgents/com.test.google.softwareupdatecheck.plist
sudo plutil -convert xml1 /Library/LaunchAgents/com.test.google.softwareupdatecheck.plist
echo "Loading LaunchAgent for user ${CurrentActiveUser} with ID ${CurrentActiveUserID}..."
sudo launchctl bootout gui/$CurrentActiveUserID /Library/LaunchAgents/com.test.google.softwareupdatecheck.plist
sudo launchctl bootstrap gui/$CurrentActiveUserID /Library/LaunchAgents/com.test.google.softwareupdatecheck.plist
sudo launchctl start com.test.google.softwareupdatecheck

exit 0 ## Success
exit 1 ## Failure

 

 

 Anyone an idea?

13 REPLIES 13

sdagley
Esteemed Contributor II

@Flaurian It looks like you're creating your own LaunchAgent to update Chrome. If you deploy Chrome via the .pkg Google created for Enterprise deployments it automatically configures auto updates during the install: https://chromeenterprise.google/browser/download/#mac-tab (AutoPkg uses this download for the GoogleChrome.pkg recipe)

Flaurian
Contributor

Hey @sdagley 
thanks for ur answer. Actually it is the Google Enterprise pkg. 

sdagley
Esteemed Contributor II

If you're using the Enterprise GoogleChrome.pkg there is no com.test.google.softwareupdatecheck.plist LaunchAgent created by it. Is that something you were creating on your own before Google started offering the Enterprise installer?

No it’s already worked with the enterprise pkg and yes the launch agent is created by myself to trigger the update service from google 

sdagley
Esteemed Contributor II

The Enterprise Chrome package from Google automatically configures automatic updates when it installs, you don't need to do anything else to trigger it. Or are you trying to check more frequently than Google configures their automatic update check?

Exactly this what I do - every 6 hours 

sdagley
Esteemed Contributor II

Looking at the latest Google LaunchAgents and LaunchDaemons it appears that the com.google.keystone... LaunchAgents are no longer used, and the old com.google.keystone.daemon.plist LaunchDaemon has been replaced by com.google.GoogleUpdater.wake.system.plist which has a StartInterval of 1 hour so having a secondary check every 6 hours isn't really necessary.

Okay but why the client is not updating the old version if google enterprise pkg has everything included? (Chrome was open the whole time and browsing.)

sdagley
Esteemed Contributor II

If you select "About Google Chrome" from the Google Chrome menu to force an update check does it then find an update (or show that an update is pending)?

It will show the update and this exactly what I try to avoid for the user because this will not work. I don’t want someone has to click to get the update. 

sdagley
Esteemed Contributor II

If Chrome is open it won't apply an update until the user quits the app, or if the user clicks the notification an update is pending and asking that they allow a relaunch to install it.

Yes this is actually the basic setting from Google and this not what I want because user will not quit any app to do the update rather they got any notification and this is what I do with ... 

<key>RelaunchNotification</key>
<integer>2</integer>
<key>RelaunchNotificationPeriod</key>
<integer>3600000</integer>

Don't get me wrong I'm happy about every answer but actually we talking to about the real issue what I've - the launch agent which will not open, start or whatever  

sdagley
Esteemed Contributor II

The real issue is that Google appears to have changed the fundamental behavior of their update mechanism and your previous approach of using an additional LaunchAgent to trigger it on your preferred schedule no longer works. I'll end my participation in this thread with the suggestion you look at the contents of the com.google.GoogleUpdater.wake.system.plist LaunchDaemon to see how the new update mechanism is triggered and see if that provides any clue how you can apply your own schedule/behavior.