Force Updates At Startup

198 views
Skip to first unread message

Kyrian Willis

unread,
Oct 22, 2014, 12:44:22 PM10/22/14
to chromium-...@chromium.org

I have a mission critical application in the form of a chrome packaged app. This is an app that is installed via [Enterprise Policy][1]. I've set up the auto update process however there are times when I need to force the update when the user logs in (I some times have breaking changes on the back-end that render older versions useless).

Currently if there is a new version available Chrome may or may not update right away when the user logs in. In my application I can detect the version and prompt the user to manually force an update but this is less than optimal. Users who are not overly familiar with Chrome can have trouble working through this process.

Ideally I would like to be able to have Chrome immediately look for and install updates on start up. Or allow the packaged app to force the update. Is that possible?

David Levin

unread,
Oct 22, 2014, 1:25:14 PM10/22/14
to Kyrian Willis, Chromium-extensions
Here's what we're doing for our app (but I don't claim to have the best solution):
I don't know how foolproof there is. (I also don't know if there is some maximum update check count, etc. That for our code we're a little new at this, so I don't we know all the edge cases.)  We still have a fallback ui to show the user if the app is out of date and we haven't been able to update it.

I suspect if you wanted to be more robust, you could also check chrome version and prompt people about that in case you set up a min Chrome version.

That's my brain dump.

hope that helps,
dave



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-extens...@chromium.org.
To post to this group, send email to chromium-...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-extensions/6fabd2c7-8abb-4e68-9460-85408e683c1c%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Antony Sargent

unread,
Oct 23, 2014, 3:30:58 PM10/23/14
to David Levin, Kyrian Willis, Chromium-extensions
Looks like we currently enforce a 5 second throttle, and may in the future dynamically increase this value if the method is called frequently. Also, we do some amount of throttling on the autoupdate server to limit the total estimated aggregate bandwidth so we don't get enormous spikes, but this typically only affects updates published by the top few most popular extensions/apps. 

Anyhow, my advice is that you continue with the strategy you already have. At startup, have your app ping your server, and if the response indicates that the app version is too old to continue, put up UI for the user saying something like "Updating client..." while you call chrome.runtime.requestUpdateCheck() followed by chrome.runtime.reload when the callback comes back saying the update is available. You need to decide how to handle the situation where the check result came back saying the update isn't available yet. One good strategy would be to keep retrying the requestUpdateCheck call with an exponentially growing delay, up to some max value. In the case where you continue not to get a successful result from requestUpdateCheck, after some reasonable time you'll want to update the UI to let the user know the update couldn't be downloaded. If needed you can continue checking from your background page, using the chrome.alarms API to schedule wakeups.  



Reply all
Reply to author
Forward
0 new messages