boyney123 / garie

Open source web performance
https://garie.netlify.com/
MIT License
525 stars 46 forks source link

Timeout waiting for initial Debugger Protocol connection #7

Open paulirish opened 6 years ago

paulirish commented 6 years ago
Failed to generate report {"stack":"TypeError: Cannot read property 'replace' of undefined
    at Function.generateReportHtml (/usr/src/garie-lighthouse/node_modules/lighthouse/lighthouse-core/report/report-generator.js:37:7)
    at createReport (/usr/src/garie-lighthouse/src/light-house/utils.js:28:49)
    at generateReport (/usr/src/garie-lighthouse/src/light-house/index.js:73:34)
    at module.exports (/usr/src/garie-lighthouse/src/utils/save-report/index.js:8:30)
    at getDataForAllUrls (/usr/src/garie-lighthouse/src/index.js:39:23)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)","timestamp":"2018-10-02T17:33:16.164Z"}

i guess generateReport is getting undefined data.

paulirish commented 6 years ago

seems more like a lighthouse problem, but at least you can assert there's data returned before going into createReport, etc.

paulirish commented 6 years ago

also getting this:

garie-lighthouse_1  | error: Failed to save lighthouse data for https://www.paulirish.com {"stack":"TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at saveData (/usr/src/garie-lighthouse/src/influx/index.js:32:25)
    at getDataForAllUrls (/usr/src/garie-lighthouse/src/index.js:36:19)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)","timestamp":"2018-10-02T17:33:16.156Z"}

I suppose it's the same root issue.

paulirish commented 6 years ago

Ah yes the root issue is likely this one:

Failed to get data for https://www.paulirish.com {"stack":"Error: Timeout waiting for initial Debugger Protocol connection.
    at ClientRequest.request.setTimeout (/usr/src/garie-lighthouse/node_modules/lighthouse/lighthouse-core/gather/connections/cri.js:123:21)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:106:13)
    at ClientRequest.emit (events.js:208:7)
    at Socket.emitTimeout (_http_client.js:711:34)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:106:13)
    at Socket.emit (events.js:208:7)
    at Socket._onTimeout (net.js:420:8)
    at ontimeout (timers.js:482:11)","timestamp":"2018-10-02T17:33:16.143Z"}

edit: sorry i shoulda been filing this on garie-lighthouse repo. :)

boyney123 commented 6 years ago

Hey @paulirish !

Thanks for raising the issue, Are you running the garie-v2 branch?

I'll try and replicate this locally and will take a look 👍 thanks for raising it.

paulirish commented 6 years ago

Are you running the garie-v2 branch? Yup i am. updated to master as of 5 hours ago.

I'm just running garie against paulirish.com every 1 minute. :)

I think this happened while my machine was sleeping. Though it didnt happen just now as I stepped away for 45 minutes. Probably wont be easy to reproduce, though I suspect Chrome isn't launching successfully.

boyney123 commented 6 years ago

but at least you can assert there's data returned before going into createReport, etc.

Yeah good idea, il have a look at that.

Yeah il try and change my settings to match yours and see if I can replicate it too.

paulirish commented 6 years ago

@boyney123 you can reproduce part of this by just disconnnecting from WiFi. :)