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

Fix sporadic client tests timeout on Github Actions #865

Closed
make-github-pseudonymous-again opened this issue Apr 9, 2024 · 4 comments · Fixed by #958 or #975
Closed

Fix sporadic client tests timeout on Github Actions #865

make-github-pseudonymous-again opened this issue Apr 9, 2024 · 4 comments · Fixed by #958 or #975
Labels
ci This issue is about continuous integration dx This is about developer experience

Comments

@make-github-pseudonymous-again
Copy link
Contributor

Sometimes we get the following error:

I20240409-08:36:31.376(2)? --------------------------------
I20240409-08:36:31.376(2)? --- RUNNING APP CLIENT TESTS ---
I20240409-08:36:31.376(2)? --------------------------------
W20240409-08:36:31.525(2)? (STDERR) 
W20240409-08:36:31.526(2)? (STDERR)   Puppeteer old Headless deprecation warning:
W20240409-08:36:31.526(2)? (STDERR)     In the near feature `headless: true` will default to the new Headless mode
W20240409-08:36:31.526(2)? (STDERR)     for Chrome instead of the old Headless implementation. For more
W20240409-08:36:31.527(2)? (STDERR)     information, please see [https://developer.chrome.com/articles/new-headless/.](https://developer.chrome.com/articles/new-headless/)
W20240409-08:36:31.527(2)? (STDERR)     Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`
W20240409-08:36:31.527(2)? (STDERR)     If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.
W20240409-08:36:31.527(2)? (STDERR) 
W20240409-08:36:31.545(2)? (STDERR) (node:2223) UnhandledPromiseRejectionWarning: Error: Could not find Chromium (rev. 1108766). This can occur if either
W20240409-08:36:31.545(2)? (STDERR)  1. you did not perform an installation before running the script (e.g. `npm install`) or
W20240409-08:36:31.545(2)? (STDERR)  2. your cache path is incorrectly configured (which is: /home/runner/.cache/puppeteer).
W20240409-08:36:31.546(2)? (STDERR) For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
W20240409-08:36:31.546(2)? (STDERR)     at ChromeLauncher.resolveExecutablePath (/home/runner/work/patients/patients/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:289:27)
W20240409-08:36:31.546(2)? (STDERR)     at ChromeLauncher.executablePath (/home/runner/work/patients/patients/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:182:25)
W20240409-08:36:31.546(2)? (STDERR)     at ChromeLauncher.computeLaunchArguments (/home/runner/work/patients/patients/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:99:37)
W20240409-08:36:31.547(2)? (STDERR)     at ChromeLauncher.launch (/home/runner/work/patients/patients/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:83:28)
W20240409-08:36:31.547(2)? (STDERR)  => awaited here:
W20240409-08:36:31.547(2)? (STDERR)     at Function.Promise.await (/home/runner/.meteor/packages/promise/.0.12.2.qhmebw.8r9v9++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/promise_server.js:56:12)
W20240409-08:36:31.547(2)? (STDERR)     at packages/meteortesting:browser-tests/browser/puppeteer.js:31:18
W20240409-08:36:31.548(2)? (STDERR)     at /home/runner/.meteor/packages/promise/.0.12.2.qhmebw.8r9v9++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40
W20240409-08:36:31.548(2)? (STDERR) (node:2223) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 9)
W20240409-08:36:31.548(2)? (STDERR) (node:2223) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
@make-github-pseudonymous-again make-github-pseudonymous-again added ci This issue is about continuous integration dx This is about developer experience labels Apr 9, 2024
@make-github-pseudonymous-again make-github-pseudonymous-again changed the title Fix sporadic app tests timeout on Github Actions Fix sporadic tests timeout on Github Actions Apr 9, 2024
@make-github-pseudonymous-again
Copy link
Contributor Author

This actually happens both on regular tests and on app tests:

I20240409-08:36:27.372(2)? --------------------------------
I20240409-08:36:27.373(2)? ----- RUNNING CLIENT TESTS -----
I20240409-08:36:27.373(2)? --------------------------------
W20240409-08:36:27.530(2)? (STDERR) 
W20240409-08:36:27.530(2)? (STDERR)   Puppeteer old Headless deprecation warning:
W20240409-08:36:27.530(2)? (STDERR)     In the near feature `headless: true` will default to the new Headless mode
W20240409-08:36:27.531(2)? (STDERR)     for Chrome instead of the old Headless implementation. For more
W20240409-08:36:27.531(2)? (STDERR)     information, please see [https://developer.chrome.com/articles/new-headless/.](https://developer.chrome.com/articles/new-headless/)
W20240409-08:36:27.531(2)? (STDERR)     Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`
W20240409-08:36:27.531(2)? (STDERR)     If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.
W20240409-08:36:27.531(2)? (STDERR) 
W20240409-08:36:27.545(2)? (STDERR) (node:2197) UnhandledPromiseRejectionWarning: Error: Could not find Chromium (rev. 1108766). This can occur if either
W20240409-08:36:27.545(2)? (STDERR)  1. you did not perform an installation before running the script (e.g. `npm install`) or
W20240409-08:36:27.545(2)? (STDERR)  2. your cache path is incorrectly configured (which is: /home/runner/.cache/puppeteer).
W20240409-08:36:27.545(2)? (STDERR) For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.
W20240409-08:36:27.546(2)? (STDERR)     at ChromeLauncher.resolveExecutablePath (/home/runner/work/patients/patients/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:289:27)
W20240409-08:36:27.546(2)? (STDERR)     at ChromeLauncher.executablePath (/home/runner/work/patients/patients/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:182:25)
W20240409-08:36:27.546(2)? (STDERR)     at ChromeLauncher.computeLaunchArguments (/home/runner/work/patients/patients/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:99:37)
W20240409-08:36:27.546(2)? (STDERR)     at ChromeLauncher.launch (/home/runner/work/patients/patients/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:83:28)
W20240409-08:36:27.546(2)? (STDERR)  => awaited here:
W20240409-08:36:27.546(2)? (STDERR)     at Function.Promise.await (/home/runner/.meteor/packages/promise/.0.12.2.qhmebw.8r9v9++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/promise_server.js:56:12)
W20240409-08:36:27.546(2)? (STDERR)     at packages/meteortesting:browser-tests/browser/puppeteer.js:31:18
W20240409-08:36:27.546(2)? (STDERR)     at /home/runner/.meteor/packages/promise/.0.12.2.qhmebw.8r9v9++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40
W20240409-08:36:27.546(2)? (STDERR) (node:2197) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 94)
W20240409-08:36:27.546(2)? (STDERR) (node:2197) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

@make-github-pseudonymous-again make-github-pseudonymous-again changed the title Fix sporadic tests timeout on Github Actions Fix sporadic client tests timeout on Github Actions Apr 9, 2024
@make-github-pseudonymous-again
Copy link
Contributor Author

Could this be related to install caching?

@make-github-pseudonymous-again
Copy link
Contributor Author

Supposedly fixed by #958.

make-github-pseudonymous-again added a commit that referenced this issue May 20, 2024
…flow.

This fixes #865 for good.

Since `meteor-actions/install` now can skip the installation of cached
packages using restore keys, it can happen that `node_modules/puppeteer`
is restored from cache while its `chromium` download is not.

With this commit, we ensure that the weakest restore key for `chromium`
is at least as weak as the weakest restore key for
`node_modules/puppeteer`.

Maybe an alternative would be to instruct `puppeteer` to install
chromium under `node_modules`? But for now, this is good enough.
@make-github-pseudonymous-again
Copy link
Contributor Author

github-merge-queue bot pushed a commit that referenced this issue May 20, 2024
…flow.

This fixes #865 for good.

Since `meteor-actions/install` now can skip the installation of cached
packages using restore keys, it can happen that `node_modules/puppeteer`
is restored from cache while its `chromium` download is not.

With this commit, we ensure that the weakest restore key for `chromium`
is at least as weak as the weakest restore key for
`node_modules/puppeteer`.

Maybe an alternative would be to instruct `puppeteer` to install
chromium under `node_modules`? But for now, this is good enough.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci This issue is about continuous integration dx This is about developer experience
1 participant