harlan-zw / unlighthouse

Scan your entire site with Google Lighthouse in 2 minutes (on average). Open source, fully configurable with minimal setup.
https://unlighthouse.dev
MIT License
3.88k stars 115 forks source link

Missing thumbnail images #245

Closed lilHermit closed 1 month ago

lilHermit commented 1 month ago

Describe the bug

I'm seeing missing thumbnails when executing inside docker

As seen below this site has 2 manualled added urls, as it scans the 404s for the thumbnails appear and clicking each shows the correct full size image

image

Reproduction


docker run -it --rm -w /app -v $(pwd):/app -p 5678:5678 --shm-size=2g node:18 bash
## inside the container

## Setup
npm install unlighthouse
npx puppeteer browsers install chrome
apt update && apt install gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget

## Execute
npx unlighthouse --site https://example.com

### System / Nuxt Info

  System:
    OS: Linux 6.8 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
    CPU: (16) x64 AMD Ryzen 7 5700G with Radeon Graphics
    Memory: 43.86 GB / 62.15 GB
    Container: Yes
    Shell: 5.2.15 - /bin/bash
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.7.0 - /usr/local/bin/npm
lilHermit commented 1 month ago

Ok I've worked out what the problem is. I was running accessibility only with

    lighthouseOptions: {
        onlyCategories: ['accessibility'],
    }

Removing this or adding performance fixes the issue, so I assume the images are generated in that stage?!

cy-josh commented 1 month ago

I'm also having this issue when running the scan with only the accessibility category enabled + generating a static report.

I've noticed that the static files are looking for an image file called screenshot.jpeg but the static files only include an image file called full-screenshot.jpeg in the report directory for a specific page. The __screenshot-thumbnails__ directory is empty.

image

image

harlan-zw commented 1 month ago

Hi, thanks for the issue, I've pushed up a fix in v0.14.0.