screenEmulation.mobile errors with must be boolean when provided with a boolean
See original GitHub issueSteps to reproduce:
- Run the following
lighthouse https://www.google.com --chrome-flags="--no-sandbox --headless" --output=json --output-path=stdout --disable-dev-shm-usage --form-factor=desktop --throttling.throughputKbps=1000 --throttling.rttMs=0 --throttling.cpuSlowdownMultiplier=1 --throttling.requestLatencyMs=0 --throttling.downloadThroughputKbps=0 --throttling.uploadThroughputKbps=0 --screenEmulation.width=1350 --screenEmulation.height=940 --screenEmulation.deviceScaleFactor=1 --screenEmulation.mobile=false
Result:
Invalid value: 'screenEmulation.mobile' must be a boolean
Specify --help for available options
I expected it to work.
I read the docs of upgrading to version 7 but I can’t figure out how to set the value correctly.
I also tried running without setting mobile = false:
lighthouse https://www.google.com --chrome-flags="--no-sandbox --headless" --output=json --output-path=stdout --disable-dev-shm-usage --form-factor=desktop --throttling.throughputKbps=1000 --throttling.rttMs=0 --throttling.cpuSlowdownMultiplier=1 --throttling.requestLatencyMs=0 --throttling.downloadThroughputKbps=0 --throttling.uploadThroughputKbps=0 --screenEmulation.width=1350 --screenEmulation.height=940 --screenEmulation.deviceScaleFactor=1
? We're constantly trying to improve Lighthouse and its reliability.
Learn more: https://github.com/GoogleChrome/lighthouse/blob/master/docs/error-reporting.md
May we anonymously report runtime exceptions to improve the tool over time? Yes
ChromeLauncher Waiting for browser. +0ms
ChromeLauncher Waiting for browser... +2ms
ChromeLauncher Waiting for browser..... +520ms
ChromeLauncher Waiting for browser....... +503ms
ChromeLauncher Waiting for browser.......✓ +3ms
ChromeLauncher Killing Chrome instance 32 +6ms
Runtime error encountered: Screen emulation mobile setting (true) does not match formFactor setting (desktop). See https://github.com/GoogleChrome/lighthouse/blob/master/docs/emulation.md
Error: Screen emulation mobile setting (true) does not match formFactor setting (desktop). See https://github.com/GoogleChrome/lighthouse/blob/master/docs/emulation.md
at assertValidSettings (/usr/lib/node_modules/lighthouse/lighthouse-core/config/config-helpers.js:110:13)
at resolveSettings (/usr/lib/node_modules/lighthouse/lighthouse-core/config/config-helpers.js:327:3)
at new Config (/usr/lib/node_modules/lighthouse/lighthouse-core/config/config.js:253:22)
at generateConfig (/usr/lib/node_modules/lighthouse/lighthouse-core/index.js:64:10)
at lighthouse (/usr/lib/node_modules/lighthouse/lighthouse-core/index.js:43:18)
at runLighthouse (/usr/lib/node_modules/lighthouse/lighthouse-cli/run.js:224:32)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
Environment Information
- Affected Channels: CLI
- Lighthouse version: 7.2.0
- Operating System: Linux running inside docker
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
lighthouse - npm
The Node CLI provides the most flexibility in how Lighthouse runs can be ... debug logs, or errors [boolean] [default: false] Configuration: ...
Read more >Using Lighthouse in Chrome DevTools - GitHub Pages
Using Lighthouse in Chrome DevTools. Lighthouse is integrated directly into the Chrome Developer Tools, under the "Audits" panel.
Read more >Using Lighthouse in Chrome DevTools - DEV Community
The Node CLI provides the most flexibility in how Lighthouse runs can be configured and ... debug logs, or errors [boolean] [default: false]....
Read more >ETSI TS 127 007 V16.12.0 (2022-08)
"must" and "must not" are NOT allowed in ETSI deliverables except when used in direct citation ... Report mobile originated location request error...
Read more >Lighthouse: types/lhr/settings.d.ts | Fossies
44 mobile: boolean; 45 /** Whether screen emulation is disabled. ... If no content is rendered within this limit, the run is aborted...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
--no-screenEmulation.mobile
can also serve as a workaround for now.That’s more than a workaround! That could be the permanent solution. Thank you @brendankenny it’s working well with
--no-screenEmulation.mobile