Sample firefox add-on "cfx test" fail, why? - firefox

I used the instructions from https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/Installation
Initiated addition and run the test. Why, even in this example I have got an error as I can continue to develop?
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>

I just had the same issue on Ubuntu.
According to this bugzilla entry, there won't be any new releases of cfx any more. Instead, the node-based jpm ("jetpack mechanic") is the tool to go. A current minor issue, on Ubuntu the firefox binary has to be specified explicitly, e.g.
jpm -b /usr/bin/firefox test

Related

Sometimes when I run `npx hardhat compile` I get this error: FATAL ERROR: NewNativeModule Allocation failed - process out of memor

Sometimes when I run this command npx hardhat compile on my windows cli I get the error below:
Compiling 72 files with 0.7.0
contracts/libraries/ERC20.sol: Warning: SPDX license identifier not provided in source file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED" for non-open-source code.
Please see https://spdx.org for more information.
contracts/libraries/ERC1155/EnumerableSet.sol:158:5: Warning: Variable is shadowed in inline assembly by an instruction of the same name
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
^ (Relevant source part starts here and spans across multiple lines).
contracts/libraries/ERC1155/EnumerableSet.sol:224:5: Warning: Variable is shadowed in inline assembly by an instruction of the same name
function add(AddressSet storage set, address value) internal returns (bool) {
^ (Relevant source part starts here and spans across multiple lines).
Compiling 1 file with 0.8.0
<--- Last few GCs --->
[8432:042B0460] 263058 ms: Mark-sweep (reduce) 349.8 (356.3) -> 248.2 (262.4) MB, 434.4 / 0.2 ms (+ 70.9 ms in 3 steps since start of marking, biggest step 69.6 ms, walltime since start of marking 800 ms) (average mu = 0.989, current mu = 0.990) memory[8432:042B0460] 263627
ms: Mark-sweep (reduce) 248.2 (259.4) -> 248.2 (252.1) MB, 555.5 / 0.0 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 556 ms) (average mu = 0.969, current
mu = 0.023) memory p
<--- JS stacktrace --->
FATAL ERROR: NewNativeModule Allocation failed - process out of memory`
After some time the error just kind of goes away.
It goes away probably after I've restarted my system or created a new Hardhat project and imported the code there.
But this is happening too often, what could be the cause?
I've done quite some research and some answers suggested it might be a problem with Node and the application's memory allocation, but I don't know how I would apply the solutions to a Hardhat project.
Here is a link to one possible solution: https://medium.com/#vuongtran/how-to-solve-process-out-of-memory-in-node-js-5f0de8f8464c
OS: WINDOWS 10
CLI: WINDOWS CMD

Signing electron-builder generated package on windows fails when using self signed certificate

I have js project that ive packaged with electron-builder.
I want to sign windows package with self signed certificate.
My build machine is Windows Server 2019 64 bit.
Node version 12.18.2
I use electron-builder 22.7.0.
Ive generated pfx file on the different windows machine using following power shell commands
New-SelfSignedCertificate -DnsName www.github.com -CertStoreLocation cert:\LocalMachine\My -type CodeSigning
$pw = ConvertTo-SecureString -String sillypassword -Force –AsPlainText
Export-PfxCertificate -cert cert:\localMachine\my\SOMELONGNUMBERFROMFIRST COMMAND -FilePath $env:USERPROFILE\Desktop\Cert.pfx -Password $pw
Ive exported CSC_LINK and CSC_KEY_PASSWORD with proper values and im running electron-builder -p always --win to publish the package.
And i got following error
Exit code: 1. Command failed: C:\Users\travis\.cache\electron-builder\winCodeSign\winCodeSign-2.6.0\windows-10\x64\signtool.exe sign /t http://timestamp.digicert.com /f C:\Users\travis\certificate_win.pfx /d My project /du https://github.com/org/myrepo /p 434b9bda7dbaf509beaef9779192a67fbe263d70af93716804959aa49662adb6 (sha256 hash) /debug C:\Users\travis\build\org\myrepo\build\win-unpacked\My project.exe
232
SignTool Error: An unexpected internal error has occurred.
233
234
Error information: "Error: Store::ImportCertObject() failed." (-2146893808/0x80090010)
235
236
SignTool Error: An unexpected internal error has occurred.
237
stackTrace=
238
Error: Exit code: 1. Command failed: C:\Users\travis\.cache\electron-builder\winCodeSign\winCodeSign-2.6.0\windows-10\x64\signtool.exe sign /t http://timestamp.digicert.com /f C:\Users\travis\certificate_win.pfx /d My project /du https://github.com/org/myrepo /p 434b9bda7dbaf509beaef9779192a67fbe263d70af93716804959aa49662adb6 (sha256 hash) /debug C:\Users\travis\build\org\myrepo\build\win-unpacked\My project.exe
239
SignTool Error: An unexpected internal error has occurred.
240
226
Error information: "Error: Store::ImportCertObject() failed." (-2146893808/0x80090010)
227
228
SignTool Error: An unexpected internal error has occurred.
247
248
at C:\Users\travis\build\org\myrepo\node_modules\builder-util\src\util.ts:129:16
229
at ChildProcess.exithandler (child_process.js:310:5)
230
at ChildProcess.emit (events.js:315:20)
245
at maybeClose (internal/child_process.js:1021:16)
246
at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
249
From previous event:
250
at processImmediate (internal/timers.js:456:21)
251
From previous event:
258
at WinPackager.signApp (C:\Users\travis\build\org\myrepo\node_modules\app-builder-lib\src\winPackager.ts:357:27)
259
at WinPackager.doPack (C:\Users\travis\build\org\myrepo\node_modules\app-builder-lib\src\platformPackager.ts:244:16)
243
at WinPackager.pack (C:\Users\travis\build\org\myrepo\node_modules\app-builder-lib\src\platformPackager.ts:115:5)
244
at Packager.doBuild (C:\Users\travis\build\org\myrepo\node_modules\app-builder-lib\src\packager.ts:444:9)
241
at executeFinally (C:\Users\travis\build\org\myrepo\node_modules\builder-util\src\promise.ts:12:14)
242
at Packager._build (C:\Users\travis\build\org\myrepo\node_modules\app-builder-lib\src\packager.ts:373:31)
252
at Packager.build (C:\Users\travis\build\org\myrepo\node_modules\app-builder-lib\src\packager.ts:337:12)
253
at executeFinally (C:\Users\travis\build\org\myrepo\node_modules\builder-util\src\promise.ts:12:14)
254
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I can sign it on my test machine that ive created specifically to test this behaviour, but it fails in Travis. How can i debug this situation to know what im doing wrong.
Thanks
For self-signed certificate, you'll probably need to first check if this cert was imported to your cert store. Then verify if the subject name was set properly. electron-builder (v22.6.0 - v22.8.1) has a bug signing windows store apps: https://github.com/electron-userland/electron-builder/issues/4931, but it may or may not have any relation to your windows .exe signing.

How to get a stack trace from FastMM under C++ Builder?

I managed to install FastMM4 under C++ Builder 2010 but the log file generated is filled with memory dumps or with statements like
The block is currently used for an object of class: Unknown
Last statement in log is:
5 - 12 bytes: TObject x 1 <------- this is mine! I created this leak intentionally!
13 - 20 bytes: Unknown x 8
53 - 68 bytes: std::locale::_Locimp x 1
181 - 212 bytes: Unknown x 1
I added to my project:
FastMM4.pas
FastMM4Messages.pas
FastMM4Options.inc
The Full Debug Mode (and several other features) were enabled manually in the inc file. The FastMM_FullDebugMode.dll is present in my project's folder.
I use USEOBJ("FastMM4BCB.cpp") in my project file (above 'useform') and I disabled the DynamicRTL (linker) in Project Options.
How to get decent info like stack trace?

Using htaccess to configure Apache and Passenger for Ruby

I've been trying to install a ruby app called Openproject on my bluehost account. I followed the Openproject guide.
https://www.openproject.org/open-source/manual-installation/manual-installation-guide/
I updated ruby and node using rbenv and nodenv. I was able to follow up to the section "Finish the Installation of OpenProject," and I didn't get any error up to this point.
However, I wasn't sure how to tackle the section "Servce OpenProject with Apache and Passenger." The guide asks to configure apache to load the right passenger, but Bluehost doesn't provide access to httpd.conf. Then I found the guide for Ruby from Bluehost indicating that I can use .htaccess to configure.
https://my.bluehost.com/cgi/help/rails
I copied the .htaccess from the guide and put it in openproject/public folder.
However, if I open mydomain.com/openproject, it displays the list of files inside openproject folder. If I open mydomain.com/openproject/public, I get the error below. I also tried to move .htaccess to openproject folder instead of openproject/public, but I get the same result.
I noticed a couple of things from the error message, but I'm not sure how to fix them.
1. The error indicates "No such file or directory - config.ru," even though openproject folder has the file config.ru.
2. The error indicates that Application root is /home5/account/public_html. Shouldn't it be /home5/account/public_html/openproject?
Anyways, here's the entire error message.
Ruby (Rack) application could not be started
These are the possible causes:
There may be a syntax error in the application's code. Please check for such errors and fix them.
A required library may not installed. Please install all libraries that this application requires.
The application may not be properly configured. Please check whether all configuration files are written correctly, fix any incorrect configurations, and restart this application.
A service that the application relies on (such as the database server or the Ferret search engine server) may not have been started. Please start that service.
Further information about the error may have been written to the application's log file. Please check it in order to analyse the problem.
Error message:
No such file or directory - config.ru Exception class:
Errno::ENOENT Application root: /home5/account/public_html
Backtrace: # File Line Location 0
/etc/httpd/modules/passenger/lib/phusion_passenger/utils.rb 675 in
lstat' 1
/etc/httpd/modules/passenger/lib/phusion_passenger/utils.rb 675 in
lower_privilege' 2
/etc/httpd/modules/passenger/lib/phusion_passenger/utils.rb 198 in
prepare_app_process' 3
/etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
156 inblock in initialize_server' 4
/etc/httpd/modules/passenger/lib/phusion_passenger/utils.rb 563 in
report_app_init_status' 5
/etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
154 ininitialize_server' 6
/etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
204 in start_synchronously' 7
/etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
180 instart' 8
/etc/httpd/modules/passenger/lib/phusion_passenger/rack/application_spawner.rb
129 in start' 9
/etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
253 inblock (2 levels) in spawn_rack_application' 10
/etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb
132 in lookup_or_add' 11
/etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
246 inblock in spawn_rack_application' 12
/etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb
82 in block in synchronize' 13 prelude> 10:insynchronize' 14
/etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server_collection.rb
79 in synchronize' 15
/etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
244 inspawn_rack_application' 16
/etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
137 in spawn_application' 17
/etc/httpd/modules/passenger/lib/phusion_passenger/spawn_manager.rb
275 inhandle_spawn_application' 18
/etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
357 in server_main_loop' 19
/etc/httpd/modules/passenger/lib/phusion_passenger/abstract_server.rb
206 instart_synchronously' 20
/etc/httpd/modules/passenger/helper-scripts/passenger-spawn-server 99
in ` '
Powered by Phusion Passenger, mod_rails / mod_rack for Apache and Nginx.

upgraded to swift 2, and cocoapods -.38.2 now getting build error Command /bin/sh failed with exit code 23

How can I diagnose this error Command /bin/sh failed with exit code 23
sent 130971 bytes received 42 bytes 262026.00 bytes/sec
total size is 130816 speedup is 1.00
rsync -auv "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftSecurity.dylib" "/Users/jinteki/Library/Developer/Xcode/DerivedData/MyApp-xyz/Build/Products/Debug-iphonesimulator/MyApp.app/Frameworks"
building file list ... rsync: link_stat "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/libswiftSecurity.dylib" failed: No such file or directory (2)
done
sent 29 bytes received 20 bytes 98.00 bytes/sec
total size is 0 speedup is 0.00
rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-45/rsync/main.c(992) [sender=2.6.9]
Command /bin/sh failed with exit code 23
I had this same issues and I cleaned the Build Folder via:
Product -> hold ALT pressed -> Clean Build Folder
Removing derived data works too
Xcode -> Preferences -> Locations -> tap on the derived data arrow -> Drag the derived data folder to trash
I had the same and nothing helped. I deleted the Pods folder from my project and ran pod install again. It worked…

Resources