infoderm / patients

:face_with_thermometer: Patients meteor app
GNU Affero General Public License v3.0
5 stars 2 forks source link

Fix sporadic client tests timeout on Github Actions #865

Closed make-github-pseudonymous-again closed 3 months ago

make-github-pseudonymous-again commented 5 months ago

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 commented 5 months ago

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 commented 4 months ago

Could this be related to install caching?

make-github-pseudonymous-again commented 4 months ago

Supposedly fixed by #958.

make-github-pseudonymous-again commented 3 months ago

Happened again: