Flood of "Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed" errors

See original GitHub issue

Whenever I make a change to one of my files and node-dev says “Restarting”, if I refresh my browser I get a flood of errors in my terminal that say:

Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
    at process.target.send (internal/child_process.js:596:16)
    at Object.exports.send (/Users/ian/hq/app/node_modules/node-dev/lib/ipc.js:14:23)
    at process.<anonymous> (/Users/ian/hq/app/node_modules/node-dev/lib/wrap.js:45:7)
    at process.emit (events.js:127:13)
    at processEmit [as emit] (/Users/ian/ianwalter/fastify-vue/node_modules/signal-exit/index.js:155:32)
    at process._fatalException (bootstrap_node.js:434:26)

Does anyone have any clues on what I’m doing wrong? I’m running webpack-dev-middleware within my server and I’m wondering if I have to close it manually somehow?

❯ node -v v9.6.1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:6
  • Comments:11

github_iconTop GitHub Comments

2reactions
qqilihqcommented, Jun 13, 2018

Any news on this? We’re (@danielesser) also running webpack-dev-middleware and explicitly call close on the middleware using the async-exit-hook module, like so:

exitHook(callback => middleware.close(callback));

Still, we’re seeing the Error [ERR_IPC_DISCONNECTED]: IPC channel is already disconnected quite frequently (and thus have to restart our entire Docker dev. container).

1reaction
bjornstarcommented, Feb 22, 2021

Hi @bjornstar, I am not using webpack-dev-middleware and I am running Linux.

To make things easier for you to reproduce I set up a minimal case in this repository: https://github.com/paeolo/node-dev-ipc-errors.

The application being watched is the simplest express.js application you can think of and this example fork a child_process that spam a “CTRL+S” behavior every 100ms.

To test this, just clone the repository and then do a npm i followed by a npm run start. I successfully reproduced the errors with two different environments:

  • An up-to-date Archlinux environment (Linux 5.10.16-arch1-1, nodeJS v14.15.4)
  • An up-to-date Debian buster environment (Linux 4.19.0-14-cloud-amd64, nodeJS v14.15.5)

@paeolo Thank you for putting up the reproduction repo, that was a huge help. I have released v6.3.0 which should resolve the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flood of "Error [ERR_IPC_CHANNEL_CLOSED] - Bountysource
Whenever I make a change to one of my files and node-dev says "Restarting", if I refresh my browser I get a flood...
Read more >
Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed when ...
I am trying to dockerize the backend service, created DockerFile(simplified version) like below, and used the dockerfile to create the image and ...
Read more >
Channel closed Error - Questions - n8n community
The promise rejected with the reason: Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed at new NodeError (node:internal/errors:372:5)
Read more >
webdriverio/webdriverio - Gitter
So now I get no errors when using npm run spec ./path/to/spec ... Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed at process.target.send ...
Read more >
Viewing online file analysis results for 'node.dll'
errors are handled faster. if (errorStackTraceLimitIsWritable) Error. ... return; // Handle has been closed in the mean time
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found