Skip to content

Browser die while returning large array results from page.evaluate #528

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

Open
tanys123 opened this issue Mar 25, 2025 · 0 comments
Open

Browser die while returning large array results from page.evaluate #528

tanys123 opened this issue Mar 25, 2025 · 0 comments
Assignees

Comments

@tanys123
Copy link

Describe the bug
The browser gives up / stuck when the page.evaluate is returning large (500+) array items.
Error: Ferrum::DeadBrowserError: Browser is dead or given window is closed

Well I can workaround this by stringify the results. Reporting this just wanted to know if there is something I was missing. Puppeteer Ruby able to handle that without stringify.

To Reproduce

page.evaluate <<-JS
  Array.from({ length: 1000 }, () => ({
    xray_json_path: Math.random().toString(36).substring(7),
    rect: {
      x: Math.floor(Math.random() * 1000),
      y: Math.floor(Math.random() * 1000), 
      width: Math.floor(Math.random() * 200) + 50,
      height: Math.floor(Math.random() * 200) + 50
    }
  }))
JS

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Google Chrome for Testing 121.0.6167.85
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

2 participants