fathyb / html2svg

Convert HTML and `<canvas>` to SVG, PDF, or images using Chromium

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Seeing `ERR_NETWORK_CHANGED` error messages

paulmillar opened this issue · comments

paul@sprocket:~$ podman run fathyb/html2svg https://httpstat.us/200
(node:28) electron: Failed to load URL: https://httpstat.us/200 with error: ERR_NETWORK_CHANGED
(Use `electron --trace-warnings ...` to show where the warning was created)
Internal server error Error: ERR_NETWORK_CHANGED (-21) loading 'https://httpstat.us/200'
    at rejectAndCleanup (node:electron/js2c/browser_init:165:7500)
    at EventEmitter.failListener (node:electron/js2c/browser_init:165:7713)
    at EventEmitter.emit (node:events:527:28) {
  errno: -21,
  code: 'ERR_NETWORK_CHANGED',
  url: 'https://httpstat.us/200'
}
Error: Server error 500
    at printRequest (/app/build/html2svg.cli.js:88:15)
    at ClientRequest.<anonymous> (/app/build/html2svg.cli.js:73:38)
    at ClientRequest.emit (node:events:513:28)
    at HTTPParser.parserOnIncomingClient (node:_http_client:693:27)
    at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
    at Socket.socketOnData (node:_http_client:534:22)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:324:12)
    at readableAddChunk (node:internal/streams/readable:297:9)
    at Readable.push (node:internal/streams/readable:234:10)
paul@sprocket:~$ 

The problem appears to be intermittent: repeating the comment enough times yields the desired output.

I've tried using the wait option to introduce a delay (10 seconds, for example). This does not seem to affect whether ERR_NETWORK_CHANGED is reported.