首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >未能用web-ext签署火狐WebExtensions

未能用web-ext签署火狐WebExtensions
EN

Stack Overflow用户
提问于 2017-01-17 09:21:57
回答 1查看 2.6K关注 0票数 3

我正在将Chrome扩展移植到火狐WebExtensions。在Chrome上一切都很好。

我在Firefox上尝试过这些:

1.修改我的扩展使其与火狐WebExtensions兼容,然后通过Load Temporary Add-on将其加载到火狐中,一切正常。

2.通过npm install -g web-ext安装web-ext模块。然后我运行web-ext run,火狐成功地启动了我的扩展安装。

3.运行 web-ext build,然后在火狐上安装打包的扩展,一切都正常。

代码语言:javascript
复制
D:\temp>web-ext build
Building web extension from D:\temp
Your web extension is ready: D:\temp\web-ext-artifacts\my_extension-1.0.zip

4.然后运行web-ext sign --api-key=MyApiKey --api-secret=MyApiSecret,它出错了:

代码语言:javascript
复制
D:\temp>web-ext sign --api-key=MyApiKey --api-secret=MyApiSecret
Building web extension from D:\temp

sign: Error: ENOTEMPTY: directory not empty, rmdir 'C:\Users\abc\AppData\Local\Temp\tmp-web-ext-628J9dJMBi0bWRX'
    at Error (native)
    at Object.fs.rmdirSync (fs.js:806:18)
    at _rmdirRecursiveSync (C:\Users\abc\AppData\Roaming\npm\node_modules\web-ext\node_modules\tmp\lib\tmp.js:284:10)
    at TempDir._cleanupCallback [as _removeTempDir] (C:\Users\abc\AppData\Roaming\npm\node_modules\web-ext\node_modules\tmp\lib\tmp.js:408:5)
    at TempDir.remove (C:\Users\abc\AppData\Roaming\npm\node_modules\web-ext\dist\webpack:\src\util\temp-dir.js:9:4939)
    at C:\Users\abc\AppData\Roaming\npm\node_modules\web-ext\dist\webpack:\src\util\temp-dir.js:9:3976
    at process._tickCallback (node.js:401:9)

sign: Error code: ENOTEMPTY

我进入了C:\Users\abc\AppData\Local\Temp\tmp-web-ext-628J9dJMBi0bWRX,实际上它是空的。有人知道为什么会这样吗?

我的api密钥和api秘密是为旧火狐JSCTypes加载项。这就是我不断犯错误的原因吗?

这是网页文稿

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-01-18 07:07:58

这个问题的解决方案

经过进一步的挖掘,我发现导致这个错误的原因是我在我的网络上使用了代理。我试图通过运行命令set HTTP_PROXY=MyProxyServerAddress来设置代理,然后错误就消失了。

其他故障解决

然后我再次尝试运行web-ext sign,发现了另一个错误:

代码语言:javascript
复制
Server response: You do not own this addon. (status: 403)
sign: WebExtError: The WebExtension could not be signed

我将我的外接程序(web-ext build生成的包)上传到Mozilla插件站点,然后再次运行web-ext sign。这一次外接程序成功地签署了。

注意:,每次运行web-ext sign时,您都需要更改插件的版本。否则,它将因错误而失败:Server response: Version already exists. (status: 409)

Cheers!

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/41693257

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档