-
Notifications
You must be signed in to change notification settings - Fork 167
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
Local test run fails with UnhandledPromiseRejectionWarning
error message
#20
Comments
I was getting this error on MacOS. I think the culprit is puppeteer, as here: #17 (comment) Removing puppeteer and re-installing node modules seems to have fixed it for me. |
In macOS, I am getting the same error after cloning the most recent
I should also note that I've been unable to get the latest |
@brycewray can you file a separate issue? What’s your vertical config file look like? Sounds like you’re missing a |
Will file separate issue. Thanks. Update: @zachleat, went back to your original config and saw the problem. PEBKAC on my part. 🤷 🤦 Thank you as always, sir. |
I have the same problem as @d2s. On a new Ubuntu 18.04 server, I run the following and get: $ node -v
v14.8.0
$ git reflog HEAD
e9e4e58 (HEAD -> live, origin/live, origin/HEAD) HEAD@{0}: clone: from https://github.com/zachleat/speedlify.git
$ npm install
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
> [email protected] install /home/speedlify/speedlify/node_modules/puppeteer
> node install.js
Downloading Chromium r782078 - 126.4 Mb [====================] 100% 0.0s
Chromium (782078) downloaded to /home/speedlify/speedlify/node_modules/puppeteer/.local-chromium/linux-782078
> [email protected] postinstall /home/speedlify/speedlify/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"
Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!
The project needs your help! Please consider supporting of core-js on Open Collective or Patreon:
> https://opencollective.com/core-js
> https://www.patreon.com/zloirock
Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)
> [email protected] postinstall /home/speedlify/speedlify/node_modules/ejs
> node ./postinstall.js
Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/)
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN [email protected] requires a peer of puppeteer@^1.10.0 || ^2.0.0 but none is installed. You must install peer dependencies yourself.
added 676 packages from 581 contributors and audited 682 packages in 29.101s
23 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
$ npm run test-pages
> [email protected] test-pages /home/speedlify/speedlify
> node run-tests
There are no known last run timestamps
First tests for clients.
Testing 1 site:
(node:1061) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:38417
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:1061) 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: 1)
(node:1061) [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. I've tried it with different URLs to check if that's the problem. The sole file in module.exports = {
name: "clients", // optional, falls back to object key
description: "Client sites",
options: {
frequency: 60 * 23, // 24 hours
// Use "run" if the sites don’t share assets on the same origin
// and we can reset chrome with each run instead of
// each site in every run (it’s faster)
// Use "site" if sites are all on the same origin and share assets.
freshChrome: "run"
},
urls: [
"https://www.google.com/",
]
};
I don't know how to debug this. I added |
Solved for Ubuntu 18.04 by installing the following:
How I got to thisjoelgriffith/navalia#20 (comment) taught me about After thinking about what software was used, I tried running lighthouse directly using
This output an error that a Rather than installing them one-by-one I went looking for a list of extra packages. After a bit of trial and error (there's lots of "You need this to get Puppeteer to run" posts, many outdated - one of which I'd tried installing straight after my first comment, and it didn't work) I found the list above at puppeteer/puppeteer#3443 (comment). |
Couldn't run tests locally on a Linux virtual machine.
Dependencies installed properly with
npm install
but for some reason Chromium doesn't seem to work properly.This bug report is related to the latest Git commit
cd322fe5f111ca59894b0c9f9497c57725fee087
of thespeedlify
repository.The text was updated successfully, but these errors were encountered: