我們有一個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