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

invalid response body "Server error" #111

Open
chrmod opened this issue Jan 19, 2021 · 5 comments
Open

invalid response body "Server error" #111

chrmod opened this issue Jan 19, 2021 · 5 comments

Comments

@chrmod
Copy link

chrmod commented Jan 19, 2021

Since two days we have started to experience problems with github-release.

This is sufficient to reproduce the problem: github-release info --user ghostery --repo user-agent-desktop

Output:

error: invalid response body: {
  "message": "Server Error"
}

This happens on both v0.10.0 and v0.9.0 regardless of auth user.

chrmod added a commit to ghostery/user-agent-desktop that referenced this issue Jan 19, 2021
chrmod added a commit to ghostery/user-agent-desktop that referenced this issue Jan 19, 2021
@kevinburke1
Copy link
Contributor

Here's the entire request/response loop. My guess is that you need to specify a github token now. I don't know that we can really control the fact that a 502 is being returned by Github.

GET /repos/ghostery/user-agent-desktop/releases?per_page=100 HTTP/1.1
Host: api.github.com
User-Agent: github-release/0.9.0 rest-client/2.2 (https://github.com/kevinburke/rest) go/devel +4fd9455882 Mon Dec 28 17:15:36 2020 +0000 (darwin/amd64)
Accept: application/json
Accept-Charset: utf-8
Accept-Encoding: gzip

HTTP/1.1 502 Bad Gateway
Content-Length: 32
Content-Type: application/json
Date: Tue, 19 Jan 2021 17:12:33 GMT
Etag: "6007102e-20"
Server: GitHub.com
Vary: Accept-Encoding, Accept, X-Requested-With
X-Github-Request-Id: DEC8:1E11:6288:75F9:6007130C
X-Ratelimit-Limit: 60
X-Ratelimit-Remaining: 54
X-Ratelimit-Reset: 1611079941
X-Ratelimit-Used: 6

{
  "message": "Server Error"
}

@kevinburke1
Copy link
Contributor

Pass --security-token to make the request with a token.

@chrmod
Copy link
Author

chrmod commented Jan 19, 2021

I'm using GITHUB_TOKEN env variable with the same effect. Also this is a public repository.

Does the command work fine if you pass the --security-token ?

PS. All was working fine since few days ago

@kevinburke1
Copy link
Contributor

The command works for me with GITHUB_TOKEN present in the environment, and the most recent github-release commit, or v0.10.0.

$ DEBUG_HTTP_TRAFFIC=true GITHUB_TOKEN=$(cat ~/cfg/personal-github-token) github-release info --user ghostery --repo user-agent-desktop | head -n 10
GET /repos/ghostery/user-agent-desktop/tags?per_page=100 HTTP/1.1
Host: api.github.com
User-Agent: github-release/0.9.0 rest-client/2.2 (https://github.com/kevinburke/rest) go/devel +4fd9455882 Mon Dec 28 17:15:36 2020 +0000 (darwin/amd64)
Accept: application/json
Accept-Charset: utf-8
Authorization: Basic <redacted>
Accept-Encoding: gzip

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset
Cache-Control: private, max-age=60, s-maxage=60
Content-Security-Policy: default-src 'none'
Content-Type: application/json; charset=utf-8
Date: Tue, 19 Jan 2021 18:14:26 GMT
Etag: W/"401f648e01d61998c271337fe69eed9d92cb9f3bdf1556c526531183955138cc"
Last-Modified: Tue, 19 Jan 2021 18:11:03 GMT
Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
Server: GitHub.com
Status: 200 OK
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
Vary: Accept, Authorization, Cookie, X-GitHub-OTP
Vary: Accept-Encoding, Accept, X-Requested-With
Vary: Accept-Encoding
X-Accepted-Oauth-Scopes:
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Github-Media-Type: github.v3
X-Github-Request-Id: E256:8A22:22603:2B702:60072182
X-Oauth-Scopes: admin:repo_hook, delete:packages, repo, user, workflow, write:packages
X-Ratelimit-Limit: 5000
X-Ratelimit-Remaining: 4997
X-Ratelimit-Reset: 1611083643
X-Ratelimit-Used: 3
X-Xss-Protection: 1; mode=block

Also works if I set --security-token.

$ DEBUG_HTTP_TRAFFIC=true github-release info --security-token $(cat ~/cfg/personal-github-token) --user ghostery --repo user-agent-desktop | head -n 10
GET /repos/ghostery/user-agent-desktop/tags?per_page=100 HTTP/1.1
Host: api.github.com
User-Agent: github-release/0.10.0 rest-client/2.5 (https://github.com/kevinburke/rest) go/devel +682a1d2176 Fri Jan 15 23:38:58 2021 +0000 (darwin/amd64)
Accept: application/json
Accept-Charset: utf-8
Authorization: Basic <redacted>
Accept-Encoding: gzip

HTTP/1.1 200 OK
Transfer-Encoding: chunked
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset
Cache-Control: private, max-age=60, s-maxage=60
Content-Security-Policy: default-src 'none'
Content-Type: application/json; charset=utf-8
Date: Tue, 19 Jan 2021 18:15:55 GMT
Etag: W/"401f648e01d61998c271337fe69eed9d92cb9f3bdf1556c526531183955138cc"
Last-Modified: Tue, 19 Jan 2021 18:11:03 GMT
Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
Server: GitHub.com
Status: 200 OK
Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
Vary: Accept, Authorization, Cookie, X-GitHub-OTP
Vary: Accept-Encoding, Accept, X-Requested-With
Vary: Accept-Encoding
X-Accepted-Oauth-Scopes:
X-Content-Type-Options: nosniff
X-Frame-Options: deny
X-Github-Media-Type: github.v3
X-Github-Request-Id: E263:1E0F:F3AC:13794:600721DB
X-Oauth-Scopes: admin:repo_hook, delete:packages, repo, user, workflow, write:packages
X-Ratelimit-Limit: 5000
X-Ratelimit-Remaining: 4995
X-Ratelimit-Reset: 1611083643
X-Ratelimit-Used: 5
X-Xss-Protection: 1; mode=block

@chrmod
Copy link
Author

chrmod commented Jan 19, 2021

It works for me now as well, with token and without. Earlier Today it was working in 1 of 10 times.

Somehow you was also able to experience "Server Error" problem.

Right now I'm no longer sure where the problem lies:

  • it may be on github side, but githubstatus.com did no report any related issues
  • it may be data it ghostery/user-agent-desktop repository, but why it would start working again?

BTW. The issue was first noticed when calling upload --tag, with the assumption that it was releases endpoint failing, it makes me wonder if it is even necessary to call it when --tag option is specified.

Sorry. Not sure how else I can help on this one. The issue was there, but I cannot reproduce it anymore.

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

2 participants