Failing tests on master

So i just cloned master branch from github, and did npm install and npm test. I assumed they would pass, but they don't, and I can't figure out why. I don't have much experience with nodejs, hence looking for help.

~/node-red$ git status
On branch master
Your branch is up to date with 'origin/master'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

nothing added to commit but untracked files present (use "git add" to track)
admin@ip-20-1-12-216:~/node-red$ git pull
Already up to date.

The tests always fail at HTTP Request Node while starting/creating SSL server instance.

ssl port 10335
Fatal error: Cannot init without a stop

=============================== Coverage summary ===============================
Statements   : 40.75% ( 6829/16759 )
Branches     : 33.14% ( 3433/10359 )
Functions    : 42.38% ( 1056/2492 )
Lines        : 41.52% ( 6737/16224 )
Warning: Task "nyc:all" failed. Use --force to continue.

Aborted due to warnings.

I also see several warnings like this -

7 Mar 20:15:32 - [warn] Deprecated API warning: Calls to RED.util.evaluateJSONataExpression must include a callback. This will not be optional in Node-RED 4.0. Please identify the node from the following stack and check for an update on npm. If none is available, please notify the node author.
7 Mar 20:15:32 - [warn] Error
    at Object.evaluateJSONataExpression (/home/admin/node-red/packages/node_modules/@node-red/util/lib/util.js:194:1272)
    at Context.<anonymous> (/home/admin/node-red/test/unit/@node-red/util/lib/util_spec.js:647:33)
    at callFn (/home/admin/node-red/node_modules/mocha/lib/runnable.js:366:21)
    at (/home/admin/node-red/node_modules/mocha/lib/runnable.js:354:5)
    at Runner.runTest (/home/admin/node-red/node_modules/mocha/lib/runner.js:678:10)
    at /home/admin/node-red/node_modules/mocha/lib/runner.js:801:12
    at next (/home/admin/node-red/node_modules/mocha/lib/runner.js:593:14)
    at /home/admin/node-red/node_modules/mocha/lib/runner.js:603:7
    at next (/home/admin/node-red/node_modules/mocha/lib/runner.js:486:14)
    at Immediate._onImmediate (/home/admin/node-red/node_modules/mocha/lib/runner.js:571:5

I am not sure if they are related to the fatal error above.
Any help is appreciated. Thanks.

We do occasionally see SSL port error when running the tests, but it isn't consistent. I'm pretty sure it's a timing thing in one of the test setup/tear down parts.

The other warnings are known and unrelated (and already addressed in the dev branch for 4.0.

Ahh... ok. I was actually trying to duplicate the test fail issue from PR 4352, but am consistently running into this failure. I will have a go with the dev branch. Thanks.

This issue has been really consistent for me. I have tried about 50 times since yesterday, and encountered this about 90% of the runs. I have tried it on 2 different mahines:

  • AWS EC2 instance (c5.xlarge)
$ uname -a
Linux x.x.x.x 6.1.0-18-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) x86_64 GNU/Linux
admin@x.x.x.x:~/node-red$ node --version
  • my Macbook
% uname -a
Darwin R-23-AP-85-108M.local 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:31 PST 2024; root:xnu-10063.101.15~2/RELEASE_X86_64 x86_64
% node --version