question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Heroku server responding with LHCI server not API-compatible (Improve debug logging)

See original GitHub issue

So I have been stuck on this issue for weeks now. I can’t get heroku + circleCI work. I am getting the same error every time.

#!/bin/bash -eo pipefail
lhci autorun
✅  .lighthouseci/ directory writable
✅  Configuration file found
✅  Chrome installation found
✅  GitHub token set
⚠️   Ancestor hash not determinable
✅  LHCI server reachable
⚠️   LHCI server not API-compatible
⚠️   LHCI server token invalid
✅  LHCI server unique build for this hash
Healthcheck passed!

Running Lighthouse 3 time(s) on https://dges.app/
Run #1...done.
Run #2...done.
Run #3...done.
Done running Lighthouse!

Error: Could not find active project with provided token
    at runLHCITarget (/usr/local/share/.config/yarn/global/node_modules/@lhci/cli/src/upload/upload.js:401:11)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async Object.runCommand (/usr/local/share/.config/yarn/global/node_modules/@lhci/cli/src/upload/upload.js:592:16)
    at async run (/usr/local/share/.config/yarn/global/node_modules/@lhci/cli/src/cli.js:109:7)
WARNING: upload command failed.
Done running autorun.

My heroku server url is https://limitless-lowlands-77781.herokuapp.com/app/projects . I have checked the limited logs on heroku and I see heroku is returning 404-s to POST /v1/projects/lookup calls.

this is how my .lighthouserc.js looks like.

module.exports = {
  ci: {
    collect: {
      numberOfRuns: 3,
      url: ['https://dges.app/'],
      // staticDistDir: './dist/apps/dges-front/',
    },
    upload: {
      target: 'lhci',
      serverBaseUrl: 'https://limitless-lowlands-77781.herokuapp.com',
      token: 'cd36d33e-f72a-46db-ab2c-3bce75b07741', // could also use LHCI_TOKEN variable instead
    },
  },
};

I have experimented with using environment variables and I also ended up hardcoding the token. but none help. https://github.com/GreedyA1/dges is the github project I am working on. Please help out. can’t pass this issue for weeks now.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6

github_iconTop GitHub Comments

3reactions
patrickhulcecommented, Jan 4, 2021

Thanks for filing @GreedyA1!

You’re getting this error because the version of the client and the version of the server you are using are not compatible.

You’re installing v0.6.x in Circle but trying to save the results to a server running v0.4.x (see https://limitless-lowlands-77781.herokuapp.com/version). Either upgrade the server to 0.6.x or downgrade the client to 0.4.x.

2reactions
patrickhulcecommented, Jan 6, 2021

@GreedyA1 it looks like you’ve set environment variables for these LHCI properties in addition to setting in a lighthouserc.js.

image

My best guess is that these are conflicting (and with switching tokens + heroku projects are likely mismatched). Just pick one method and print out the values you think you should be using in the logs, this is a great feature request for more debug logging in LHCI to make this easier for you to debug 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Diagnosing Heroku Connect Performance Issues
Step 2: Review Application Logs. Using your application's log drain, find logs that look like app[herokuconnect] and have a ↓ character in them ......
Read more >
Debugging Heroku Error Logs - ruby on rails - Stack Overflow
I believe the issue is that one of your controllers/models has a class name which is not capitalized correctly.
Read more >
7. When It Goes Wrong - Heroku: Up and Running [Book]
Let's dig into debugging problems on deploy and during runtime. ... If everything works fine on your staging server but not on your...
Read more >
How to debug code in production (Heroku) that worked fine in ...
You connect to the dyno with the heroku CLI: heroku ps:exec -app {{my-app-name}}; You set up the remote debugging: 2.i. Create a Procfile...
Read more >
Jekyll+Travis+Lighthouse+Heroku=CI/CD - Ray Bogman
Use Lighthouse Server now and monitor your Jekyll Performance on every Git ... So when Jekyll became my main CMS system I could...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found