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

Error: read ECONNRESET #1

Open
andylimn opened this issue May 9, 2018 · 11 comments
Open

Error: read ECONNRESET #1

andylimn opened this issue May 9, 2018 · 11 comments

Comments

@andylimn
Copy link

andylimn commented May 9, 2018

Hi, really excited to start using this tool - thanks for making this available :)

I keep getting the following exception and can't seem to catch it, any thoughts?

events.js:183 throw er; // Unhandled 'error' event ^ Error: read ECONNRESET at _errnoException (util.js:1022:11) at TCP.onread (net.js:628:25)

I tried adding the following, but no joy:

lighthouseCron.on('error', error => { console.log('errored'); });

Apologies, I'm a noob to this!

Thanks again

@robinglen
Copy link
Owner

Hello,

Can you post your code in here? I've not checked the lighthouse API in a while, maybe there has been a breaking change.

I think however Lighthouse API coming from google services could replace this module in the future.

Rob

@andylimn
Copy link
Author

Hey Rob,
Yeah just saw about the API this morning, sounds great and should answer my use case in the longer term.

I'm just running the demo.js without changes and I get that error. I then added the error handler as pasted previously but it seems it never fires.

Seems to be related to the Chrome tab being closed. There's some info about the error in WebSocket library here implying a change in behaviour after version 3.3.3 websockets/ws#1256

Just added the above for reference, but like you say sounds like the API should be tool of choice for testing at scale going forwards.

Thanks,

Andy

@robinglen
Copy link
Owner

Hey andy,

I just ran it:

$ nvm use
$ npm install
$ npm run demo

That starts lighthouse cron but I am getting a different error:

{ metadata:
   { website: 'Google',
     description: 'Homepage',
     url: 'https://www.google.com/' },
  score: 50,
  results:
   { 'first-meaningful-paint': { score: 100, value: 671.2, optimal: '1,600ms' },
     'speed-index-metric': { score: 100, value: 898, optimal: '1,250' },
     'estimated-input-latency': { score: 100, value: 22.7, optimal: '50ms' },
     'time-to-interactive': { score: 100, value: 708.4, optimal: '5,000ms' },
     'total-byte-weight': { score: 100, value: 301577, optimal: '1,600 KB' },
     'dom-size': { score: 100, value: 374, optimal: '1,500 nodes' } } }
(node:58881) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: ENOENT: no such file or directory, open '/var/folders/l1/g7fr01r54j12by_nz6rs2h30c5wxv0/T/lighthouse.XXXXXXX.KROniRBr/chrome.pid'

Just to confirm, you don't even connect to the site?

@andylimn
Copy link
Author

andylimn commented May 14, 2018

Hey Rob,

Running demo.js directly I can see Chrome open up and navigate to the Google search homepage, it does several reloads and then crashes out with the following exception just as it goes to close the tab. It never starts the YouTube audit...

Invalid ProtoExpectation: ignored(580 580 undefined) File a bug with this trace!
Invalid ProtoExpectation: ignored(580 580 undefined) File a bug with this trace!
Invalid ProtoExpectation: ignored(580 580 undefined) File a bug with this trace!
Invalid ProtoExpectation: ignored(580 580 undefined) File a bug with this trace!
Invalid ProtoExpectation: ignored(580 580 undefined) File a bug with this trace!
Invalid ProtoExpectation: ignored(580 580 undefined) File a bug with this trace!
Invalid ProtoExpectation: ignored(580 580 undefined) File a bug with this trace!
events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at _errnoException (util.js:1022:11)
    at TCP.onread (net.js:628:25)

@robinglen
Copy link
Owner

ok this is a little odd... I will look into this, thank you

@sillpa-polasani
Copy link

Hey Andy,
even i get am getting same error as you:
{ 'first-meaningful-paint': { score: 100, value: 491.2, optimal: '1,600ms' },
'speed-index-metric': { score: 100, value: 855, optimal: '1,250' },
'estimated-input-latency': { score: 100, value: 16, optimal: '50ms' },
'time-to-interactive': { score: 100, value: 822.6, optimal: '5,000ms' },
'total-byte-weight': { score: 100, value: 314430, optimal: '1,600 KB' } } }
(node:723) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 3): Error: ENOENT: no such file or directory, open '/var/folders/z0/g3b27k6s56g8lq7_835zc6mr3kfd58/T/lighthouse.XXXXXXX.IT4LN82H/chrome.pid'
(node:723) [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.

@robinglen
Copy link
Owner

Hey sorry, I've been super busy... will look at this right now

@robinglen
Copy link
Owner

ok this is weird... I'm not sure whats going on, it looks like a change in lighthouse and/or chrome... looking into it

@kalirajanganesan
Copy link

@thearegee I have facing these type of error while getting the lighthouse audit report of my site. Can you please provide the suggestion to resolve this issue?

@stroebs
Copy link

stroebs commented Mar 26, 2019

This is an issue with Chromium, by the way. Downgrading Chromium to v70 (apt install chromium=70.0.3538.110-1~deb9u1) results in Lighthouse working again.

@robinglen
Copy link
Owner

Hey sorry, I've not had a chance look at this in a long time... if someone wants create a PR I will look. Just been flat out on something else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants