2014-12-27 13 views
5

Ho utilizzato le istruzioni da https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/InstallationIl componente aggiuntivo firefox "cfx ​​test" non funziona, perché?

Aggiunta avviata ed eseguire il test. Perché, anche in questo esempio, ho un errore che posso continuare a sviluppare?

C:\addon-sdk-1.17\bin>activate 
    Welcome to the Add-on SDK. For the docs, visit https://addons.mozilla.org/en-US/ developers/docs/sdk/latest/ 

    (C:\addon-sdk-1.17) C:\addon-sdk-1.17\bin>cd ../examples 

    (C:\addon-sdk-1.17) C:\addon-sdk-1.17\examples>mkdir fe 

    (C:\addon-sdk-1.17) C:\addon-sdk-1.17\examples>cd fe 

    (C:\addon-sdk-1.17) C:\addon-sdk-1.17\examples\fe>cfx init 
    * lib directory created 
    * data directory created 
    * test directory created 
    * generated jID automatically: jid1-pNW6cN0dpaDyiQ 
    * package.json written 
    * test/test-main.js written 
    * lib/main.js written 

    Your sample add-on is now ready. Do "cfx test" to test it and "cfx run" to try it. Have fun! 

    (C:\addon-sdk-1.17) C:\addon-sdk-1.17\examples\fe>cfx test 
    Using binary at 'C:\Program Files (x86)\Mozilla Firefox\firefox.exe'. 
    Using profile at 'c:\users\artur\appdata\local\temp\tmpxescsx.mozrunner'. 
    Running tests on Firefox 34.0.5/Gecko 34.0.5 ({ec8030f7-c20a-464f-9b0e-13a3a9e97 384}) under winnt/x86. .console.error: fe: fail: There was an uncaught Promise rejection: JS frame :: resource://gre/modules/Pr omise.jsm -> resource://gre/modules/Promise-backend.js :: PendingErrors.register :: line 159 JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise 
    -backend.js :: this.PromiseWalker.completePromise :: line 672 JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise 
    -backend.js :: Handler.prototype.process :: line 868 JS frame :: resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise 
    -backend.js :: this.PromiseWalker.walkerLoop :: line 744 native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0 console.trace: fe: 
    _ecated/unit-test.js 96 fail 
    _ecated/unit-test.js 61 TestRunner.prototype._uncaughtErrorObserver 
    _/Promise-backend.js 197 PendingErrors.report 
    _/Promise-backend.js 209 PendingErrors.flush 
    _/Promise-backend.js 611 Promise.Debugging.flushUncaughtErrors 
    _ecated/unit-test.js 306 done 
    _ecated/unit-test.js 529 start 
    _ecated/unit-test.js 491 runNextTest 
    _ecated/unit-test.js 496 startMany 
    _ecated/unit-test.js 26 findAndRunTests/< 
    _/Promise-backend.js 865 Handler.prototype.process 
    _/Promise-backend.js 744 this.PromiseWalker.walkerLoop 
         0 

    . 2 of 3 tests passed. Total time: 2.550000 seconds Program terminated unsuccessfully. 

    (C:\addon-sdk-1.17) C:\addon-sdk-1.17\examples\fe> 
+0

Sono curioso - dove è installato il tuo Python (è il predefinito 'C: \ Python27' o in 'Programmi' o' Programmi (x86) ')? – ysap

risposta

1

Ho appena avuto lo stesso problema su Ubuntu.

In base a questo bugzilla entry, non ci saranno più nuove versioni di cfx. Invece, lo strumento jpm ("jetpack mechanic") è lo strumento ideale. Un problema minore corrente, su Ubuntu il binario firefox deve essere specificato esplicitamente, ad es.

jpm -b /usr/bin/firefox test 
+0

Il repository addon-sdk sembra ancora molto attivo, quindi lo terrei d'occhio per una nuova versione. https://github.com/mozilla/addon-sdk – nnyby

Problemi correlati