# Failing tests on master

**URL:** <https://discourse.nodered.org/t/failing-tests-on-master/86253>\
**Category:** General\
**Created:** [7 March 2024 20:24 UTC](https://discourse.nodered.org/t/failing-tests-on-master/86253 "2024-03-07T20:24:11Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![asr9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/asr9/32/82841_2.png) [@asr9](https://discourse.nodered.org/u/asr9)\
**Post date:** [7 March 2024 20:24 UTC](https://discourse.nodered.org/t/failing-tests-on-master/86253/1 "2024-03-07T20:24:11Z")

</div>

Hi,  
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.

```auto
~/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)
	test/unit/@node-red/runtime/lib/nodes/.testUserHome/

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.
admin@ip-20-1-12-216:~/node-red$

```

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

```HTTP
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 -

```auto
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 Runnable.run (/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.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [7 March 2024 21:06 UTC](https://discourse.nodered.org/t/failing-tests-on-master/86253/2 "2024-03-07T21:06:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![asr9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/asr9/32/82841_2.png) [@asr9](https://discourse.nodered.org/u/asr9)\
**Post date:** [7 March 2024 21:12 UTC](https://discourse.nodered.org/t/failing-tests-on-master/86253/3 "2024-03-07T21:12:51Z")

</div>

Ahh... ok. I was actually trying to duplicate the test fail issue from [PR 4352](https://github.com/node-red/node-red/pull/4352#issuecomment-1983969170), but am consistently running into this failure. I will have a go with the `dev` branch. Thanks.

---

<div class="post-metadata">

**Author:** ![asr9](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/asr9/32/82841_2.png) [@asr9](https://discourse.nodered.org/u/asr9)\
**Post date:** [8 March 2024 20:39 UTC](https://discourse.nodered.org/t/failing-tests-on-master/86253/4 "2024-03-08T20:39:58Z")

</div>

Update:  
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)

```auto
$ 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
v18.19.1

```

- my Macbook

```auto
% 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
v20.11.1

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [6 June 2024 20:40 UTC](https://discourse.nodered.org/t/failing-tests-on-master/86253/5 "2024-06-06T20:40:50Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
