premature close error on process exit

See original GitHub issue

Expected Behavior

An HTML report should be saved

Current Behavior

Doctor, bubbleprof, and flame all crash with this error:

Error: premature close
    at MultiStream.onclose (/Users/contra/.nvm/versions/node/v10.6.0/lib/node_modules/clinic/node_modules/end-of-stream/index.js:47:67)
    at MultiStream.emit (events.js:187:15)
    at MultiStream.destroy (/Users/contra/.nvm/versions/node/v10.6.0/lib/node_modules/clinic/node_modules/multistream/index.js:65:8)
    at DestroyableTransform.onClose (/Users/contra/.nvm/versions/node/v10.6.0/lib/node_modules/clinic/node_modules/multistream/index.js:111:12)
    at Object.onceWrapper (events.js:273:13)
    at DestroyableTransform.emit (events.js:187:15)
    at /Users/contra/.nvm/versions/node/v10.6.0/lib/node_modules/clinic/node_modules/through2/through2.js:20:10
    at process._tickCallback (internal/process/next_tick.js:61:11)

Steps to Reproduce (for bugs)

  1. Node 10.6
  2. npm install clinic -g
  3. clinic doctor -- node dummy-server.js
  4. Wait a bit, press CTRL-C

Environment

  • Clinic version: Clinic v1.1.0 Doctor v3.0.3
  • Node version: v10.6
  • Operating system and version: MacOS Mojave Beta

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:32 (12 by maintainers)

github_iconTop GitHub Comments

4reactions
AndreMazcommented, Nov 19, 2019

Same here. I’m using node v12.13.0.

Analysing dataError: premature close
    at onclosenexttick (/usr/lib/node_modules/clinic/node_modules/end-of-stream/index.js:53:86)
    at processTicksAndRejections (internal/process/task_queues.js:75:11)

Steps to repro:

  1. Generate Moleculer demo project
  2. Open the generated project, set transporter to null in moleculer.config.js
  3. Run clinic doctor -- npm run dev
  4. Run autocannon http://localhost:3000/api/greeter/hello
  5. Press Ctrl + C
3reactions
RafaelGSScommented, Jan 28, 2022

When it happens, I recommend you to:

  • Remove the .clinic folder
  • Remove all the node_trace.*.log files
  • If you are running the autocannon for a small period of time, increase it.
Read more comments on GitHub >

github_iconTop Results From Across the Web

premature close error on process exit · Issue #41 - GitHub
Hi Contra, we sometimes see this error if Clinic has not collected sufficient data, so perhaps there is not enough activity in the...
Read more >
How to solve: premature close at onclosenexttick in Node.js ...
This error can happen if a device (mqtt.Client from aws-iot-device-sdk-js) does not hold the correct permissions to connect and/or ...
Read more >
15 Common Error Codes in Node.js and How to Fix Them
15. EPERM · Close all instances of your editor before rerunning the command (maybe some files were locked by the editor). · Clean...
Read more >
Error Codes | Yarn - Package Manager
A list of Yarn's error codes with detailed explanations. ... never has been built before, or its previous build failed (returned a non-zero...
Read more >
Process | Node.js v19.3.0 Documentation
It is possible to record such errors in an error log, either periodically (which is likely best for long-running application) or upon process...
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