sorry-cypress / charts

A Kubernetes Helm Chart for Sorry Cypress, an open-source on-premise, self-hosted alternative to cypress dashboard.
https://sorry-cypress.dev
MIT License
42 stars 79 forks source link

Default dashboard deployment has GQL errors #184

Open dragancla opened 2 years ago

dragancla commented 2 years ago

Summary

When running on a minikube cluster and following the readme, the default published helm chart displays HTML error message in the dashboard projects list: "Error: Something went wrong while loading the project list. Unexpected token '<', "<html> <h"... is not valid JSON" and an error message when trying to create a project: Error: Unexpected token '<', "<html> <h"... is not valid JSON

image image

Kubernetes pod logs show 405 GQL errors, I guess POST is not allowed:

  1. 172.17.0.1 - - [23/Nov/2022:16:48:47 +0000] "GET /projects HTTP/1.1" 200 796 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36" "-"
  2. 172.17.0.1 - - [23/Nov/2022:16:48:47 +0000] "POST /graphql HTTP/1.1" 405 571 "http://127.0.0.1:51178/projects" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36" "-"
  3. 172.17.0.1 - - [23/Nov/2022:16:48:48 +0000] "POST /graphql HTTP/1.1" 405 571 "http://127.0.0.1:51178/--create-new-project--/edit" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36" "-"

How to reproduce

minikube delete
minikube start
k create ns cypress-dashboard
helm repo add sorry-cypress https://sorry-cypress.github.io/charts
helm install -n cypress-dashboard sorry-cypress sorry-cypress/sorry-cypress
minikube service -n cypress-dashboard --url sorry-cypress-dashboard

Environment

Adriien-M commented 1 year ago

I have the same issue, someone did success to solve the issue?

Adriien-M commented 1 year ago

After some research, we have to set dashboard.environmentVariables.graphQlSchemaUrl in values to call the right api url which is https://[YOUR_API_URI]/cypress-api

thowd22 commented 1 year ago

Im having the same issue. I set the API url in the values.yaml to cypressapi.full.url.systems and set the graphQlSchemaUrl to "https://cypressapi.full.url.systems/cypress-api" and now the error is "Error Something went wrong while loading the project list. Failed to fetch"

Rohmilchkaese commented 1 year ago

Thanks for you research @Adriien-M !

I think this could be handled at HELM Level right ? Just pass the configured Value from the corresponding configured Ingress to the key dashboard.environmentVariables.graphQlSchemaUrl as value

noskiddie commented 4 months ago

Today I spent the entire day trying to get sorry-cypress running in k3s.

The API wasn't working.

"Error: Something went wrong while loading the project list. Unexpected token '<', " <h"... is not valid JSON"

But eventually, I found the problem in the API config:

# set BASE_PATH
basePath: 10

It was enough to change it to -

# set BASE_PATH
basePath: ""

and everything started working immediately.

Thanks for not letting me get bored...