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

[Bug]: "performance.measureUserAgentSpecificMemory is not available" in headless mode? #8258

Closed
cmdcolin opened this issue Apr 20, 2022 · 4 comments

Comments

@cmdcolin
Copy link

Bug description

Steps to reproduce the problem:

  1. download https://github.com/cmdcolin/express_cross_origin_isolated, used to test cross-origin isolation
  2. run node index.js in express_cross_origin_isolated folder to startup server on port 4000
  3. run a puppeteer script on public/index.html
  4. try running await page.evaluate(() => self.crossOriginIsolated), works and produces true
  5. try running await page.evaluate(() => performance.measureUserAgentSpecificMemory()), produces error (see log below)

note: if I use headless:false in the launch params, then it actually does produce a value, but unfortunately the headless:false mode completely grinds my entire system (ubuntu 22.04) to a halt so if this was available in headless mode it would be great

Puppeteer version

13.6.0

Node.js version

16.14.2

npm version

8.5.0

What operating system are you seeing the problem on?

Linux

Relevant log output

/home/cdiesh/src/jb2profile/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221
            throw new Error('Evaluation failed: ' + helper_js_1.helper.getExceptionMessage(exceptionDetails));
                  ^

Error: Evaluation failed: DOMException: Failed to execute 'measureUserAgentSpecificMemory' on 'Performance': performance.measureUserAgentSpecificMemory is not available.
    at __puppeteer_evaluation_script__:2:17
    at ExecutionContext._evaluateInternal (/home/cdiesh/src/jb2profile/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:221:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async ExecutionContext.evaluate (/home/cdiesh/src/jb2profile/node_modules/puppeteer/lib/cjs/puppeteer/common/ExecutionContext.js:110:16)
@cmdcolin cmdcolin added the bug label Apr 20, 2022
@cmdcolin
Copy link
Author

note: if this is not a bug or a known limitation, welcome to close. my ultimate aim is to get memory usage stats on a page using webworkers

@stale
Copy link

stale bot commented Jun 23, 2022

We're marking this issue as unconfirmed because it has not had recent activity and we weren't able to confirm it yet. It will be closed if no further activity occurs within the next 30 days.

@stale
Copy link

stale bot commented Jul 23, 2022

We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!

@stale stale bot closed this as completed Jul 23, 2022
@cmdcolin
Copy link
Author

a linked issue above (krausest/js-framework-benchmark#1050) suggests using the flag --headless=chrome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant