自Chrome版本63.0.3239.84以来的ExtensionInstallForcelist政策问题

时间:2017-12-20 11:57:07

标签: google-chrome google-chrome-extension active-directory chromium group-policy

我正在通过ActiveDirectory域部署适用于Chrome的WebExtension。 此域中的计算机无法连接到Internet。只有Intranet中托管的网站可用。 因此,我使用ExtensionInstallForcelist策略在Chrome中安装WebExtension(不将其上传到Chrome网上应用店)。 在Intranet中,存在一个服务器,它托管WebExtension(.crx文件)和更新清单XML文件(指向.crx文件)。

Chrome版本62.0.3202.94一切正常。应用该策略后,WebExtension将安装在Chrome中。 WebExtension是强制安装的,因此用户无需手动激活它。

但是自从Chrome版本63.0.3239.84出现问题。 WebExtension已安装,但已立即停用。此外,我观察到一种奇怪的行为。启动Chrome后,WebExtension会在短时间内激活,但之后会立即停用。这种情况会发生几次,直到行为消退为止。如果Chrome已关闭并重新启动,则会重复此行为。在多个设备和其他域中的计算机上会出现此问题。

我检查了网址chrome:// policy。 ExtensionInstallForcelist条目已正确应用。

在chrome_debug.log中,Chrome似乎尝试在某个网址上检查WebExtension,但检查失败。问题也出现在"版本63.0.3239.108"和版本64.0.3282.24(官方版)beta(64位)"。在同一台机器上使用62.0.3202.94版本,一切正常。

为了更好地概述,我将在chrome_debug.log

的摘录中使用以下替换
VERBOSE1:content_hash_fetcher.cc(252)] Missing verified contents for {extensionID}, fetching...
VERBOSE1:network_delegate.cc(30)] NetworkDelegate::NotifyBeforeURLRequest: https://clients2.google.com/service/update2/crx?response=redirect&x=uc%26installsource%3Dsignature%26id%3D{extensionID}%26v%3D1.0.1
VERBOSE1:network_delegate.cc(30)] NetworkDelegate::NotifyBeforeURLRequest: chrome-extension://{extensionID}/background.js
VERBOSE1:content_verify_job.cc(230)] job failed for {extensionID} background.js reason:1
VERBOSE1:content_verifier.cc(144)] VerifyFailed {extensionID} reason:1
VERBOSE1:script_context.cc(111)] Created context: [...]
VERBOSE1:content_hash_fetcher.cc(301)] URLFetchComplete for {extensionID} is_success:1 https://clients2.google.com/service/update2/crx?response=redirect&x=uc%26installsource%3Dsignature%26id%3D{extensionID}%26v%3D1.0.1
VERBOSE1:content_verifier.cc(229)] OnFetchComplete {extensionID} success:0
WARNING:chrome_content_verifier_delegate.cc(197)] Corruption detected in policy extension {extensionID} installed at: C:\Users\Testuser\AppData\Local\Google\Chrome\User Data\Default\Extensions\{extensionID}\1.0.1_2
VERBOSE1:network_delegate.cc(30)] NetworkDelegate::NotifyBeforeURLRequest: http://{url_to_update_manifest}/?os=win&arch=x64&nacl_arch=x86-64&prod=chromecrx&prodchannel=&prodversion=63.0.3239.108&lang=de&acceptformat=crx2,crx3&x=id%3D{extensionID}%26v%3D0.0.0.0%26installsource%3Dreinstall%26uc
VERBOSE1:network_delegate.cc(30)] NetworkDelegate::NotifyBeforeURLRequest: http://{url_to_update_manifest}
VERBOSE1:pending_extension_manager.cc(305)] Extension id {extensionID} was entered for update more than once.  old location: 7  new location: 7  old version: invalid  new version: invalid
VERBOSE1:install_signer.cc(435)] Sending request: {"hash":"{value}=","ids":["{value}","{value}","{value}","{value}","{extensionID}","{value}","{value}"],"protocol_version":1}
VERBOSE1:network_delegate.cc(30)] NetworkDelegate::NotifyBeforeURLRequest: https://www.googleapis.com/chromewebstore/v1.1/items/verify
VERBOSE1:install_signer.cc(460)] Got response: {"protocol_version":1,"invalid_ids":["{extensionID}"],"signature":"{value}==","expiry":"2018-03-13","pubkey_sha1_hash":"{value}"}
VERBOSE1:content_verify_job.cc(230)] job failed for {extensionID} background.js reason:1
VERBOSE1:content_verifier.cc(144)] VerifyFailed {extensionID} reason:1

chrome_debug.log中的摘录:

{{1}}

我还调查了changelog和Chromium源代码,但找不到这种行为的原因。

https://chromium.googlesource.com/chromium/src/+log/62.0.3202.94..63.0.3239.84?pretty=fuller&n=10000

https://cs.chromium.org/chromium/src/extensions/browser/content_verifier.cc?sq=package:chromium&l=144

任何帮助将不胜感激,谢谢!

2 个答案:

答案 0 :(得分:1)

在manifest.json中定义update_url为我解决了这个问题。 update_url不需要是真正的update_url。例如,您可以将http://localhost/123定义为update_url。

以下来源帮助了我:

https://bugs.chromium.org/p/chromium/issues/detail?id=794219

https://cs.chromium.org/chromium/src/chrome/browser/extensions/install_verifier.cc?l=219&rcl=2c30e2d667b6790965fed75d19cc6b76be700265

答案 1 :(得分:0)

根据您的日志,Chrome检测到扩展程序中的更改,因此它会尝试从“本地商店”更新您的扩展程序,但也会从Chrome网上应用店更新。

因此,您应该检查扩展程序中使用的更新网址。

您还可以尝试使用Chrome 63重新打包您的扩展程序。