lighthouse-cron icon indicating copy to clipboard operation
lighthouse-cron copied to clipboard

Error: read ECONNRESET

Open andylimn opened this issue 7 years ago • 11 comments

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

andylimn avatar May 09 '18 10:05 andylimn

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

robinglen avatar May 10 '18 00:05 robinglen

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 https://github.com/websockets/ws/issues/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

andylimn avatar May 10 '18 11:05 andylimn

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?

robinglen avatar May 10 '18 17:05 robinglen

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)

andylimn avatar May 14 '18 15:05 andylimn

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

robinglen avatar May 14 '18 17:05 robinglen

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.

sillpa-polasani avatar Jul 18 '18 19:07 sillpa-polasani

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

robinglen avatar Jul 20 '18 10:07 robinglen

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

robinglen avatar Jul 20 '18 10:07 robinglen

@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?

kalirajanganesan avatar Feb 20 '19 09:02 kalirajanganesan

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.

stroebs avatar Mar 26 '19 10:03 stroebs

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.

robinglen avatar Mar 26 '19 13:03 robinglen