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

TypeError: perf.getEntriesByName is not a function #596

Closed
ai opened this issue Apr 28, 2021 · 4 comments
Closed

TypeError: perf.getEntriesByName is not a function #596

ai opened this issue Apr 28, 2021 · 4 comments

Comments

@ai
Copy link

ai commented Apr 28, 2021

Describe the bug

After I updated Node.js 15→16 (but I am not sure that it was a reason, I didn’t deploy for months).

To Reproduce

GitHub Actions config:

      - name: Audit website
        if: "!steps.hash.outputs.noChanges"
        uses: treosh/lighthouse-ci-action@v7
        with:
          runs: 3
          uploadArtifacts: true
          temporaryPublicStorage: true
          configPath: ./lighthouserc.json

lighthouserc.json:

{
  "ci": {
    "collect": {
      "url": [
        "https://logux.io/?offline"
      ]
    },
    "assert": {
      "preset": "lighthouse:all",
      "assertions": {
        "mainthread-work-breakdown": ["error", { "minScore": 0.90 }],
        "critical-request-chains": "off",
        "estimated-input-latency": ["error", { "minScore": 0.95 }],
        "first-contentful-paint": ["error", { "minScore": 0.95 }],
        "first-meaningful-paint": ["error", { "minScore": 0.95 }],
        "uses-responsive-images": ["error", { "minScore": 0.85 }],
        "uses-long-cache-ttl": ["error", { "minScore": 0.70 }],
        "time-to-first-byte": ["error", { "minScore": 0 }],
        "max-potential-fid": ["error", { "minScore": 0.35 }],
        "speed-index": ["error", { "minScore": 0.95 }],
        "dom-size": ["error", { "minScore": 0.95 }]
      }
    }
  }
}

Expected behavior
A clear and concise description of what you expected to happen.

Logs/Screenshots

Log from GitHub Actions task:

  Running Lighthouse 3 time(s) on https://***/?offline
  Run #1...failed!
  Error: Lighthouse failed with exit code 1
      at ChildProcess.<anonymous> (/home/runner/work/_actions/treosh/lighthouse-ci-action/v7/node_modules/@lhci/cli/src/collect/node-runner.js:120:21)
      at ChildProcess.emit (events.js:210:5)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
  Wed, 28 Apr 2021 22:54:01 GMT ChromeLauncher Waiting for browser.
  Wed, 28 Apr 2021 22:54:01 GMT ChromeLauncher Waiting for browser...
  Wed, 28 Apr 2021 22:54:02 GMT ChromeLauncher Waiting for browser.....
  Wed, 28 Apr 2021 22:54:02 GMT ChromeLauncher Waiting for browser.......
  Wed, 28 Apr 2021 22:54:03 GMT ChromeLauncher Waiting for browser.........
  Wed, 28 Apr 2021 22:54:03 GMT ChromeLauncher Waiting for browser...........
  Wed, 28 Apr 2021 22:54:04 GMT ChromeLauncher Waiting for browser.............
  Wed, 28 Apr 2021 22:54:04 GMT ChromeLauncher Waiting for browser.............✓
  Wed, 28 Apr 2021 22:54:04 GMT ChromeLauncher Killing Chrome instance 3099
  Runtime error encountered: perf.getEntriesByName is not a function
  TypeError: perf.getEntriesByName is not a function
      at Object.exports.stop (/home/runner/work/_actions/treosh/lighthouse-ci-action/v7/node_modules/marky/lib/marky.cjs.js:55:24)
      at Function.timeEnd (/home/runner/work/_actions/treosh/lighthouse-ci-action/v7/node_modules/lighthouse-logger/index.js:128:11)
      at Function.requireGatherers (/home/runner/work/_actions/treosh/lighthouse-ci-action/v7/node_modules/lighthouse/lighthouse-core/config/config.js:873:9)
      at new Config (/home/runner/work/_actions/treosh/lighthouse-ci-action/v7/node_modules/lighthouse/lighthouse-core/config/config.js:389:27)
      at generateConfig (/home/runner/work/_actions/treosh/lighthouse-ci-action/v7/node_modules/lighthouse/lighthouse-core/index.js:64:10)
      at lighthouse (/home/runner/work/_actions/treosh/lighthouse-ci-action/v7/node_modules/lighthouse/lighthouse-core/index.js:43:18)
      at runLighthouse (/home/runner/work/_actions/treosh/lighthouse-ci-action/v7/node_modules/lighthouse/lighthouse-cli/run.js:224:32)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)

Environment (please complete the following information):

GitHub Actions

@patrickhulce
Copy link
Collaborator

Thanks for filing @ai! This is a bug in a dependency of Lighthouse, not in Lighthouse CI. I've filed it there, see nolanlawson/marky#18

@MarcLlobet
Copy link

Please update marky from 1.2.0 to 1.2.2. The fix is already there.

@patrickhulce
Copy link
Collaborator

That's a concern for the checked in versions of treo's Lighthouse CI action if you're just installing Lighthouse CI normally, you will already get this fix, Lighthouse isn't pinning to 1.2.0.

@MarcLlobet
Copy link

That's a concern for the checked in versions of treo's Lighthouse CI action if you're just installing Lighthouse CI normally, you will already get this fix, Lighthouse isn't pinning to 1.2.0.

I've created an issue in lighthouse since seems the right place.

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

3 participants