I'm porting a Chrome extension to Firefox WebExtensions. Everything works fine on Chrome.
I've tried these on Firefox:
1. Modify my extension to make it compatible with Firefox WebExtensions, then load it in Firefox by Load Temporary Add-on
, everything works fine
2. Install web-ext
module by npm install -g web-ext
. Then I run web-ext run
, Firefox started successfully with my extension installed
3. Run web-ext build
, then install the packaged extension on Firefox, all worked fine
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. Then I run web-ext sign --api-key=MyApiKey --api-secret=MyApiSecret
, it failed with error:
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
I went into C:\Users\abc\AppData\Local\Temp\tmp-web-ext-628J9dJMBi0bWRX
and in fact it is empty. Does anybody know why this happens?
My api key and api secret are for old Firefox JSCTypes add-ons. Is this the reason why I keep getting this error?
Here is document of web-ext.