sitespeedio / plugin-lighthouse

Lighthouse plugin for sitespeed.io
MIT License
30 stars 19 forks source link

screenshot in lighthouse viewport is still in desktop view #129

Closed Aszzo closed 7 months ago

Aszzo commented 7 months ago

I run lighthouse in the node.js runtime and always get desktop screenshots. lighthouse configuration

{
  disableStorageReset: true,
  logLevel: 'info',
  output: 'html',
  screenEmulation: {
    mobile: true,
    width: 360,
    height: 640,
    // Moto G4 is really 3, but a higher value here works against
    // our perf recommendations.
    // https://github.com/GoogleChrome/lighthouse/issues/10741#issuecomment-626903508
    deviceScaleFactor: 2.625,
    disabled: false,
  },
  emulatedUserAgent: MOTOG4_USERAGENT,
  formFactor: 'mobile',
  throttling: mobileRegular4G,
  onlyCategories: ['performance'],
  skipAudits: ['bf-cache'], // not working in headless mode
};

image image

soulgalore commented 7 months ago

Hi @Aszzo I'm not sure I follow, is it that the viewport you set 360x640 becomes 412x823? Is that the up do take way to set things in Lighthouse, I haven't tested how it works nowadays.

soulgalore commented 7 months ago

There's a switch that you can use to use the mobile default emulation for Lighthouse, just by adding ---mobile to sitespeed.io, do you also get the wrong version then? Then something has changed probably in the Lighthouse setup, I can have a look.

Aszzo commented 7 months ago

@soulgalore Sorry bro, I was dazzled and thought this was a lighthouse repro. I'll close this issue