nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
107.45k stars 29.54k forks source link

ERR_INTERNAL_ASSERTION #53987

Open WilliamAndreu opened 3 months ago

WilliamAndreu commented 3 months ago

Version

20.15.1

Platform

Microsoft Windows NT 10.0.22631.0 x64

Subsystem

No response

What steps will reproduce the bug?

No response

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior? Why is that the expected behavior?

No response

What do you see instead?

node:internal/event_target:1094                                                                                                                                   
  process.nextTick(() => { throw err; });
                           ^

Error: Unknown worker message type message
This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

    at Function.fail (node:internal/assert:20:9)
    at Worker.[kOnMessage] (node:internal/worker:354:12)
    at MessagePort.<anonymous> (node:internal/worker:232:57)
    at _ZoneDelegate.invokeTask (C:\Users\willi\Desktop\Proyectos\github\Angular\angular_clean_architecture\node_modules\zone.js\bundles\zone.umd.js:449:37)      
    at ZoneImpl.runTask (C:\Users\willi\Desktop\Proyectos\github\Angular\angular_clean_architecture\node_modules\zone.js\bundles\zone.umd.js:196:51)
    at ZoneTask.invokeTask [as invoke] (C:\Users\willi\Desktop\Proyectos\github\Angular\angular_clean_architecture\node_modules\zone.js\bundles\zone.umd.js:531:38)
    at invokeTask (C:\Users\willi\Desktop\Proyectos\github\Angular\angular_clean_architecture\node_modules\zone.js\bundles\zone.umd.js:1196:22)
    at globalCallback (C:\Users\willi\Desktop\Proyectos\github\Angular\angular_clean_architecture\node_modules\zone.js\bundles\zone.umd.js:1227:31)
    at MessagePort.globalZoneAwareCallback (C:\Users\willi\Desktop\Proyectos\github\Angular\angular_clean_architecture\node_modules\zone.js\bundles\zone.umd.js:1263:20)
    at MessagePort.[nodejs.internal.kHybridDispatch] (node:internal/event_target:820:20)
    at MessagePort.<anonymous> (node:internal/per_context/messageport:23:28) {
  code: 'ERR_INTERNAL_ASSERTION'
}

Additional information

No response

aduh95 commented 3 months ago

Thanks for opening the issue. If you could share any details on how to reproduce, it would be much appreciated. Is this something consistently blocking you, or is it something you saw e.g. once or twice on prod and not on dev?

/cc @nodejs/workers

For reference, the failing assert is: https://github.com/nodejs/node/blob/a407d1f0b3669cc82c755700f0d500fb27cc39ea/lib/internal/worker.js#L354

WilliamAndreu commented 3 months ago

@aduh95 Hi, the error occurs when using jest with angular 17, when I run the jest command to start the tests I usually get this error, I don't know if it can be related to zone.js.

PunSo commented 2 months ago

I got the same error with angular 18 and jest 29 when I run tests with jest --no-cache option.