Firefox 附加组件签名错误

问题描述 投票:0回答:2

我制作了一个简单的附加组件,现在我想对其进行签名,以便它可以在开发人员模式之外工作。 我阅读了 mozilla 网站上的文档,但是当我尝试使用我的 API 密钥和密码运行 jpm Sign 命令时,出现此错误:

JPM [info] Created XPI for signing: C:\Users\STEFAN~1\AppData\Local\Temp\tmp-unsigned-xpi-5168BFT2GMmLtNlm\@ffe-1.0.0.xpi
JPM [error] FAIL
Error: Received bad response from the server while requesting https://addons.mozilla.org/api/v3/addons/%40ffe/versions/1.0.0/

status: 401
response: {"detail":"Unknown JWT iss (issuer)"}
headers: {"allow":"GET, PUT, HEAD, OPTIONS","content-security-policy":"script-src 'self' https://addons.mozilla.org https://www.paypalobjects.com https://apis.google.com https://www.google.com/recaptcha/ https://www.gstatic.com/recaptcha/ https://ssl.google-analytics.com https://addons.cdn.mozilla.net; default-src 'self'; img-src 'self' data: blob: https://www.paypal.com https://ssl.google-analytics.com https://addons.cdn.mozilla.net https://static.addons.mozilla.net https://ssl.gstatic.com/ https://sentry.prod.mozaws.net; media-src https://videos.cdn.mozilla.net; style-src 'self' 'unsafe-inline' https://addons.cdn.mozilla.net; frame-src 'self' https://ic.paypal.com https://paypal.com https://www.google.com/recaptcha/ https://www.paypal.com; object-src 'none'; connect-src 'self' https://sentry.prod.mozaws.net; font-src 'self' https://addons.cdn.mozilla.net; report-uri /__cspreport__","content-type":"application/json","date":"Tue, 15 Mar 2016 22:27:05 GMT","server":"nginx","set-cookie":["multidb_pin_writes=y; expires=Tue, 15-Mar-2016 22:27:20 GMT; Max-Age=15; Path=/"],"strict-transport-security":"max-age=31536000","vary":"X-Mobile, User-Agent","www-authenticate":"JWT realm=\"api\"","x-content-type-options":"nosniff","x-frame-options":"DENY","x-xss-protection":"1; mode=block","content-length":"38","connection":"Close"}

at C:\Users\stefanmarkovic\AppData\Roaming\npm\node_modules\jpm\lib\amo-client.js:92:13
at tryCatchReject (C:\Users\stefanmarkovic\AppData\Roaming\npm\node_modules\jpm\node_modules\when\lib\makePromise.js:845:30)
at runContinuation1 (C:\Users\stefanmarkovic\AppData\Roaming\npm\node_modules\jpm\node_modules\when\lib\makePromise.js:804:4)
at Fulfilled.when (C:\Users\stefanmarkovic\AppData\Roaming\npm\node_modules\jpm\node_modules\when\lib\makePromise.js:592:4)
at Pending.run (C:\Users\stefanmarkovic\AppData\Roaming\npm\node_modules\jpm\node_modules\when\lib\makePromise.js:483:13)
at Scheduler._drain (C:\Users\stefanmarkovic\AppData\Roaming\npm\node_modules\jpm\node_modules\when\lib\Scheduler.js:62:19)
at Scheduler.drain (C:\Users\stefanmarkovic\AppData\Roaming\npm\node_modules\jpm\node_modules\when\lib\Scheduler.js:27:9)
at doNTCallback0 (node.js:419:9)
at process._tickCallback (node.js:348:13)

我不知道我做错了什么,因为我输入了 API 密钥 JWT 发行者:用户:********:*** 作为 API 秘密,我输入了 智威汤逊秘密:************************************************ **********

所以我的命令如下所示:

jpm sign --api-key ${user:*******:***} --api-secret ${**************************************************************}
firefox-addon firefox-addon-sdk mozilla sign jpm
2个回答
5
投票

您的命令中是否包含

${}
?如果是这样,请将其删除。

例如,如果您的

api-key
user:12345678:987
并且您的
api-secret
28934y23i4h32i4j23nk4j32443h
那么您的命令应该类似于 this:

jpm sign --api-key user:12345678:987 --api-secret 28934y23i4h32i4j23nk4j3244

不是:

jpm sign --api-key ${user:12345678:987} --api-secret ${28934y23i4h32i4j23nk4j3244}

0
投票

当您的

api-key
api-secret
输入错误时,通常会发生这种情况。请仔细检查格式是否正确,例如没有
${...}
括号,或者有一些额外的字符等

© www.soinside.com 2019 - 2024. All rights reserved.