15楼#
发布于:2017-05-14 00:22
aaaa007cn:首先改install.rdf的unpack或许不是bug, 因为测试了多个扩展, 不过签的原因各不相同, 有的是由于install.rdf中的内容不全, 会被系统判定为非webext扩展而无法过签, 有的是空文件所引起不能过签, 又或者因unpack所引起, 总之因素不一, 但目前有一点应该可以确定, 补全manifest.json, 并添加相关文件到扩展, 就可以过签, 但补全后的过签扩展, 能安装到Fx无法而正常运行, 就算骗过了也依然无用, 应该是install.rdf和manifest.json的优先级有冲突吧? 导致扩展不能正常运行. 所以最根本的还是传统扩展本身文件内容有不符合AMO要求, 以致于无法在AMO过签. AMO检测系统绝不是简单检测几个文件, 但也绝非无懈可击. 至于修改顶楼原帖, 因为论坛脚本载入延迟, 导致顶楼内容全部丢失, 不得不重新填写内容, 与第一次发帖内容已经不尽相同, 但问题本身没变, 摊手... |
|
16楼#
发布于:2017-05-14 04:02
在这次测试过程中, 起初想找一些unpack为true的扩展, 所以, 把Foxyproxy Standard 4.6.5修改了下, 剔除了内置广告, 也过了签, 就顺手传到坛子上了, 但考虑到开发团队长期维护的艰辛, 保留了捐赠渠道, 送给需要的人吧.
下载见: 实用精品扩展分类整理 功能比对及备份 顶楼索引详细见分楼楼层 (完结) (顶楼附件) ![]() |
|
17楼#
发布于:2017-05-14 11:19
|
|
|
18楼#
发布于:2017-05-14 11:59
反正谋智表示 53 开始不接受新的传统扩展
但是可以给同一帐号下曾经提交过的同一个传统扩展更新新的传统扩展版本 除此以外的情况都应该直接给出这个错误 https://www.firefox.net.cn/read-54228 从目前最新的 4 月 28 日的 0f8b585 的 /src/olympia/devhub/tasks.py 来看 判断的条件是 https://github.com/mozilla/addons-server/blob/0f8b585/src/olympia/devhub/tasks.py#L190-L195 if (not upload.addon_id or not upload.addon.find_latest_version(channel=channel, exclude=())): # Legacy submission restrictions apply if: # - It's the very first upload (there is no addon id yet) # - It's the first upload in that channel 新的 id 或者 RELEASE_CHANNEL_LISTED/RELEASE_CHANNEL_UNLISTED 通道的新上传 https://github.com/mozilla/addons-server/blob/0f8b585/src/olympia/devhub/tasks.py#L295-L298 if (is_extension_type and not is_webextension and is_targeting_firefoxes_only and not is_targeting_firefox_lower_than_53_only and 扩展 + 非 webext + 仅针对 firefox + 非仅针对 firefox 53 以下 看来谋智还记得被他们抛弃的 SeaMonkey 啊 https://www.firefox.net.cn/read-54057 附赠 The State of the SeaMonkey Union! http://forums.mozillazine.org/viewtopic.php?f=3&t=3029957 TL;DR 目前对于 UNLISTED 扩展来说最简单的方法是添加至少一个非 firefox 的 targetApplication 相关 guid 参考 https://github.com/mozilla/addons-server/blob/master/src/olympia/constants/applications.py 其他未列出的各种第三方编译版和 forks 你自己找吧 |
|
|
19楼#
发布于:2017-05-14 12:05
此外
在扩展同时含有 install.rdf 和 manifest.json 的时候 目前 amo 是优先 manifest.json 的 https://github.com/mozilla/addons-server/blob/7e95c7d/src/olympia/files/utils.py#L118-L123 install_rdf = os.path.join(path, 'install.rdf') manifest_json = os.path.join(path, 'manifest.json') if os.path.exists(manifest_json): return ManifestJSONExtractor(manifest_json).parse() elif os.path.exists(install_rdf): return RDFExtractor(path).data 而目前的 resource://gre/modules/addons/XPIProvider.jsm 则是优先 install.rdf https://dxr.mozilla.org/mozilla-central/rev/96b36c5f527dd42e680a230839519eee1fc2c9f3/toolkit/mozapps/extensions/internal/XPIProvider.jsm#895-901 function getManifestEntryForZipReader(aZipReader) { if (aZipReader.hasEntry(FILE_RDF_MANIFEST)) return FILE_RDF_MANIFEST; if (aZipReader.hasEntry(FILE_WEB_MANIFEST)) return FILE_WEB_MANIFEST; return null; } https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json 最小 manifest.json 仅需 manifest_version、version、name 这仨属性 我给一个 xul 扩展加了这个 manifest.json 后 安装、加载、使用毫无问题 |
|
|
20楼#
发布于:2017-05-14 14:56
是有办法给一个不上架unlisted传统扩展添加签名的,因为amo允许给一个从webext扩展给其提交一个传统扩展版本的更新。你可以先提交通过一个最小版本的webext扩展(其实就是一个manifest.json),如上楼所说的格式,加个id属性,或参考mdn。然后给这个扩展上传一个新版本的传统扩展,保证id和你的webext扩展的id是一样的就可以。
注意,只针对未上架自己弄签名用,上架必须经过官方审核那肯定就不行。 所以说amo没有马上关闭未上架扩展签名的通道,只是必须按他规定先传个同id的webext扩展迂回一下。 现在不知道还行不行,大家试试看。 |
|
|
21楼#
发布于:2017-05-14 15:29
https://github.com/mozilla/addons-server/blob/0f8b585/src/olympia/devhub/tasks.py#L357-L374
当 was_webextension 为 true 且 is_webextension 为 false 时 RELEASE_CHANNEL_LISTED 给 error 除此以外的比如 RELEASE_CHANNEL_UNLISTED 给 warning 应该可行 翻了下 issues 又发现个有趣的漏洞 https://github.com/mozilla/addons-server/issues/4689 |
|
|
22楼#
发布于:2017-05-14 17:25
aaaa007cn:反正谋智表示 53 开始不接受新的传统扩展是的, 我在测试的扩展中都至少添加了一个targetApplication, 但有些单单添加targetApplication还不行, 例如foxyproxy. AMO现在比以前做了很多限制, 加了很多新的判定. 哦, 忘了说了, 以为options_ui, default_popup, 和background也是必备, 看来想多了, 之前已经看了很多文档, 做了很多测试, 累了, 等空了再试试 谋智确实没有完全的抛弃seamonkey, 仍然还记得它 https://github.com/mozilla/addons-server/issues/4689 嗯, 确实挺有趣的 |
|
23楼#
发布于:2017-05-14 17:39
|
|
24楼#
发布于:2017-05-14 18:42
那麻烦整理一下未上架传统扩展能过签的方法。大家看了也直观
|
|
|
25楼#
发布于:2017-05-14 19:43
targetApplication 当然至少要有一个
不然扩展根本没有用/没法用 重点是要有至少一个非 firefox、firefox for android 的 targetApplication 来绕过 53 开始的 amo 限制新传统扩展 代码是这样的 is_targeting_firefoxes_only = ( set(target_apps.keys()).intersection(('firefox', 'android')) == set(target_apps.keys()) ) 只要 target_apps 和 ('firefox', 'android') 的交集不等于 target_apps is_targeting_firefoxes_only 就是 false 原版 FoxyProxy Standard 的 targetApplication 为 Firefox + SeaMonkey + Thunderbird + Palemoon target_apps 为 ('firefox', 'seamonkey', 'thunderbird') 和 ('firefox', 'android') 相交后为 ('firefox') 与原来的 target_apps 不等 如果只改了扩展 id 然后提交 amo 不会因为这是个传统扩展而拒绝的 强调一下 不管 amo 判定怎么改 目前拒绝新的非传统扩展给的错误提示只有 "Starting with Firefox 53, new extensions on this site can only be WebExtensions." 这一个 除此以外的被拒都是扩展本身有问题 所以 amo 到底给了哪些错误(非警告)? 当时上传的 xpi 又是怎样的? amo 的代码都在 github 上 有什么疑惑可以直接翻代码 比黑盒测试要省时省力多了 |
|
|
26楼#
发布于:2017-05-14 20:01
57 预计 11 月 14 日发布
正好 6 个月之后 legacy extensions on suicide watch |
|
|
27楼#
发布于:2017-05-15 00:53
fang5566:那麻烦整理一下未上架传统扩展能过签的方法。大家看了也直观回到原帖或许回复有些凌乱, 但基本上都已经解释清楚了. AMO系统会优先检测的是扩展本身文件及结构等等是否存在问题. 而当传统扩展本身文件内容及结构符合AMO要求, 却出现"Starting with Firefox 53, new extensions on this site can only be WebExtensions."错误提示时, 则只需要在install.rdf中添加除firefox以外的targetApplication, 基本可以过检签名(留点余地, 没什么是绝对的事情). 再有可以通过添加manifest.json在AMO检测过签(条件是扩展本身符合AMO系统要求). 若有些传统扩展本身存在问题, 也能导致不过签, 诸如文件内容含有的字段, 文件编码, 文件名过长, 空文件等等(有些感觉属于玄学, 不一一赘述, AMO系统经常升级变化), 当有这些问题存在时, 基本上都是一些与manifest.json有关的错误提示, 就需要花时间去找了, 这种情况有些费精力, 推荐二分法查找会省些时间与精力. 至于原因, 007都已经解释的很清楚了, 就不再多费唇舌, 传统扩展想签名的话, 仔细看看这个帖子吧, 基本上可以解决大多无法过签的传统扩展. 目前还看, 只能通过在install.rdf中添加localized指定扩展的详细说明了, 还没有更好的解决方法 |
|
28楼#
发布于:2017-05-15 07:52
|
|
|
29楼#
发布于:2017-05-15 08:08
高级玩家表示 不需要签名就能用
|
|
|