Is there a recommended version for Codeceptjs and puppeteer works well?

With latest version of Codeceptjs and puppeteer, we are experiencing extreme slow performance, I was wondering if there is a recommended version for codeceptjs and puppeteer.

Out of curiosity, could you provide more insights of the degradation of the execution. I see the tests in GHA is not that slow.

OK | 33 passed, 1 skipped // 27s

Hi @peterngtr thanks for the reply,
when initializing test I would see the following;
Degraded performance warning: Launching Chrome on Mac Silicon (arm64) from an x64 Node installation results in Rosetta translating the Chrome binary, even if Chrome is already arm64. This would result in huge performance issues. To resolve this, you must run Puppeteer with a version of Node built for arm64.
Also in some input field action such as fillField or clear, I would get the following error;
“JSHandles can be evaluated only in the context they were created!”
My node version is: v21.7.1
Npm version is: 10.5.0
Any suggestion would greatly be appreciated.

I remembered I got the same issue on MacOS, so to tackle the issue, I followed those steps:

Mac OS

Here is my working solution using puppeteer’s native chromium instead of installing your own:

  1. Uninstall puppeteer
  2. Open native terminal
  3. cd repo
  4. enter arch and see if it returns arm64
  5. enter nvm install stable
  6. enter nvm use stable
  7. verify installation by entering node -e 'console.log(process.arch)' and see if it returns arm64
  8. enter npm i puppeteer
  9. enter node node_modules/puppeteer/install.mjs (or node node_modules/puppeteer/install.js – depending on your node modules)
  10. it should work :partying_face: