Lighthouse-ci server not working on AWS elastic beanstalk (autorun fails)
See original GitHub issueLighthouse-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:
- Created 4 years ago
- Comments:8
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 !!
@kriscoleman Awesome! It was a struggle for me to get it working so I’m glad it worked for you too!