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.

Lighthouse-ci server not working on AWS elastic beanstalk (autorun fails)

See original GitHub issue

Lighthouse-ci server not working on AWS elastic beanstalk (autorun fails)

phenomenon

I installed the server through docker. The server works fine. The project is also registered through the wizard. So far so good. The problem is autorun. Autorun does not work with a 422 error.

autorun error message

Error: Unexpected status code 422
  {"message": "Invalid build"}
    at ApiClient._convertFetchResponseToReturnValue (/usr/local/lib/node_modules/@lhci/cli/node_modules/@lhci/utils/src/api-client.js:55:21)
    at process._tickCallback (internal / process / next_tick.js: 68: 7)

upload error message

Error: Could not find active project with provided token
    at runLHCITarget (/usr/local/lib/node_modules/@lhci/cli/src/upload/upload.js:223:11)
    at process._tickCallback (internal / process / next_tick.js: 68: 7)%

Environment:

aws elastic beanstalk docker This is a common setting. Dockerrun.aws.json

{
  "AWSEBDockerrunVersion": "1",
  "Image": {
    "Name": "patrickhulce / lhci-server"
  },
  "Ports": [
    {
      "ContainerPort": 9001,
      "HostPort": 9001
    }
  ],
  "Volumes": [
    {
      "HostDirectory": "/ data / lhci-data",
      "ContainerDirectory": "/ data"
    }
  ]
}

analysis

I tried putting the logs in @ lhci / cli / node_modules / @ lhci / utils / src / api-client.js file.

const error = new Error (`Unexpected status code $ {response.status} \ n $ {body}`);
      console.log ('log', body, response.status, response)
log Not Found 404 Body {

A 404 error is returned. I read the code to find out more about it and checked the url routes to check with the server.

POST server / v1 / projects / lookup
Content-Type: application / json

{
  "token": "token"
}

###
GET server / v1 / projects
Content-Type: application / json

###
GET server / v1 / projects / slug: test2
Content-Type: application / json

As I tested each server api, I found something unusual. The server sometimes works fine, but sometimes it returns a 404. I’ve read the code and I know there’s nothing wrong with it. It works fine on my local server.

If someone has experience with this, please share it.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
kriscolemancommented, Nov 16, 2021

Gosh, me too. I spent a few days on this trying figure out why EB wasn’t playing nice. You saved me a ton of pain and I just got the dopamine of closing a bajillion browser tabs. Thanks again @jared-christensen !!

1reaction
jared-christensencommented, Nov 16, 2021

@kriscoleman Awesome! It was a struggle for me to get it working so I’m glad it worked for you too!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Resolve the error when Amazon EC2 instances fail to ... - AWS
When I try to create an AWS Elastic Beanstalk environment, I get the following error: "The EC2 instances failed to communicate with AWS ......
Read more >
Lighthouse CI Client fails in AWS CodePipeline / CodeBuild
The Problem. The reason for this error is not a missing git client, it is the missing .git directory. CodePipeline downloads the source ......
Read more >
Deploying Google Lighthouse CI (LHCI) using AWS-CDK ...
Lighthouse works by checking a webpage against a set of criteria for performance and accessibility in order to identify potential issues ...
Read more >
I ran into a problem using Elastic Beanstalk from aws
This looks like Inbound Rules issue. In the AWS tutorial that uses a web application that uses AWS RDS, Inbound Rules are mentioned....
Read more >
Run tests after every push | Docs - Buddy.Works
The core rule of Continuous Integration is to test every single change to code. Buddy lets you easily configure a pipeline that will ......
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