通过jpm生成签名的XPI失败 [英] Generating signed XPI via jpm failed

查看:156
本文介绍了通过jpm生成签名的XPI失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出现问题通过失败,并显示错误消息

错误:在请求时,收到来自服务器的错误响应https://addons.mozilla.org/api/v3/addons/%40addonname/versions/0.xy/

通过Web界面签名有效.

Signing via the web interface worked.

如何解决?

完整的详细输出是

JPM [info] binary set to /usr/bin/firefox  
JPM [info] verbose set  
JPM [info] Checking compatability bootstrap.js and install.rdf for xpi  
Validating the manifest  
JPM [info] Creating fallbacks if they are necessary..  
Creating XPI  
JPM [info] Creating XPI...  
JPM [info] .jpmignore found  
JPM [info] Adding: /path/to/file  
[...]  
JPM [info] Adding: /path/to/another_file  
JPM [info] XPI created at /tmp/tmp-unsigned-xpi-25600yuqzFN3Alxa0/@addonname-0.x.y.xpi (121ms)  
JPM [info] Removing fallbacks if they were necessary..  
JPM [info] Creating updateRDF...  
Created XPI at /tmp/tmp-unsigned-xpi-25600yuqzFN3Alxa0/@addonname-0.x.y.xpi  
JPM [info] Created XPI for signing: /tmp/tmp-unsigned-xpi-25600yuqzFN3Alxa0/@addonname-0.x.y.xpi  
JPM [debug] [API] -{ url: 'https://addons.mozilla.org/api/v3/addons/%40addonname/versions/0.x.y/',  
  formData:   
   { upload:   
      { _readableState: [Object],  
        readable: true,  
        domain: null,  
        _events: [Object],  
        _eventsCount: 1,  
        _maxListeners: undefined,  
        path: '/tmp/tmp-unsigned-xpi-25600yuqzFN3Alxa0/@addonname-0.x.y.xpi',  
        fd: null,  
        flags: 'r',  
        mode: 438,  
        start: undefined,  
        end: undefined,  
        autoClose: true,  
        pos: undefined } },  
  headers: { Authorization: '<REDACTED>', Accept: 'application/json' } }  
JPM [debug] [API] <- { headers:   
   { allow: 'GET, PUT, HEAD, OPTIONS',  
     'content-type': 'application/json',  
     date: 'Thu, 17 Dec 2015 10:17:23 GMT',  
     server: 'nginx',  
     'set-cookie': '<REDACTED>',  
     'strict-transport-security': 'max-age=31536000',  
     vary: 'Accept, X-Mobile, User-Agent',  
     'www-authenticate': 'JWT realm="api"',  
     'x-frame-options': 'DENY',  
     'content-length': '51',  
     connection: 'Close' },  
  response: { detail: 'Incorrect authentication credentials.' } }  
JPM [error] FAIL  
Error: Received bad response from the server while requesting https://addons.mozilla.org/api/v3/addons/%40addonname/versions/0.x.y/  

status: 401  
response: {"detail":"Incorrect authentication credentials."}  
headers: {"allow":"GET, PUT, HEAD, OPTIONS","content-type":"application/json","date":"Thu, 17 Dec 2015 10:17:23 GMT","server":"nginx","set-cookie":["multidb_pin_writes=y; expires=Thu, 17-Dec-2015 10:17:38 GMT; Max-Age=15; Path=/"],"strict-transport-security":"max-age=31536000","vary":"Accept, X-Mobile, User-Agent","www-authenticate":"JWT realm=\"api\"","x-frame-options":"DENY","content-length":"51","connection":"Close"}  

    at /usr/local/lib/node_modules/jpm/lib/amo-client.js:85:13  
    at tryCatchReject (/usr/local/lib/node_modules/jpm/node_modules/when/lib/makePromise.js:845:30)  
    at runContinuation1 (/usr/local/lib/node_modules/jpm/node_modules/when/lib/makePromise.js:804:4)  
    at Fulfilled.when (/usr/local/lib/node_modules/jpm/node_modules/when/lib/makePromise.js:592:4)  
    at Pending.run (/usr/local/lib/node_modules/jpm/node_modules/when/lib/makePromise.js:483:13)  
    at Scheduler._drain (/usr/local/lib/node_modules/jpm/node_modules/when/lib/Scheduler.js:62:19)  
    at Scheduler.drain (/usr/local/lib/node_modules/jpm/node_modules/when/lib/Scheduler.js:27:9)  
    at doNTCallback0 (node.js:417:9)  
    at process._tickCallback (node.js:346:13)

推荐答案

这些帖子( 1 ),( 2 )表明,如果您的本地时钟出现此错误, Mozilla服务器关闭时间超过60秒.

These posts (1), (2) show that this error can occur if your local clock is off by more than 60 seconds with the Mozilla server.

Olympia 3.0身份验证API (请参见exp参数):

iat

这是标准的JWT索赔,指出了当时发出的索赔.它应该是Unix时代的时间戳,并且必须是UTC时间.

This is a standard JWT claim indicating the issued at time. It should be a Unix epoch timestamp and must be in UTC time.

exp

这是标准的JWT声明,指示到期时间.它应该是UTC时间中的Unix时代时间戳,并且必须不再是 比发布时间晚60秒.

This is a standard JWT claim indicating the expiration time. It should be a Unix epoch timestamp in UTC time and must be no longer than 60 seconds past the issued at time.

如果您无法通过身份验证,请确保系统时钟 是正确的,请考虑与NTP之类的设备进行同步 (网络时间协议).

If you’re having trouble authenticating, make sure your system clock is correct and consider synchronizing it with something like NTP (Network Time Protocol).

这篇关于通过jpm生成签名的XPI失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆