Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lighthouse report is blank, and I can only see a console error #73

Open
potnoddle opened this issue Apr 9, 2024 · 1 comment
Open

Comments

@potnoddle
Copy link

potnoddle commented Apr 9, 2024

I'm running my report in Playwright Test Runner with vscode, I did have the code running, but it no longer works. And I've run this against multiple sites without luck.

lighthouseVersion: 11.7.1

I have updated to the latest version, which may have broken it.

lighthouse-www_google_co_uk.zip

compiled-reportrenderer.js:2656  Uncaught Error: query .lh-category .lh-category-header not found
    at te.find (compiled-reportrenderer.js:2636:9257)
    at O.injectFinalScreenshot (compiled-reportrenderer.js:2636:21728)
    at ie._renderReport (compiled-reportrenderer.js:2637:2939)
    at ie.renderReport (compiled-reportrenderer.js:2636:59883)
    at Ne (compiled-reportrenderer.js:2637:18547)
    at Lt (compiled-reportrenderer.js:2666:527)
    at compiled-reportrenderer.js:2706:3
@potnoddle potnoddle changed the title Lighthouse report is blank. I'm running my report in playwirght test runner with vscode Lighthouse report is blank, and I can only see a console error Apr 9, 2024
@damongabrielle
Copy link

I hit this issue as well with playwright-lighthouse 4.0.0, playwright 1.46.1 and lighthouse 12.2.1.

Took me a while to figure out what was going on. It should be reproducible if you don't set thresholds for any category.

This playwrightLighthouseConfig produced the above error:

const playwrightLighthouseConfig = {
    ignoreError: true,
    reports: {
        formats: {
            json: true,
            html: true,
            csv: true,
        },
        name: 'lighthouse-default-report',
        directory: `${process.cwd()}/lighthouse-report`
    },
    port: 9222,
    thresholds: {}
};

and this one works:

const playwrightLighthouseConfig = {
    ignoreError: true,
    reports: {
        formats: {
            json: true,
            html: true,
            csv: true,
        },
        name: 'lighthouse-default-report',
        directory: `${process.cwd()}/lighthouse-report`
    },
    port: 9222,
    thresholds: {
      performance: 0
    }
};

Note: I'm setting IgnoreError so I can get the report back regardless of whether there's a failure so I can make custom reports before re-throwing the error. I don't think its related to the problem but also didn't investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants