facebook / memlab

A framework for finding JavaScript memory leaks and analyzing heap snapshots
https://facebook.github.io/memlab/
MIT License
4.3k stars 116 forks source link

how to handle Page crashed error ,when execute the run method。 #114

Closed susakin closed 4 months ago

susakin commented 4 months ago

微信截图_20240221173312

try { const { leaks, runResult } = await run({ scenario }); } catch(e) { console.log(e) }

try catch can not handle this error, i need to get this error to return to service

JacksonGL commented 4 months ago

This is a Puppeteer error that does not seem to be catchable. It is likely because the browser OOMed (out-of-memory crashed). I would recommend testing on a scenario where the web app uses less memory; or perhaps try the solution here if you are running on Docker: https://github.com/puppeteer/puppeteer/issues/1321#issuecomment-378361236