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

analyse fails with "Invalid character 'u' looking for beginning of value" #74

Closed
tetchel opened this issue Sep 28, 2021 · 3 comments
Closed

Comments

@tetchel
Copy link

tetchel commented Sep 28, 2021

 /home/runner/work/_temp/openshift-bin/crda analyse manifests/node/empty-package/package.json --verbose --client=gh-actions
Analysing your Dependency Stack! Please wait...
Usage:
  crda analyse [flags]

Flags:
  -h, --help      help for analyse
  -j, --json      Set output format to JSON.
  -v, --verbose   Detailed Analyses Report.

Global Flags:
  -m, --client string   Client [tekton/jenkins/gh-actions] (default "terminal")
  -d, --debug           Sets Log level to Debug.
  -c, --no-color        Toggle colors in output.

invalid character 'u' looking for beginning of value
 Error: crda exited with code 1

Sometimes, our CRDA actions all start failing at once with this error message. If I had to guess, the server is overloaded since they all start encountering it at the same time.

This message has to be improved. It looks like there is a text response being parsed as JSON.

https://github.com/tetchel/crda/actions/runs/1283508526

@tetchel
Copy link
Author

tetchel commented Sep 28, 2021

Here's a different error case which explicitly states it's a server overload with a 504 status.

 /home/runner/work/_temp/openshift-bin/crda analyse manifests/node/npm/package.json --verbose --client=gh-actions
Analysing your Dependency Stack! Please wait...
5:39PM ERR Stack Analyses Get Request Failed with status code 504.  Please retry after sometime. If issue persists, Please raise at https://github.com/fabric8-analytics/cli-tools/issues."
Usage:
  crda analyse [flags]

Flags:
  -h, --help      help for analyse
  -j, --json      Set output format to JSON.
  -v, --verbose   Detailed Analyses Report.

Global Flags:
  -m, --client string   Client [tekton/jenkins/gh-actions] (default "terminal")
  -d, --debug           Sets Log level to Debug.
  -c, --no-color        Toggle colors in output.

message from server: 
##[debug]Exit code 1
Error: crda exited with code 1
5:39PM ERR Stack Analyses Get Request Failed with status code 504.  Please retry after sometime. If issue persists, Please raise at https://github.com/fabric8-analytics/cli-tools/issues."
Usage:
  crda analyse [flags]

Flags:
  -h, --help      help for analyse
  -j, --json      Set output format to JSON.
  -v, --verbose   Detailed Analyses Report.

Global Flags:
  -m, --client string   Client [tekton/jenkins/gh-actions] (default "terminal")
  -d, --debug           Sets Log level to Debug.
  -c, --no-color        Toggle colors in output.

message from server: 

https://github.com/tetchel/crda/runs/3735710806?check_suite_focus=true

@AkshayBhansali18
Copy link
Contributor

Addressed in #76

@divyansh42
Copy link
Member

I see this problem again in our recent workflow run: https://github.com/redhat-actions/crda/runs/4422690076?check_suite_focus=true#step:5:85

CRDA cli version: v0.2.5-2af417b linux/amd64 BuildDate: Tue, 12 Oct 2021 04:49:25 UTC Vendor: Red Hat

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

3 participants