Skip to content

'Scala.js Com failed: ECONNREFUSED' for Com runs with Node.js 17 #12

Closed
@sjrd

Description

It seems that our Com setup for the Node.js env is completely broken on Node.js 17. The symptom in a Scala.js application is

[info] Fast optimizing /localhome/doeraene/projects/scalajs/test-suite/js/.2.12/target/scala-2.12/scalajs-test-suite-test-fastopt
Scala.js Com failed: Error: connect ECONNREFUSED ::1:40091
[error] stack trace is suppressed; run last testSuite2_12 / Test / loadedTestFrameworks for the full output
[error] (testSuite2_12 / Test / loadedTestFrameworks) org.scalajs.testing.common.RPCCore$ClosedException: org.scalajs.testing.adapter.JSEnvRPC$RunTerminatedException
[error] Total time: 49 s, completed Nov 2, 2021 4:31:29 PM

The test suite of this repo indeed fails on Node.js 17.0.1, whereas it passes on 16.13.0:

sbt:root> scalajs-env-nodejs/test
[info] compiling 1 Scala source to /localhome/doeraene/projects/scalajs-js-envs/js-envs/target/scala-2.12/classes ...
[error] Test org.scalajs.jsenv.test.RunTests.catchExceptionTest[config = Node.js, withCom = true] failed: closing a ComRun failed unexpectedly, took 0.041 sec
[error] Test org.scalajs.jsenv.test.RunTests.multiCloseAfterTerminatedTest[config = Node.js, withCom = true] failed: closing a ComRun failed unexpectedly, took 0.036 sec
[error] Test org.scalajs.jsenv.test.RunTests.defaultFilesystem[config = Node.js, withCom = true] failed: closing a ComRun failed unexpectedly, took 0.039 sec
[error] Test org.scalajs.jsenv.test.RunTests.allowScriptTags[config = Node.js, withCom = true] failed: closing a ComRun failed unexpectedly, took 0.038 sec
[error] Test org.scalajs.jsenv.test.RunTests.percentageTest[config = Node.js, withCom = true] failed: closing a ComRun failed unexpectedly, took 0.04 sec
[error] Test org.scalajs.jsenv.test.RunTests.fastCloseTest[config = Node.js, withCom = true] failed: closing a ComRun failed unexpectedly, took 0.038 sec
[error] Test org.scalajs.jsenv.test.RunTests.utf8Test[config = Node.js, withCom = true] failed: closing a ComRun failed unexpectedly, took 0.037 sec
[error] Test org.scalajs.jsenv.test.TimeoutRunTests.basicTimeoutTest[config = Node.js, withCom = true] failed: reached end of stream, took 0.044 sec
[error] Test org.scalajs.jsenv.test.TimeoutRunTests.intervalTest[config = Node.js, withCom = true] failed: reached end of stream, took 0.038 sec
[error] Test org.scalajs.jsenv.test.ComTests.separateComStdoutTest[config = Node.js] failed: no messages left and run has completed, took 0.039 sec
[error] Test org.scalajs.jsenv.test.ComTests.basicTest[config = Node.js] failed: no messages left and run has completed, took 0.038 sec
[error] Test org.scalajs.jsenv.test.ComTests.jsExitsOnMessageTest[config = Node.js] failed: no messages left and run has completed, took 0.039 sec
[error] Test org.scalajs.jsenv.test.ComTests.largeMessageTest[config = Node.js] failed: no messages left and run has completed, took 0.052 sec
[error] Test org.scalajs.jsenv.test.ComTests.highCharTest[config = Node.js] failed: no messages left and run has completed, took 0.037 sec
[error] Test org.scalajs.jsenv.test.ComTests.multiEnvTest[config = Node.js] failed: no messages left and run has completed, took 0.046 sec
[error] Test org.scalajs.jsenv.test.ComTests.noInitTest[config = Node.js] failed: closing a ComRun failed unexpectedly, took 0.041 sec
[error] Test org.scalajs.jsenv.test.TimeoutComTests.noImmediateCallbackTest[config = Node.js] failed: closing a ComRun failed unexpectedly, took 0.037 sec
[error] Test org.scalajs.jsenv.test.TimeoutComTests.noMessageTest[config = Node.js] failed: closing a ComRun failed unexpectedly, took 0.037 sec
[error] Test org.scalajs.jsenv.test.TimeoutComTests.intervalSendTest[config = Node.js] failed: no messages left and run has completed, took 0.038 sec
[error] Test org.scalajs.jsenv.test.TimeoutComTests.delayedReplyTest[config = Node.js] failed: no messages left and run has completed, took 0.039 sec
[error] Test org.scalajs.jsenv.test.TimeoutComTests.delayedInitTest[config = Node.js] failed: no messages left and run has completed, took 0.039 sec
[error] Failed: Total 42, Failed 21, Errors 0, Passed 21
[error] Failed tests:
[error]         org.scalajs.jsenv.nodejs.NodeJSSuite
[error] (scalajs-env-nodejs / Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 7 s, completed Nov 2, 2021 4:37:55 PM

This issue makes any test task in a Scala.js project completely unusable.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions