Error from Webpage API while running sitespeed.io Test

254 Views Asked by At

I ran below webpagetest through sitespeed on docker configuration. Below is command for the reference.

docker-compose run sitespeed.io site_urls.txt --graphite.host=graphite --mobile --firstParty .fabhotels.com --network=3gslow -c 3gslow --webpagetest.key=<Webpagetest API Key> --webpagetest.runs=1 --webpagetest.useragent="Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Mobile Safari/537.36" --webpagetest.location=ap-south-1:Chrome.3GSlow

I am getting below error as output.

Unhandled rejection TypeError: Cannot read property 'browser_name' of undefined on line 48
    at eval (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:159:71)
    at template (eval at wrap (/usr/src/app/node_modules/pug-runtime/wrap.js:6:10), <anonymous>:1767:3)
    at Object.renderTemplate (/usr/src/app/lib/plugins/html/renderer.js:27:37)
    at Promise.resolve.map.url (/usr/src/app/lib/plugins/html/htmlBuilder.js:248:37)
From previous event:
    at HTMLBuilder.render (/usr/src/app/lib/plugins/html/htmlBuilder.js:173:69)
    at Object.processMessage (/usr/src/app/lib/plugins/html/index.js:201:35)
    at queue.process.message (/usr/src/app/lib/core/queueHandler.js:208:32)
    at drainItem (/usr/src/app/node_modules/concurrent-queue/index.js:96:21)
    at Immediate.drain [as _onImmediate] (/usr/src/app/node_modules/concurrent-queue/index.js:77:84)
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)

After debugging I found webpagetest.har is giving null as Response from Webpage Test API

{
  "log": {
    "version": "1.1",
    "creator": {
      "name": "WebPagetest",
      "version": "18.10"
    },
    "browser": {
      "name": null,
      "version": null
    },
    "pages": [
      {
        "startedDateTime": "1970-01-01T00:00:00.000+00:00",
        "title": "Run , First View for ",
        "id": "page___",
        "pageTimings": {
          "onLoad": null,
          "onContentLoad": -1,
          "_startRender": null
        }
      }
    ],
    "entries": []
  }
}

I am using latest Docker Image of SiteSpeed.io

What could be the possible reasons for null output from API, as I am not able to figure it out.

1

There are 1 best solutions below

0
On BEST ANSWER

Issue is in the request params, update the

--webpagetest.location to ap-south-1:Chrome

and to apply slow3G filter use

--webpagetest.connectivity="3G"