Lighthouse parameter passed as string instead of boolean
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- performance
Research direction
Reproduce the issue with the provided Docker command and inspect the verbose Lighthouse configuration, especially screenEmulation.mobile. Trace where the command-line value is converted into the Lighthouse settings object; done means the desktop configuration passes a boolean value and Lighthouse runs without the type-mismatch error.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- JavaScript
- Stars
- 31
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sitespeedio/plugin-lighthouse
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
sitespeedio/plugin-lighthouse#136 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
sitespeedio/plugin-lighthouse#134 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sitespeedio/plugin-lighthouse#133 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
sitespeedio/plugin-lighthouse#126 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
sitespeedio/plugin-lighthouse#120 · 7 comments ·
All issues in sitespeedio/plugin-lighthouse
Similar issues
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 90/100