0

As the title says, I just installed node 25.0.0 and puppeteer on windows. Here is my file:

const puppeteer = require('puppeteer');
var browser;

var puppeteer_options = {
    headless: true, 
    ignoreHTTPSErrors: true, 
    args: ['--no-sandbox', '--disable-setuid-sandbox', '--single-process', '--no-zygote', '--disable-dev-shm-usage', '--shm-size=4gb', ], 
    defaultViewport: {width: 1920, height: 1080},
    protocolTimeout: 1000000, //https://www.puppeteersharp.com/api/PuppeteerSharp.LaunchOptions.html
}

try
{
    browser = await puppeteer.launch(puppeteer_options);

    var page = await browser.newPage();
}
catch (err) {
    console.log(err);
}

When I run that I get this error:

ErrorEvent {
  Symbol(kTarget): WebSocket {
    _events: [Object: null prototype] { open: [Function], error: [Function] },
    _eventsCount: 2,
    _maxListeners: undefined,
    _binaryType: 'nodebuffer',
    _closeCode: 1006,
    _closeFrameReceived: false,
    _closeFrameSent: false,
    _closeMessage: <Buffer >,
    _closeTimer: null,
    _errorEmitted: true,
    _extensions: {},
    _paused: false,
    _protocol: '',
    _readyState: 3,
    _receiver: null,
    _sender: null,
    _socket: null,
    _bufferedAmount: 0,
    _isServer: false,
    _redirects: 0,
    _autoPong: true,
    _url: 'ws://127.0.0.1:51580/devtools/browser/32387c32-fb78-4a34-bdde-31d9899f7c7d',
    _originalIpc: false,
    _originalSecure: false,
    _originalHostOrSocketPath: '127.0.0.1:51580',
    _req: null,
    Symbol(shapeMode): false,
    Symbol(kCapture): false
  },
  Symbol(kType): 'error',
  Symbol(kError): Error: read ECONNRESET
      at TCP.onStreamRead (node:internal/stream_base_commons:216:20) {
    errno: -4077,
    code: 'ECONNRESET',
    syscall: 'read'
  },
  Symbol(kMessage): 'read ECONNRESET'
}

It seems to have something to do with the 'single-process' option. If I remove that the error goes away. Is this a Windows limitation?

1
  • 1
    Yes, this is a Chromium limitation on Windows. Commented Nov 8 at 18:12

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.