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

Default dashboard deployment has GQL errors #184

Open
dragancla opened this issue Nov 23, 2022 · 5 comments
Open

Default dashboard deployment has GQL errors #184

dragancla opened this issue Nov 23, 2022 · 5 comments

Comments

@dragancla
Copy link

dragancla commented Nov 23, 2022

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

  • sorry-cypress version: not relevant
  • cypress version: not relevant
  • helm chart version: not relevant
@dragancla dragancla changed the title Default dashboard deployment has project-related HTML errors Default dashboard deployment has GQL errors Nov 23, 2022
@Adriien-M
Copy link

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

@Adriien-M
Copy link

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
Copy link

thowd22 commented Mar 30, 2023

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
Copy link

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
Copy link

noskiddie commented Jul 14, 2024

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...

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

5 participants