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

HTTP Error: 502, "Bad gateway", "/graphql" #83

Closed
nicklan opened this issue Jan 8, 2019 · 17 comments
Closed

HTTP Error: 502, "Bad gateway", "/graphql" #83

nicklan opened this issue Jan 8, 2019 · 17 comments
Labels

Comments

@nicklan
Copy link

nicklan commented Jan 8, 2019

I'm still getting an error similar to #20 on a fairly large repo (running 20190107.1955). I can pull notifications, and that works okay, but trying to do F-y results in:

Pulling REPO...
error in process filter: ghub--signal-error: HTTP Error: 502, "Bad gateway", "/graphql", ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `CC2C:4FEA:A1771C1:CBF40CE:5C33F7E5` when reporting this issue."))))
error in process filter: HTTP Error: 502, "Bad gateway", "/graphql", ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `CC2C:4FEA:A1771C1:CBF40CE:5C33F7E5` when reporting this issue."))))

Unlike above however, even if I restart the magit buffer there are no pull requests or issues listed.
Let me know if there's more debug info that could help.

Thanks!

@vermiculus
Copy link
Contributor

Is that fairly large repo publicly accessible?

@nicklan
Copy link
Author

nicklan commented Jan 8, 2019

Unfortunately not. Hence the offer to provide more debug info if you can tell me what you need.

@zarybnicky
Copy link

I have the same issue on a public repo: https://github.com/NixOS/nixpkgs. The log message with toggle-debug-on-error isn't too informative though:

Debugger entered--Lisp error: (ghub-http-error 502 "Bad gateway" "/graphql" ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `2812:34B9:4F23D9:A34960:5C3A37CE` when reporting this issue.")))))
  signal(ghub-http-error (502 "Bad gateway" "/graphql" ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `2812:34B9:4F23D9:A34960:5C3A37CE` when reporting this issue."))))))
  ghub--signal-error((error http 502) ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `2812:34B9:4F23D9:A34960:5C3A37CE` when reporting this issue.")))) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x303c021>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x303c041>) :errorback nil :value nil :extra nil :query (query (repository [(owner $owner String!) (name $name String!)] name id createdAt updatedAt nameWithOwner (parent nameWithOwner) description homepageUrl (defaultBranchRef name) isArchived isFork isLocked isMirror isPrivate hasIssuesEnabled hasWikiEnabled (licenseInfo name) (stargazers totalCount) (watchers totalCount) (assignableUsers [(:edges t)] id login name) (issues [(:edges t) (:singular issue number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt locked (milestone id) body (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)) (labels [(:edges t) (:singular label id)] id name color description) (pullRequests [(:edges t) (:singular pullRequest number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt mergedAt locked maintainerCanModify isCrossRepository (milestone id) body (baseRef name (repository nameWithOwner)) (headRef name (repository (owner login) nameWithOwner)) (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)))) :variables ((owner . "NixOS") (name . "nixpkgs")) :until ((issues-until) (pullRequests-until)) :buffer #<buffer magit: nixpkgs> :pages 1))
  ghub--handle-response-error((:error (error http 502) :peer (:certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f:a4:a7:3a:7b:76" :issuer "C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 High Assurance Server CA" :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francisco,O=GitHub\\, Inc.,CN=*.github.com" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:c2:f2:92:89:4f:6e:8b:56:22:15:e6" :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:d2:b0:8a:50:38:04:e8:37:9f:bc:76") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `2812:34B9:4F23D9:A34960:5C3A37CE` when reporting this issue.")))) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x303c021>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x303c041>) :errorback nil :value nil :extra nil :query (query (repository [(owner $owner String!) (name $name String!)] name id createdAt updatedAt nameWithOwner (parent nameWithOwner) description homepageUrl (defaultBranchRef name) isArchived isFork isLocked isMirror isPrivate hasIssuesEnabled hasWikiEnabled (licenseInfo name) (stargazers totalCount) (watchers totalCount) (assignableUsers [(:edges t)] id login name) (issues [(:edges t) (:singular issue number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt locked (milestone id) body (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)) (labels [(:edges t) (:singular label id)] id name color description) (pullRequests [(:edges t) (:singular pullRequest number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt mergedAt locked maintainerCanModify isCrossRepository (milestone id) body (baseRef name (repository nameWithOwner)) (headRef name (repository (owner login) nameWithOwner)) (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)))) :variables ((owner . "NixOS") (name . "nixpkgs")) :until ((issues-until) (pullRequests-until)) :buffer #<buffer magit: nixpkgs> :pages 1))
  ghub--graphql-handle-response((:error (error http 502) :peer (:certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f:a4:a7:3a:7b:76" :issuer "C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 High Assurance Server CA" :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francisco,O=GitHub\\, Inc.,CN=*.github.com" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:c2:f2:92:89:4f:6e:8b:56:22:15:e6" :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:d2:b0:8a:50:38:04:e8:37:9f:bc:76") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x303c021>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x303c041>) :errorback nil :value nil :extra nil :query (query (repository [(owner $owner String!) (name $name String!)] name id createdAt updatedAt nameWithOwner (parent nameWithOwner) description homepageUrl (defaultBranchRef name) isArchived isFork isLocked isMirror isPrivate hasIssuesEnabled hasWikiEnabled (licenseInfo name) (stargazers totalCount) (watchers totalCount) (assignableUsers [(:edges t)] id login name) (issues [(:edges t) (:singular issue number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt locked (milestone id) body (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)) (labels [(:edges t) (:singular label id)] id name color description) (pullRequests [(:edges t) (:singular pullRequest number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt mergedAt locked maintainerCanModify isCrossRepository (milestone id) body (baseRef name (repository nameWithOwner)) (headRef name (repository (owner login) nameWithOwner)) (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)))) :variables ((owner . "NixOS") (name . "nixpkgs")) :until ((issues-until) (pullRequests-until)) :buffer #<buffer magit: nixpkgs> :pages 1))
  apply(ghub--graphql-handle-response ((:error (error http 502) :peer (:certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f:a4:a7:3a:7b:76" :issuer "C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 High Assurance Server CA" :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francisco,O=GitHub\\, Inc.,CN=*.github.com" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:c2:f2:92:89:4f:6e:8b:56:22:15:e6" :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:d2:b0:8a:50:38:04:e8:37:9f:bc:76") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x303c021>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x303c041>) :errorback nil :value nil :extra nil :query (query (repository [(owner $owner String!) (name $name String!)] name id createdAt updatedAt nameWithOwner (parent nameWithOwner) description homepageUrl (defaultBranchRef name) isArchived isFork isLocked isMirror isPrivate hasIssuesEnabled hasWikiEnabled (licenseInfo name) (stargazers totalCount) (watchers totalCount) (assignableUsers [(:edges t)] id login name) (issues [(:edges t) (:singular issue number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt locked (milestone id) body (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)) (labels [(:edges t) (:singular label id)] id name color description) (pullRequests [(:edges t) (:singular pullRequest number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt mergedAt locked maintainerCanModify isCrossRepository (milestone id) body (baseRef name (repository nameWithOwner)) (headRef name (repository (owner login) nameWithOwner)) (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)))) :variables ((owner . "NixOS") (name . "nixpkgs")) :until ((issues-until) (pullRequests-until)) :buffer #<buffer magit: nixpkgs> :pages 1)))
  url-http-activate-callback()
  url-http-chunked-encoding-after-change-function(193 476 283)
  url-http-wait-for-headers-change-function(1 483 482)
  url-http-generic-filter(#<process api.github.com> "HTTP/1.1 502 Bad Gateway\015\nServer: GitHub.com\015\nDate: Sat, 12 Jan 2019 18:54:16 GMT\015\nContent-Type: application/json\015\nTransfer-Encoding: chunked\015\nX-GitHub-Request-Id: 2812:34B9:4F23D9:A34960:5C3A37CE\015\n\015\n10e\015\n{\n   \"data\":\"null\",\n   \"errors\":[\n      {\n         \"message\":\"Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `2812:34B9:4F23D9:A34960:5C3A37CE` when reporting this issue.\"\n      }\n   ]\n}\n\015\n0\015\n\015\n")

@zarybnicky
Copy link

zarybnicky commented Jan 13, 2019

And after reading the other open issues related to this problem and trying to fetch notifications, I get a different error:

error in process filter: ghub--signal-error: peculiar error: ((message . "Field 'nil' doesn't exist on type 'Query'") (path "query" "_Z2l0aHViLmNvbTowMTA6UmVwb3NpdG9yeTYyOTY3ODc3OjE5NzI3NDcwNA__") (extensions (code . "undefinedField") (typeName . "Query") (fieldName . "nil")) (locations ((line . 2) (column . 1))))

The traceback is very large and includes my GitHub notifications all of the repos I follow but here it is anyway, somehow weirdly formatted though... https://clbin.com/bPu84

That's from when I had about 50 notifications waiting for me, a mix of issues and pull-requests. When I acknowledged them and tried again with 0 notifications, it went OK, at least something...

Edit: The last note is wrong - even with 0 pending notifications, it still throws an error. It seemed to work to me because it took a very long time for the debugger to open...

@tarsius tarsius changed the title Still getting HTTP Error: 502, "Bad gateway", "/graphql" HTTP Error: 502, "Bad gateway", "/graphql" Jan 18, 2019
@tarsius tarsius transferred this issue from magit/forge Jan 18, 2019
@zarybnicky
Copy link

I tried out the same with the newly added "only pull topics since date", but the error is the same even when pulling topics since today. That's assuming I'm doing it correctly, writing '2019-01-21' at the prompt for "since".

Debugger entered--Lisp error: (ghub-http-error 502 "Bad gateway" "/graphql" ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `BD08:0667:1E6E491:408B28D:5C45D699` when reporting this issue.")))))
  signal(ghub-http-error (502 "Bad gateway" "/graphql" ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `BD08:0667:1E6E491:408B28D:5C45D699` when reporting this issue."))))))
  ghub--signal-error((error http 502) ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `BD08:0667:1E6E491:408B28D:5C45D699` when reporting this issue.")))) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x33f3f4d>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4338581>) :errorback nil :value nil :extra nil :query (query (repository [(owner $owner String!) (name $name String!)] name id createdAt updatedAt nameWithOwner (parent nameWithOwner) description homepageUrl (defaultBranchRef name) isArchived isFork isLocked isMirror isPrivate hasIssuesEnabled hasWikiEnabled (licenseInfo name) (stargazers totalCount) (watchers totalCount) (assignableUsers [(:edges t)] id login name) (issues [(:edges t) (:singular issue number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt locked (milestone id) body (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)) (labels [(:edges t) (:singular label id)] id name color description) (pullRequests [(:edges t) (:singular pullRequest number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt mergedAt locked maintainerCanModify isCrossRepository (milestone id) body (baseRef name (repository nameWithOwner)) (headRef name (repository (owner login) nameWithOwner)) (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)))) :variables ((owner . "NixOS") (name . "nixpkgs")) :until ((issues-until . "2019-01-21") (pullRequests-until . "2019-01-21")) :buffer #<buffer magit: nixpkgs> :pages 1))
  ghub--handle-response-error((:error (error http 502) :peer (:certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f:a4:a7:3a:7b:76" :issuer "C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 High Assurance Server CA" :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francisco,O=GitHub\\, Inc.,CN=*.github.com" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:c2:f2:92:89:4f:6e:8b:56:22:15:e6" :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:d2:b0:8a:50:38:04:e8:37:9f:bc:76") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) ((data . "null") (errors ((message . "Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `BD08:0667:1E6E491:408B28D:5C45D699` when reporting this issue.")))) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x33f3f4d>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4338581>) :errorback nil :value nil :extra nil :query (query (repository [(owner $owner String!) (name $name String!)] name id createdAt updatedAt nameWithOwner (parent nameWithOwner) description homepageUrl (defaultBranchRef name) isArchived isFork isLocked isMirror isPrivate hasIssuesEnabled hasWikiEnabled (licenseInfo name) (stargazers totalCount) (watchers totalCount) (assignableUsers [(:edges t)] id login name) (issues [(:edges t) (:singular issue number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt locked (milestone id) body (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)) (labels [(:edges t) (:singular label id)] id name color description) (pullRequests [(:edges t) (:singular pullRequest number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt mergedAt locked maintainerCanModify isCrossRepository (milestone id) body (baseRef name (repository nameWithOwner)) (headRef name (repository (owner login) nameWithOwner)) (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)))) :variables ((owner . "NixOS") (name . "nixpkgs")) :until ((issues-until . "2019-01-21") (pullRequests-until . "2019-01-21")) :buffer #<buffer magit: nixpkgs> :pages 1))
  ghub--graphql-handle-response((:error (error http 502) :peer (:certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f:a4:a7:3a:7b:76" :issuer "C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 High Assurance Server CA" :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francisco,O=GitHub\\, Inc.,CN=*.github.com" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:c2:f2:92:89:4f:6e:8b:56:22:15:e6" :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:d2:b0:8a:50:38:04:e8:37:9f:bc:76") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x33f3f4d>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4338581>) :errorback nil :value nil :extra nil :query (query (repository [(owner $owner String!) (name $name String!)] name id createdAt updatedAt nameWithOwner (parent nameWithOwner) description homepageUrl (defaultBranchRef name) isArchived isFork isLocked isMirror isPrivate hasIssuesEnabled hasWikiEnabled (licenseInfo name) (stargazers totalCount) (watchers totalCount) (assignableUsers [(:edges t)] id login name) (issues [(:edges t) (:singular issue number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt locked (milestone id) body (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)) (labels [(:edges t) (:singular label id)] id name color description) (pullRequests [(:edges t) (:singular pullRequest number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt mergedAt locked maintainerCanModify isCrossRepository (milestone id) body (baseRef name (repository nameWithOwner)) (headRef name (repository (owner login) nameWithOwner)) (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)))) :variables ((owner . "NixOS") (name . "nixpkgs")) :until ((issues-until . "2019-01-21") (pullRequests-until . "2019-01-21")) :buffer #<buffer magit: nixpkgs> :pages 1))
  apply(ghub--graphql-handle-response ((:error (error http 502) :peer (:certificate (:version 3 :serial-number "04:30:d9:79:1f:fc:b5:20:ac:33:9f:a4:a7:3a:7b:76" :issuer "C=US,O=DigiCert Inc,OU=www.digicert.com,CN=DigiCert SHA2 High Assurance Server CA" :valid-from "2018-06-19" :valid-to "2019-07-10" :subject "C=US,ST=California,L=San Francisco,O=GitHub\\, Inc.,CN=*.github.com" :public-key-algorithm "RSA" :certificate-security-level "Medium" :signature-algorithm "RSA-SHA256" :public-key-id "sha1:4e:0a:00:36:1e:9d:51:52:3b:c2:f2:92:89:4f:6e:8b:56:22:15:e6" :certificate-id "sha1:5f:f1:60:31:09:04:3e:f2:90:d2:b0:8a:50:38:04:e8:37:9f:bc:76") :key-exchange "ECDHE-RSA" :protocol "TLS1.2" :cipher "AES-128-GCM" :mac "AEAD")) #s(ghub--graphql-req :url #s(url :type "https" :user nil :password nil :host "api.github.com" :portspec nil :filename "/graphql" :target nil :attributes nil :fullness t :silent nil :use-cookies t :asynchronous t) :forge nil :silent nil :method "POST" :headers #f(compiled-function () #<bytecode 0x33f3f4d>) :handler ghub--graphql-handle-response :unpaginate nil :noerror nil :reader nil :callback #f(compiled-function (data) #<bytecode 0x4338581>) :errorback nil :value nil :extra nil :query (query (repository [(owner $owner String!) (name $name String!)] name id createdAt updatedAt nameWithOwner (parent nameWithOwner) description homepageUrl (defaultBranchRef name) isArchived isFork isLocked isMirror isPrivate hasIssuesEnabled hasWikiEnabled (licenseInfo name) (stargazers totalCount) (watchers totalCount) (assignableUsers [(:edges t)] id login name) (issues [(:edges t) (:singular issue number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt locked (milestone id) body (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)) (labels [(:edges t) (:singular label id)] id name color description) (pullRequests [(:edges t) (:singular pullRequest number) (orderBy ((field . UPDATED_AT) (direction . DESC)))] number state (author login) title createdAt updatedAt closedAt mergedAt locked maintainerCanModify isCrossRepository (milestone id) body (baseRef name (repository nameWithOwner)) (headRef name (repository (owner login) nameWithOwner)) (assignees [(:edges t)] id) (comments [(:edges t)] databaseId (author login) createdAt updatedAt body) (labels [(:edges t)] id)))) :variables ((owner . "NixOS") (name . "nixpkgs")) :until ((issues-until . "2019-01-21") (pullRequests-until . "2019-01-21")) :buffer #<buffer magit: nixpkgs> :pages 1)))
  url-http-activate-callback()
  url-http-chunked-encoding-after-change-function(195 480 285)
  url-http-wait-for-headers-change-function(1 487 486)
  url-http-generic-filter(#<process api.github.com> "HTTP/1.1 502 Bad Gateway\015\nServer: GitHub.com\015\nDate: Mon, 21 Jan 2019 14:26:44 GMT\015\nContent-Type: application/json\015\nTransfer-Encoding: chunked\015\nX-GitHub-Request-Id: BD08:0667:1E6E491:408B28D:5C45D699\015\n\015\n110\015\n{\n   \"data\":\"null\",\n   \"errors\":[\n      {\n         \"message\":\"Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug. Please include `BD08:0667:1E6E491:408B28D:5C45D699` when reporting this issue.\"\n      }\n   ]\n}\n\015\n0\015\n\015\n")

@tarsius
Copy link
Member

tarsius commented Jan 21, 2019

My best idea on how to deal with this is to just automatically to try again a few times.

The problem is on the Github's side.

This is what the error means.

502 Bad Gateway
The server was acting as a gateway or proxy and received an invalid response from the upstream server.

Github provides some additional information in the response:

Something went wrong while executing your query. This may be the result of a timeout, or it could be a GitHub bug.

My guess is that it is a timeout due to temporary overload. I have seen this error myself before, but when I did then simply trying again always worked.

And then:

Please include BD08:0667:1E6E491:408B28D:5C45D699 when reporting this issue.

Could you please collect a few such error ids and then send an email to Github asking them what has gone wrong for them.

But I fear that will not lead anywhere. Expected response "we give requests n time units to succeed and if it takes longer then we send a 502".

There actually was one situation where we could reproduce this issue more consistently: fetching the topics associated with the notifications that were fetched earlier. We solved that by fetching at most 100 topics at a time.

So if you run into this problem, then determine whether it happens when fetching notifications or when fetching other things. If it is the former then fetching fewer topics-for-notifications at a time might help.

@matthew-piziak
Copy link

Can reproduce on nixpkgs. Shame that GitHub is apparently just getting outscaled here. The repository has ~3200 issues at the moment.

@seanfarley
Copy link

I can also get this consistently on the xonsh repo. Fetching notifications works but forge-pull always fails. Is there a workaround?

@tarsius
Copy link
Member

tarsius commented Oct 4, 2019

Is there a workaround?

The workaround seems to be: try again ten seconds later. For our purpose this isn't actually a large repository. It's smaller than the magit repository for example, which never caused my any troubles.

But I wasn't able to fetch the data for this repository on the first try either. It failed pretty early on and my guess is that it took to long to wake something up, resulting in an internal timeout on within github. On the second try that thing was already awake.

@seanfarley
Copy link

I see; thanks very much for the explanation! Upon trying that repo again, you were right, it did work.

@matthuszagh
Copy link

Just to add to the conversation I'm also experiencing this with Nixpkgs.

@tarsius tarsius added the faq label Dec 11, 2019
@tarsius
Copy link
Member

tarsius commented Dec 11, 2019

This doesn't happen very often and when it does, then it isn't our fault. While we could investigate whether it might possibly be an good idea to simply retry when this error occurs I don't think it would be worth the effort.

@tarsius tarsius closed this as completed Dec 11, 2019
@matthuszagh
Copy link

Naive question, but is there any way to perform forge-pull incrementally for large repos? Every time I try with Nixpkgs it fails at a different point but seems to start over from scratch. I've had no issues with smaller repos, but I've tried a bunch of times with Nixpkgs and it seems unlikely it'll be able to make it through the whole thing within one attempt.

@tarsius
Copy link
Member

tarsius commented Dec 11, 2019

That's huuuuuuge. No, an "incremental initial pull" is not supported. If you were to succeed downloading everything, then you would just have another issue: forge would be way to slow in every day use.

Of course theoretically it would be possible to address all that, but I am not enough people, so forge will likely never be improved to support such humongous repositories. Sorry.

@matthuszagh
Copy link

matthuszagh commented Dec 11, 2019

No worries. Thanks for the response anyway and thanks for all the work you've already done on this!

@yashi
Copy link

yashi commented Oct 4, 2021

This happened to me with https://github.com/zephyrproject-rtos/zephyr. And I did retried 10 times and voila it finally worked!

@mkleehammer
Copy link

In case it is helpful to someone, I got this error when fetching all topics. I had set up Forge a few months in the past but didn't really use it so I was picking it up again.

When I tried to fetch one topic, it told me it couldn't until I added the repo. I did so and as part of that it fetched all items without any problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants