catchpoint/WebPageTest.api-nodejs

Not getting Lighthouse Results

Yamikamisama opened this issue · 4 comments

Hey there so I am running this code:

const WebPageTest = require('webpagetest');
const wpt = new WebPageTest('www.webpagetest.org', API_KEY);

let opts = {
  url: 'https://google.com/',
  apiKey,
  strategy: 'mobile'
};

exports.helloWorld = function helloWorld(req, res) {
  wpt.runTest(opts.url, {pollResults: 5, timeout: 5000, lighthouse: true}, (err, data) => {
    res.status(200).send(data);
  });
};

And it is returning data, however it does not return Lighthouse Data, which is what I primarily need.
screen shot 2017-12-19 at 2 10 15 pm

Any clue what Im doing wrong?

Can you open this as an issue in the webpagetest project?

What output do you see when you click on the ? for the score? It should provide a log and an indication of why it failed.

You also REALLY shouldn't be posting your API key for anyone else to take and use.

I opened it there

screen shot 2017-12-19 at 4 41 42 pm

And this is what it returns

fixed this by sending it here

wpt.runTest(opts.url, {location: 'Dulles_MotoG4', pollResults: 5, timeout: 5000, lighthouse: true}, (err, data) => {