Skip to content

Allow Chrome to exit after forced exporter termination - #1

Closed
daniatic wants to merge 1 commit into
masterfrom
fix/puppeteer-pipe-transport
Closed

daniatic wants to merge 1 commit into
masterfrom
fix/puppeteer-pipe-transport

Conversation

@daniatic

@daniatic daniatic commented Oct 2, 2026 •

Copy link
Copy Markdown
Owner

On Windows, forcibly stopping a Node process that initialized highcharts-export-server@6.0.0 can leave chrome-headless-shell.exe running after Node has exited. The leftover browser consumes resources and may keep its user data directory in use, interfering with a later exporter launch using the same directory.

The reproduction is to initialize the exporter, forcibly stop its Node PID with Stop-Process -Id <pid> -Force, and check whether the Chrome PID remains. The export server's graceful cleanup cannot run after a forced termination. In our local comparison, Chrome survived with WebSocket transport and exited with its Node owner when Puppeteer's pipe transport was enabled.

The export server currently provides no normal configuration option for that transport. Passing pipe through its debug options also requires enabling browser debug mode and adjusting unrelated launch settings.

This PR lets applications opt into pipe transport with puppeteer.pipe or PUPPETEER_PIPE, while keeping the default false. It forwards the option to Puppeteer and rebuilds the checked-in ESM and CommonJS bundles through the existing package entry points. Callers using a nonzero debugging port must keep pipe transport disabled.

Validation with Node 24.15.0:

  • npm run build passed.
  • npm run unit:test -- --runInBand passed all 58 tests across 6 suites.
  • ESLint passed the changed source and test files with one existing Puppeteer import warning.
  • Both built package entry points honored PUPPETEER_PIPE=true; an explicit module setting could override it.

Submitted upstream as highcharts/node-export-server#688, addressing issue #687.

@daniatic daniatic changed the title Expose Puppeteer pipe transport without debug mode Allow Chrome to exit after forced exporter termination Oct 2, 2026
@daniatic daniatic closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant