我们有一个Firefox插件,我们在自己的安全(https)服务器上托管自己。我们的插件始终首次安装到当前版本的Firefox中,没有问题。但是,当发布插件的新版本并且Firefox附加组件管理器的更新机制被调用时,一些更新将成功,一些将失败。在某些机器上更新Firefox插件失败
到目前为止,我们一直无法确定是什么导致了随机故障。我们希望有人能够看到我们的信息,并能看到我们错过的东西,并帮助我们解决这个问题。
这里是我们的RDF文件...
<?xml version="1.0" encoding="utf-8"?>
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#">
<Description about="urn:mozilla:extension:[email protected]">
<em:updates>
<Seq>
<li>
<Description>
<em:version>2.0.27</em:version>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>10.0</em:minVersion>
<em:maxVersion>23.*</em:maxVersion>
<em:updateLink>https://livehiveapp.com/product/extensions/ff/livehive.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>
这是从一台机器输出的日志无法更新...
001 LOG addons.updates: Requesting https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=2&id={f13b157f-b174-47e7-a34d-4815ddfdfeb8}&version=0.9.89&maxAppVersion=14.0a1&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}&appVersion=23.0.1&appOS=WINNT&appABI=x86-msvc&locale=en-US¤tAppVersion=23.0.1&updateType=97&compatMode=normal
002 LOG addons.updates: Requesting https://versioncheck.addons.mozilla.org/update/VersionCheck.php?reqVersion=2&[email protected]&version=2.4.0.1&maxAppVersion=20.*&status=userEnabled&appID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}&appVersion=23.0.1&appOS=WINNT&appABI=x86-msvc&locale=en-US¤tAppVersion=23.0.1&updateType=97&compatMode=normal
003 LOG addons.updates: Requesting https://livehiveapp.com/product/extensions/ff/update_ff.rdf
004 LOG addons.updates: Found an update entry for [email protected] version 2.0.27
005 LOG addons.updates: Found an update entry for {f13b157f-b174-47e7-a34d-4815ddfdfeb8} version 0.9.89
006 LOG addons.updates: Found an update entry for [email protected] version 2.4.0.1
007 LOG addons.xpi: Download started for https://livehiveapp.com/product/extensions/ff/livehive.xpi to file C:\Users\dstod\AppData\Local\Temp\tmp-i1t.xpi
008 LOG addons.xpi: Download of https://livehiveapp.com/product/extensions/ff/livehive.xpi completed.
009 LOG addons.repository: Requesting https://services.addons.mozilla.org/en-US/firefox/api/1.5/search/guid:jid1-aWPVzAyllHmjZg%40jetpack?src=firefox&appOS=WINNT&appVersion=23.0.1
010 LOG addons.xpi: Starting install of https://livehiveapp.com/product/extensions/ff/livehive.xpi
011 LOG addons.xpi: Addon [email protected] will be installed as a packed xpi
012 LOG addons.xpi: Calling bootstrap method shutdown on [email protected] version 2.0.23
013 Could not read chrome manifest 'file:///C:/Program%20Files%20(x86)/Mozilla%20Firefox/chrome.manifest'.
014 Could not read chrome manifest 'file:///C:/Program%20Files%20(x86)/Mozilla%20Firefox/browser/extensions/%7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D/chrome.manifest'.
015 LOG addons.xpi: Calling bootstrap method uninstall on [email protected] version 2.0.23
016 LOG addons.xpi: Loading bootstrap scope from C:\Users\dstod\AppData\Roaming\Mozilla\Firefox\Profiles\f1hj0mzi.default\extensions\[email protected]
017 LOG addons.xpi: Calling bootstrap method install on [email protected] version 2.0.23
018 LOG addons.xpi: Install of https://livehiveapp.com/product/extensions/ff/livehive.xpi completed.
019 LOG addons.xpi: Calling bootstrap method startup on [email protected] version 2.0.23
在这种情况下,我们都从版本2.0.23升级到版本2.0.27。请注意日志中正确的RDF文件的位置(第3行),新版本的正确识别(第4行)以及新的.XPI文件已成功下载(第8行)。然后旧版本2.0.23关机(第12行),并卸载(第15行)。
正是在这里,事情似乎出问题:而不是安装的版本2.0.27已被下载,版本2.0.23,而不是被再次重新启动(第17-19行),从而阻碍了更新。没有错误记录,也没有线索给出为什么这种奇怪的行为发生。
任何人都可以对这里可能发生的事情有所了解吗?
由于没有其他错误,我敢打赌,浏览器仍然会缓存https://livehiveapp.com/product/extensions/ff/livehive.xpi。尝试使用无缓存标头或更好的缓存验证程序,或者为每个版本的XPI使用唯一的URI。 – nmaier
你的建议原来是答案!我们更改了XPI的URL以包含版本号以使其唯一并且问题消失。感谢您的建议。我怎么能给你评论里面的答案信贷? –
将评论变为答案。 – nmaier