Puppeteer throwing ECONNRESET error while connecting to wsEndpoint
See original GitHub issueSteps to reproduce
Tell us about your environment:
- Puppeteer version: 1.17.0
- Platform / OS version: Alpine Linux - Edge
- Node.js version: 10
What steps will reproduce the problem?
I am trying to run my puppeteer tests within a docker.
- I followed the troubleshooting page and replicated the same dockerfile
FROM alpine:edge
# Installs latest Chromium (76) package.
RUN apk add --no-cache \
chromium \
nss \
freetype \
freetype-dev \
harfbuzz \
ca-certificates \
ttf-freefont \
openjdk8-jre \
bash \
nodejs \
yarn
# Tell Puppeteer to skip installing Chrome. We'll be using the installed package.
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
WORKDIR /usr/local/extranet
COPY ./ /usr/local/extranet
RUN yarn && yarn build
CMD ["yarn", "test:ci"]
-
I am running my tests using Jest + Puppeteer using
jest-puppeteer
package. Described in the example found in https://github.com/smooth-code/jest-puppeteer/tree/master/examples/create-react-app -
I am running my testcases with
yarn test:ci
command which does the following.
- Start my local server, to serve my website
- Launch puppeteer with the following config:
{
headless: true,
executablePath: '/usr/bin/chromium-browser',
args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-background-timer-throttling', '--disable-backgrounding-occluded-windows', '--disable-renderer-backgrounding']
}
- Then extract the wsEndpoint using
browser.wsEndpoint()
- Use that value in another place to do a
puppeteer.connect()
passing thewsEndpoint
value
What is the expected result?
The test case ran successfully
What happens instead?
Getting an error: connect ECONNREFUSED 127.0.0.1:36085
The port keeps varying everytime.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:10
Top Results From Across the Web
Puppeteer - How to connect WSEndpoint using local IP ...
If I ran this script with run command as node connector.js localhost , it tries to connect WSEndpint with localhost as the hostname....
Read more >"Error: Socket hang up" on deployed function - Support
This runs fine in Netlify dev but throws socket hang up errors when deployed. From searching, it appears people only encountered this in...
Read more >[Solved]-socket.io heroku request timeout-node.js
You need wrap socket.io with a http server ... Heroku 'H12' request timeout error with Node JS application · Node.js https request work...
Read more >try - Mercurial - Mozilla
remote/test/puppeteer/.github/workflows/publish-on-tag.yml ... + +try { + // In some environments, like esbuild, this will throw an error.
Read more >Noob question about ECONNRESET and error handling in ...
Now all of a sudden my script crashes whenever I close the TCP connection on the client's side. Sending a request to the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seeing the same issue, downgrade did not help. Tried puppeteer version 1.11.0 which comes with chromium_revision 609904. I think it corresponds to chrome-72 based on the version logs here, https://www.npmjs.com/package/puppeteer
Running node v10.15.3 on a Linux machine. Could use some help please.
We are closing this issue. If the issue still persists in the latest version of Puppeteer, please reopen the issue and update the description. We will try our best to accomodate it!