Repository navigation
fix(cli): only use the mobile fallback viewport for dry runs - #353
Merged
ChristopherPHolder merged 1 commit intoNov 13, 2026
Merged
Conversation
The fallback launch options gave every run a mobile defaultViewport, although it was only meant for --dry-run. A replayed DevTools recording starts with setViewport and isMobile: false, which makes Puppeteer reload the page inside the timespan. Lighthouse then logs a TypeError for the resulting about:blank navigation. Real runs now use Puppeteer's default viewport. Dry runs are unchanged. Closes #352
❗❗❗ report generated by this PR ❗❗❗☕ Order Coffee ☕Date/Time: 2026-11-13 09:18
|
☕ Order Coffee ☕Date/Time: 2026-11-13 09:18
|
ChristopherPHolder
merged commit Nov 13, 2026
f23d98b
into
fix/puppeteer-25-chrome-157
5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #352
Stacked on #351, because both change
parseLaunchOptions. Once #351 is merged, I'll retarget this PR tomain.What changed
parseLaunchOptionsnow takesdryRunfrom the collect options. When a user-flow file has nolaunchOptions, the mobiledefaultViewport(800×600,isMobile: true) is only added for--dry-run. Normal runs keepheadless: falseand use Puppeteer's default viewport (800×600, not mobile).Flows that set their own
launchOptionsare unaffected, the same as before.Why
A recording exported from Chrome DevTools starts with a
setViewportstep that setsisMobile: false. With the mobile fallback viewport, Puppeteer reloads the page for that step, so the timespan records an extraabout:blanknavigation. Lighthouse 13.6.0 then logsTypeError: Cannot read properties of undefined (reading 'url')from Lantern'screateGraph. The details are in #352.Recordings made with mobile emulation start with
setViewportandisMobile: true, so they'll now trigger that reload instead. That case is no worse than desktop recordings are today.Verification
clibuild and lint pass.cli-e2e: 23 tests pass, including both--dry-runtests.order-coffee-1recording run throughuser-flow collectwith nolaunchOptionsandCI=1, on Chrome 157. The same flow on fix(cli): run flows on Chrome 157 with puppeteer 25.17 #351's branch logs theTypeError; on this branch it doesn't. The timespan step reports Performance 0.99 with no audit errors.