Skip to content

Lighthouse parameter passed as string instead of boolean #81

@joshuagibeonm

Description

@joshuagibeonm

I want to run lighthouse in desktop settings, but based on issue #68, looks like we can't use official documentation guide to run lighthouse in desktop settings. I tried in 16.10.3 but it produce same result as #68.

I tried to dig lighthouse configuration and find that we need to change formFactor and some other settings to run lighthouse in desktop settings. But when I tried to run this command:

docker run sitespeedio/sitespeed.io:16.10.3-plus1 -n 1 --mobile false --lighthouse.extends 'lighthouse:default' 
--lighthouse.settings.formFactor desktop --lighthouse.settings.screenEmulation.mobile false 
'https://www.google.com/' --plugins.add /lighthouse

I got following error:

ERROR: Lighthouse could not test https://www.google.com/ please create an upstream issue: https://github.com/GoogleChrome/lighthouse/issues/new?template=Bug_report.md 
Error: Screen emulation mobile setting (false) does not match formFactor setting (desktop). 
See https://github.com/GoogleChrome/lighthouse/blob/master/docs/emulation.md

I tried to pass verbose flag and this is the output:

...
"lighthouse": {
      "extends": "lighthouse:default",
      "settings": {
        "formFactor": "desktop",
        "screenEmulation": {
          "mobile": "false"
        }
     }
},
...

The flag is passed as string instead of boolean.

I'm not sure if this is the root cause of the error because mobile parameter is passed as string and it's works. Maybe this is happened because in lighthouse, there's strict type validation

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions