Skip to content
This repository has been archived by the owner on Jul 28, 2023. It is now read-only.

ndb performance profiler crash #302

Open
romainmnr opened this issue Dec 23, 2019 · 6 comments
Open

ndb performance profiler crash #302

romainmnr opened this issue Dec 23, 2019 · 6 comments

Comments

@romainmnr
Copy link

romainmnr commented Dec 23, 2019

The ndb debugger keep crashing while stoping the performace profile record.

What steps will reproduce the problem?

  • launche ndb ndb npm start
  • start recording performance
  • stop recording
  • CRASH

Crash report

/usr/local/lib/node_modules/ndb/services/ndd_service.js:21
  throw error;
  ^

Error: TypeError: Cannot read property 'originStackTrace' of null
TypeError: Cannot read property 'originStackTrace' of null
    at Function._script (https://domain/sources/sources_module.js:13:76808)
    at Sources.ScriptOriginPlugin.rightToolbarItems (https://domain/sources/sources_module.js:13:76463)
    at Sources.UISourceCodeFrame.syncToolbarItems (https://domain/sources/sources_module.js:1:52187)
    at Sources.SourcesView._updateScriptViewToolbarItems (https://domain/sources/sources_module.js:13:39654)
    at Sources.SourcesView._editorClosed (https://domain/sources/sources_module.js:13:41002)
    at Sources.TabbedEditorContainer.dispatchEventToListeners (https://domain/ndb.js:1:91157)
    at Sources.TabbedEditorContainer._tabClosed (https://domain/sources/sources_module.js:13:9996)
    at UI.TabbedPane.dispatchEventToListeners (https://domain/ndb.js:1:91157)
    at UI.TabbedPane._innerCloseTab (https://domain/ndb.js:1:971597)
    at UI.TabbedPane.closeTabs (https://domain/ndb.js:1:971046)
    at Rpc.dispatchMessageLocally_ (/usr/local/lib/node_modules/ndb/node_modules/carlo/rpc/rpc.js:423:16)
    at Rpc.routeMessage_ (/usr/local/lib/node_modules/ndb/node_modules/carlo/rpc/rpc.js:371:12)
    at process.emit (events.js:182:13)
    at emit (internal/child_process.js:812:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
events.js:167
      throw er; // Unhandled 'error' event
      ^

Error [ERR_IPC_CHANNEL_CLOSED]: Channel closed
    at ChildProcess.target.send (internal/child_process.js:628:16)
    at Rpc.routeMessage_ (/usr/local/lib/node_modules/ndb/node_modules/carlo/rpc/rpc.js:379:9)
    at page_.exposeFunction.data (/usr/local/lib/node_modules/ndb/node_modules/carlo/lib/carlo.js:388:71)
    at Page._onBindingCalled (/usr/local/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Page.js:548:56)
    at CDPSession.Page.client.on.event (/usr/local/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Page.js:136:54)
    at CDPSession.emit (events.js:182:13)
    at CDPSession._onMessage (/usr/local/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Connection.js:200:12)
    at Connection._onMessage (/usr/local/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Connection.js:112:17)
    at PipeTransport._dispatch (/usr/local/lib/node_modules/ndb/node_modules/puppeteer-core/lib/PipeTransport.js:65:24)
    at Socket.PipeTransport._eventListeners.helper.addEventListener.buffer (/usr/local/lib/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)

Tell us about your environment:

  • ndb version: 1.1.5
  • Platform / OS version: macOs Catalina 10.15.2
  • Node.js version: v10.13.0
@IOriens
Copy link

IOriens commented Jan 13, 2020

Same problem occurred to me.

  • ndb version: 1.1.5
  • Platform / OS version: macOs Catalina 10.15.2
  • Node.js version: v10.18.0

@lantto
Copy link

lantto commented Jul 4, 2020

Same here, as soon as I press "Stop" on the profiler to get the results:

/usr/local/lib/node_modules/ndb/services/ndd_service.js:21
  throw error;
  ^

Error: TypeError: Cannot read property 'originStackTrace' of null
TypeError: Cannot read property 'originStackTrace' of null
    at Function._script (https://domain/sources/sources_module.js:13:76808)
    at Sources.ScriptOriginPlugin.rightToolbarItems (https://domain/sources/sources_module.js:13:76463)
    at Sources.UISourceCodeFrame.syncToolbarItems (https://domain/sources/sources_module.js:1:52187)
    at Sources.SourcesView._updateScriptViewToolbarItems (https://domain/sources/sources_module.js:13:39654)
    at Sources.SourcesView._editorClosed (https://domain/sources/sources_module.js:13:41002)
    at Sources.TabbedEditorContainer.dispatchEventToListeners (https://domain/ndb.js:1:91157)
    at Sources.TabbedEditorContainer._tabClosed (https://domain/sources/sources_module.js:13:9996)
    at UI.TabbedPane.dispatchEventToListeners (https://domain/ndb.js:1:91157)
    at UI.TabbedPane._innerCloseTab (https://domain/ndb.js:1:971597)
    at UI.TabbedPane.closeTabs (https://domain/ndb.js:1:971046)
    at Rpc.dispatchMessageLocally_ (/usr/local/lib/node_modules/ndb/node_modules/carlo/rpc/rpc.js:423:16)
    at Rpc.routeMessage_ (/usr/local/lib/node_modules/ndb/node_modules/carlo/rpc/rpc.js:371:12)
    at process.emit (events.js:315:20)
    at emit (internal/child_process.js:876:12)
    at processTicksAndRejections (internal/process/task_queues.js:85:21)
events.js:292
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at ChildProcess.target._send (internal/child_process.js:806:20)
    at ChildProcess.target.send (internal/child_process.js:677:19)
    at Rpc.routeMessage_ (/usr/local/lib/node_modules/ndb/node_modules/carlo/rpc/rpc.js:379:9)
    at /usr/local/lib/node_modules/ndb/node_modules/carlo/lib/carlo.js:388:71
    at Page._onBindingCalled (/usr/local/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Page.js:548:56)
    at CDPSession.<anonymous> (/usr/local/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Page.js:136:54)
    at CDPSession.emit (events.js:315:20)
    at CDPSession._onMessage (/usr/local/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Connection.js:200:12)
    at Connection._onMessage (/usr/local/lib/node_modules/ndb/node_modules/puppeteer-core/lib/Connection.js:112:17)
    at PipeTransport._dispatch (/usr/local/lib/node_modules/ndb/node_modules/puppeteer-core/lib/PipeTransport.js:65:24)
Emitted 'error' event on ChildProcess instance at:
    at internal/child_process.js:810:39
    at processTicksAndRejections (internal/process/task_queues.js:79:11) {
  errno: 'EPIPE',
  code: 'EPIPE',
  syscall: 'write'
}

ndb version: 1.1.5
Platform / OS version: macOs Catalina 10.15.2
Node.js version: v12.18.2

@paulirish
Copy link
Contributor

I've reproduced this plenty of times. At this point it's a known issue of the project.

I have successfully managed to capture a profile with the latest NDB but it certainly doesn't work consistently.

@brendankenny notes that a possible workaround may be using console.profile() and console.profileEnd()

@paulirish paulirish pinned this issue Jul 9, 2020
@remorses

This comment has been minimized.

@shapkarin
Copy link

Does anyone solve that?

@segevofer
Copy link

same here, using mac with node v12.18.0 and ndb v1.1.5
please help resolve this issue...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants