updateURL 验证时出错
我开发了一个我们公司内部使用的小插件。它托管在启用 https 的站点上,最新的插件位于 https://addon.example.com/latest。 据我所知,
我的更新测试运行良好(从 FF6 到 FF7),但现在我正在为 FF9 做准备,我从兼容性检查器中得到了这个(https://addons.mozilla.org/en-US/developers/addon/validate)
install.rdf 中的禁止元素
错误:在附加组件的 install.rdf 中找到元素“updateURL” 文件。当前配置下的附加组件中不允许这样做。
然而,该插件在 Firefox (8) 中安装时没有错误。
该插件是使用 SDK 1.3 使用此命令构建的
cfx xpi -a firefox -b /opt/src/firefox9/firefox --update-link https://addon.example.com/latest.xpi --update-url https://addon.example.com/update_rdf
安装 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:install-manifest">
<em:id>jid0-0Nt2rqZFckzRbKQ2KxdU13Q8w8Y@jetpack</em:id>
<em:version>0.7.0</em:version>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:unpack>true</em:unpack>
<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>8.0</em:minVersion>
<em:maxVersion>9.*</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Front End MetaData -->
<em:name>BOLT</em:name>
<em:description>BOLT Extension.</em:description>
<em:creator>Daniel</em:creator>
<em:iconURL/>
<em:icon64URL/>
<em:homepageURL>https://example.com/78857360</em:homepageURL>
<em:optionsURL/>
<em:updateURL>https://addon.example.com/update_rdf</em:updateURL>
</Description>
</RDF>
所示 更新 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:jid0-0Nt2rqZFckzRbKQ2KxdU13Q8w8Y@jetpack">
<em:updates>
<Seq>
<li>
<Description>
<em:version>0.7.0</em:version>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>8.0</em:minVersion>
<em:maxVersion>9.*</em:maxVersion>
<em:updateLink>https://addon.example.com/latest.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>
我可能会感到困惑。查看文档 https://addons.mozilla.org/en-US/developers/docs/sdk/1.3/dev-guide/addon-development/cfx-tool.html 我真的看不出会是什么 错误的。
任何见解都值得赞赏。
(交叉发布在这里:https://forums.mozilla.org/addons/viewtopic.php?f=27&t=4429&p=13667#p13667)
I have developed a small addon we use internally at our company. It's hosted at a https enabled site and the latest addon is at https://addon.example.com/latest.xpi
My tests with updates have worked fine (from FF6 to FF7) as far as I can tell, but now I'm preparing for FF9 and I'm getting this from the compatibility checker (https://addons.mozilla.org/en-US/developers/addon/validate)
Banned element in install.rdf
Error: The element "updateURL" was found in the add-on's install.rdf
file. It is not allowed in add-ons under the current configuration.
The addon does however install in Firefox (8) without errors.
The addon was built with SDK 1.3 using this command
cfx xpi -a firefox -b /opt/src/firefox9/firefox --update-link https://addon.example.com/latest.xpi --update-url https://addon.example.com/update_rdf
The install RDF file looks as follows
<?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:install-manifest">
<em:id>jid0-0Nt2rqZFckzRbKQ2KxdU13Q8w8Y@jetpack</em:id>
<em:version>0.7.0</em:version>
<em:type>2</em:type>
<em:bootstrap>true</em:bootstrap>
<em:unpack>true</em:unpack>
<!-- Firefox -->
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>8.0</em:minVersion>
<em:maxVersion>9.*</em:maxVersion>
</Description>
</em:targetApplication>
<!-- Front End MetaData -->
<em:name>BOLT</em:name>
<em:description>BOLT Extension.</em:description>
<em:creator>Daniel</em:creator>
<em:iconURL/>
<em:icon64URL/>
<em:homepageURL>https://example.com/78857360</em:homepageURL>
<em:optionsURL/>
<em:updateURL>https://addon.example.com/update_rdf</em:updateURL>
</Description>
</RDF>
The Update RDF file looks as follows
<?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:jid0-0Nt2rqZFckzRbKQ2KxdU13Q8w8Y@jetpack">
<em:updates>
<Seq>
<li>
<Description>
<em:version>0.7.0</em:version>
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>8.0</em:minVersion>
<em:maxVersion>9.*</em:maxVersion>
<em:updateLink>https://addon.example.com/latest.xpi</em:updateLink>
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
</RDF>
I'm might confused here. Looking at the docs at https://addons.mozilla.org/en-US/developers/docs/sdk/1.3/dev-guide/addon-development/cfx-tool.html I can't really see what would be wrong.
Any insight is appreciated.
(cross-posted here: https://forums.mozilla.org/addons/viewtopic.php?f=27&t=4429&p=13667#p13667)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
兼容性检查器最初适用于 addons.mozilla.org 上托管的附加组件 - 并且 addons.mozilla.org 不允许附加组件设置
updateURL
,更新必须来自附加组件。再次访问 mozilla.org。如果您不打算在 addons.mozilla.org 上托管您的附加组件,那么您可以安全地忽略该错误,它不会影响您。The compatibility checker was originally meant for add-ons hosted on addons.mozilla.org - and addons.mozilla.org doesn't allow add-ons to set
updateURL
, the updates have to come from addons.mozilla.org again. If you don't plan to host your add-on on addons.mozilla.org then you can safely ignore that error, it won't affect you.我也有同样的问题。
我认为解决方案是放置 updateKey 部分,如下所示:
https://developer.mozilla.org/en-US/docs/Install_Manifests#updateKey
我会尝试并及时通知您:)
谢谢
I'm having the same problem.
I think the solution is to put the updateKey part, read:
https://developer.mozilla.org/en-US/docs/Install_Manifests#updateKey
I will try that and keep you updated :)
Thanks