Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set protocolTimeout? #69

Open
fehmi opened this issue Feb 6, 2025 · 1 comment
Open

How to set protocolTimeout? #69

fehmi opened this issue Feb 6, 2025 · 1 comment

Comments

@fehmi
Copy link

fehmi commented Feb 6, 2025

By running custom script, the timeout option is ignored. I tried to add and argument like this --timeout=999930000 which is didn't work. I also tried $browser({ protocolTimeout: 99999999 }); which is didn't work either.

@fehmi
Copy link
Author

fehmi commented Feb 9, 2025

I solved like this by editing Puppeter.node.js

        try {
            if (browserWSEndpoint) {
                browser = await puppeteer_extra_1.default.connect({
                    browserWSEndpoint,
                    protocolTimeout: 1000 * 60 * 60, // an hour
                    timeout: 1000 * 60 * 60
                });
            }
            else {
                browser = await puppeteer_extra_1.default.launch({
                    
                    "headless": true,
                    args,
                    protocolTimeout: 1000 * 60 * 60, // an hour
                    timeout: 1000 * 60 * 60,
                    executablePath,
                });
            }
        }

And then I published this one as a temporary npm package and adding it as a community node. That would be great if can set it via n8n UI of Puppeteer node.

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

No branches or pull requests

1 participant