playwright-community/playwright-go

[Bug]: hardwareConcurrency is limited to 4

twolao opened this issue · 2 comments

Environments

  • playwright-go Version: [e.g. v0.4201.1]
  • Browser: [e.g. firefox]
  • OS and version: [e.g. macOS / Windows 11/ Ubuntu 22.04]

Bug description

hardwareConcurrency is limited to 4. No relevant settings are seen in the code. It cannot be modified using javascript in the started browser.
https://browserleaks.com/javascript

How can to modify and adjust hardwareConcurrency setting?

To Reproduce
Please provide a mini reproduction rather than just a description. For example:

Additional context
Add any other context about the problem here.

You mean this? It's read-only and depends on environment.

The navigator.hardwareConcurrency read-only property returns the number of logical processors available to run threads on the user's computer.

You mean this? It's read-only and depends on environment.

The navigator.hardwareConcurrency read-only property returns the number of logical processors available to run threads on the user's computer.

The hardwareConcurrency and languages of the browser started using playwright do not match those of the actual system. They seem to be fixed settings. You can try to modify these two properties of navigator using javascript. It can take effect in the chrome environment, but the browser started using playwright does not matter whether it is chromium or not. Still in Firefox, these two properties cannot be modified successfully.
You can use this URL to check navigator information
https://browserleaks.com/javascript