speedlify icon indicating copy to clipboard operation
speedlify copied to clipboard

Error: connect ECONNREFUSED 127.0.0.1:xxxxx

Open 0rangebananaspy opened this issue 1 year ago • 4 comments

I'm running on my local virtual server on Proxmox with Ubuntu 22.04 LTS, Node.js v18.16.1. Everytime npm run test-pages give me this error.

> [email protected] test-pages
> node run-tests

There are no known last run timestamps
Skipping fakultas (you told me to in your site config)
First tests for sample.
Testing 6 sites:
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

Error: connect ECONNREFUSED 127.0.0.1:41941
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 41941
}

Node.js v18.16.1

any clue to make it run?

Screenshot: https://imgur.com/bIZDTte

0rangebananaspy avatar Jul 01 '23 11:07 0rangebananaspy

You'll have to add chromium/chrome browser to your repository. The tool puppets Chrome in order to run the user-experience browser.

ADDED: Note that if you're running as Root, you'll also need to add --no-sandbox to the options in the run-tests.js file.

colinmo avatar Dec 01 '23 02:12 colinmo

You'll have to add chromium/chrome browser to your repository. The tool puppets Chrome in order to run the user-experience browser.

ADDED: Note that if you're running as Root, you'll also need to add --no-sandbox to the options in the run-tests.js file.

@colinmo Can you go into a bit more detail on this? I've got Chrome and Chromium both installed on the server, but I'm also getting this same error. When you say "add it to the repo," is that implying something like NPM should be installing it there, because that doesn't seem totally right.

fienen avatar Dec 02 '23 01:12 fienen

Sorry for delay.

I found that I had to add chromium/ chrome (either) AND set the environment variable "PUPPETEER_EXECUTABLE_PATH" that tells puppeteer where to run - /usr/bin/chromium-browser in my case. Does that help?

colinmo avatar Dec 04 '23 01:12 colinmo

@colinmo Can you go into a bit more detail on this? I've got Chrome and Chromium both installed on the server, but I'm also getting this same error. When you say "add it to the repo," is that implying something like NPM should be installing it there, because that doesn't seem totally right.

Sorry, in addition to the above answer you don't need to add it to the actual repo. You're right, it's just it needed to be installed where your code can access it. Much more accurate description.

colinmo avatar Dec 11 '23 04:12 colinmo