我有一个通过GPO部署到企业Windows计算机的Google Chrome扩展程序,并且托管在Chrome商店之外。它在全公司范围内部署到几十家不同的公司,每家公司都有一个带有不同自动更新URL的自定义.crx文件,以便他们在获得新版本时进行管理。通常情况下一切正常,但在一家公司,他们有一些自动更新的工作站和一些没有的工作站。某些工作站自动更新的事实似乎表明问题不在于.crx或更新xml文件。
我在一个有问题的工作站上运行chrome,并打开--enable-logging
以获取自动更新行为的调试日志,使用以下命令行:
C:\Program Files (x86)\Google\Chrome\Application>chrome.exe --vmodule=extension_updater=2 --enable-logging --extensions-update-frequency=30
这是来自chrome_debug.log
的extension_updater模块的输出。值得注意的是它不包括我的扩展名的密钥(它开始dcpd...
),虽然在这些extension_updater.cc行之上,我的扩展中有许多行记录了各种启动信息,表明它已经安装了。但是,当我将自己的日志记录在自动更新功能正常的计算机上时,除非有新版本,否则我的扩展程序也没有记录任何内容。不幸的是,似乎没有调试日志记录显示“没有可用于扩展XXX的更新”。
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(445)] Starting update check 0
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(417)] Extension ahfgeienlihckogmohjhadlkjgocpleb is not auto updateable
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(417)] Extension dnhpdliibojhegemfjheidglijccjfmc is not auto updateable
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(417)] Extension eemcgdkfndhakfknompkggombfjjjeno is not auto updateable
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(417)] Extension ennkphjdgehloodpbhlhldgbnhmacadg is not auto updateable
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(417)] Extension gfdkimpbcpahaombhbimeihdjnejgicl is not auto updateable
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(417)] Extension kmendfapggjehodndflmmgagdbamhnfd is not auto updateable
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(417)] Extension mfehgcgbbipciphmccgaenjidiccnmng is not auto updateable
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(417)] Extension mgndgikekgjfcpckkfioiadnlibdjbkf is not auto updateable
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(417)] Extension neajdppkdcdipfabeoofebfddakdcjhd is not auto updateable
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(417)] Extension nkeimhogjdpnpccoofpliimaahmaaome is not auto updateable
[4024:4788:0130/140321:VERBOSE2:extension_updater.cc(417)] Extension pafkbggdmjlpgkdkcbjmhmfcdpncadgh is not auto updateable
[4024:4788:0130/140322:VERBOSE2:extension_updater.cc(765)] Finished update check 0
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(445)] Starting update check 1
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(417)] Extension ahfgeienlihckogmohjhadlkjgocpleb is not auto updateable
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(417)] Extension dnhpdliibojhegemfjheidglijccjfmc is not auto updateable
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(417)] Extension eemcgdkfndhakfknompkggombfjjjeno is not auto updateable
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(417)] Extension ennkphjdgehloodpbhlhldgbnhmacadg is not auto updateable
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(417)] Extension gfdkimpbcpahaombhbimeihdjnejgicl is not auto updateable
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(417)] Extension kmendfapggjehodndflmmgagdbamhnfd is not auto updateable
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(417)] Extension mfehgcgbbipciphmccgaenjidiccnmng is not auto updateable
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(417)] Extension mgndgikekgjfcpckkfioiadnlibdjbkf is not auto updateable
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(417)] Extension neajdppkdcdipfabeoofebfddakdcjhd is not auto updateable
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(417)] Extension nkeimhogjdpnpccoofpliimaahmaaome is not auto updateable
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(417)] Extension pafkbggdmjlpgkdkcbjmhmfcdpncadgh is not auto updateable
[4024:4788:0130/140352:VERBOSE2:extension_updater.cc(765)] Finished update check 1
更新xml文件如下所示:
<gupdate xmlns="http://www.google.com/update2/response" protocol="2.0">
<app appid="dcpd....">
<updatecheck codebase="https://my-autoupdate-bucket.s3.amazonaws.com/path/to/extension.crx" version="1.0.11"/>
</app>
</gupdate>
crx中的manifest.json有一个指向正确位置的有效update_url。
{
"name": "My Extension Name",
"version": "1.0.8",
"update_url": "https://my-autoupdate-bucket.s3.amazonaws.com/path/to/the_update.xml",
"background": {
"page": "background.html"
},
"permissions": [
"tabs",
"webNavigation",
"webRequest",
"webRequestBlocking",
"notifications",
"<all_urls>"
],
"icons": {
"48": "RM_icon-48x48.png",
"128": "RM_icon-128x128.png"
},
"content_scripts": [
{
"matches": [
"<all_urls>"
],
"js": [
"stacktrace-min-0.3.js",
"jquery-1.7.2.min.js",
"underscore.js",
"content_script.js"
],
"run_at": "document_start"
}
],
"plugins": [
{
"path": "npRMAccessor.dll",
"public": true
}
],
"manifest_version": 2
}
公司已通过GPO部署了扩展程序,设置在User Configuration\Policies\Administrative Templates\Classice Administrative Templates\Google\Google Chrome\Extensions
配置强制安装的扩展程序列表 - 设置为dcpd....;https://my-autoupdate-bucket.s3.amazonaws.com/path/to/auto_update.xml
(但具有完整的扩展ID和正确的网址)。
配置扩展程序,应用和用户脚本安装源 - 设置为https://my-autoupdate-bucket.s3.amazonaws.com/path/*
当具有自动更新功能的用户无效或具有自动更新功能的用户访问chrome://policy
时,它会显示两个策略(“ExtensionInstallForcelist”和“ExtensionInstallSources”),这两个策略都设置并具有正确的相同值。没有设置其他策略,策略也没有安装其他扩展。
已经报告并测试过几次,如果客户的IT在不自动更新的工作站上运行gpupdate /force
,那么它将自动更新,但我看不出这是怎么回事。他们还尝试按chrome://extensions
上的“立即更新扩展程序”按钮,已自动更新扩展程序。但是,这些都不是我希望公司的IT团队必须做的事情。
是否有任何导致Google Chrome不会尝试自动更新我的扩展程序作为extension_updater.cc的一部分,或者我应该从故障排除的角度看待其他任何内容?
有问题的计算机在Windows 7上运行Chrome最新版本。