GoogleChromeLabs / ndb

ndb is an improved debugging experience for Node.js, enabled by Chrome DevTools
Apache License 2.0
10.9k stars 230 forks source link

ndb crashes after launching script #204

Open vaxerski opened 5 years ago

vaxerski commented 5 years ago

Steps to reproduce: I'm launching ndb with ndb bot.js and it launches, starts the script and crashes, the same when i click "start" inside ndb and for example toggle "pause on exceptions" or change tab.

There seems to be no problem with code since it works on normal node, but when i open it in ndb, then it crashes.

What happens instead?

ndb throws: events.js:167 throw er; // Unhandled 'error' event ^

Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed at ChildProcess.target.send (internal/childprocess.js:628:16) at Rpc.routeMessage (C:\Users\user\AppData\Roaming\npm\node_modules\ndb\nodemodules\carlo\rpc\rpc.js:379:9) at page.exposeFunction.data (C:\Users\user\AppData\Roaming\npm\node_modules\ndb\node_modules\carlo\lib\carlo.js:327:71) at Page._onBindingCalled (C:\Users\user\AppData\Roaming\npm\node_modules\ndb\node_modules\puppeteer-core\lib\Page.js:516:56) at CDPSession.Page.client.on.event (C:\Users\user\AppData\Roaming\npm\node_modules\ndb\node_modules\puppeteer-core\lib\Page.js:134:54) at CDPSession.emit (events.js:182:13) at CDPSession._onMessage (C:\Users\user\AppData\Roaming\npm\node_modules\ndb\node_modules\puppeteer-core\lib\Connection.js:216:12) at Connection._onMessage (C:\Users\user\AppData\Roaming\npm\node_modules\ndb\node_modules\puppeteer-core\lib\Connection.js:99:19) at PipeTransport._dispatch (C:\Users\user\AppData\Roaming\npm\node_modules\ndb\node_modules\puppeteer-core\lib\PipeTransport.js:65:24) at Socket.PipeTransport._eventListeners.helper.addEventListener.buffer (C:\Users\user\AppData\Roaming\npm\node_modules\ndb\node_modules\puppeteer-core\lib\PipeTransport.js:30:64) Emitted 'error' event at: at process.nextTick (internal/child_process.js:632:35) at process._tickCallback (internal/process/next_tick.js:61:11)

I've tried re-installing ndb, reinstalling all dependencies, reinstalling ms build tools, different flags and stuff. It did work, but lately stopped.

I can add that when this started occuring, the ndb got slow, instead of showing my files immediately, it showed them after 10s, and there are windows popping up, which weren't before (node.EXE and npm)

Thanks in advance.

att14 commented 3 years ago

I am getting a similar issue after upgrading to macOS Big Sur from macOS Catalina. No problems on Catalina. I'm running ndb v1.1.5, node v14.16.0, macOS v11.2.3, and Chromium 73.0.3679.0.

events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
Emitted 'error' event on Socket instance at:
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  errno: -32,
  code: 'EPIPE',
  syscall: 'write'
}
liuliangsir commented 3 years ago

@att14 try this solution.