Skip to content

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

@tanysheng

Description

@tanysheng

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions