question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[GHES] GitHubTokenExchangeError: Internal Server Error

See original GitHub issue

Type: Bug

Logging in to a self-hosted GitHub Enterprise server from the GitHub sidebar results in “Having trouble logging in? Would you like to try a different way?” and finally “Error signing in to GitHub Enterprise”.

Logs

2022-12-09 14:31:11.399 [info] Reading sessions from keychain...
2022-12-09 14:31:11.406 [info] Getting sessions for read:user,repo,user:email,workflow...
2022-12-09 14:31:11.406 [info] Got 0 sessions for read:user,repo,user:email,workflow...
2022-12-09 14:31:11.437 [info] Getting sessions for read:user,repo,user:email...
2022-12-09 14:31:11.437 [info] Got 0 sessions for read:user,repo,user:email...
2022-12-09 14:31:11.454 [info] Getting sessions for read:user,repo,user:email,workflow...
2022-12-09 14:31:11.454 [info] Got 0 sessions for read:user,repo,user:email,workflow...
2022-12-09 14:31:17.161 [info] Logging in for the following scopes: read:user repo user:email workflow
2022-12-09 14:31:17.170 [info] Trying without local server... (read:user repo user:email workflow)
2022-12-09 14:31:27.736 [info] Exchanging code for token...
2022-12-09 14:31:28.467 [error] GitHubTokenExchangeError: Internal Server Error
	at t.GitHubServer.u (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js:2:1309015)
	at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js:2:1304423
2022-12-09 14:31:36.464 [info] Trying with local server... (read:user repo user:email workflow)
2022-12-09 14:31:38.721 [info] Exchanging code for token...
2022-12-09 14:31:39.081 [error] GitHubTokenExchangeError: Internal Server Error
	at t.GitHubServer.u (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js:2:1309015)
	at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async /Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js:2:1305597
2022-12-09 14:31:46.451 [info] Trying device code flow... (read:user repo user:email workflow)
2022-12-09 14:31:47.176 [error] Error: Failed to get one-time code: Cookies must be enabled to use GitHub.
	at t.GitHubServer.p (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js:2:1305870)
	at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async t.GitHubServer.login (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js:2:1303463)
	at async t.GitHubAuthenticationProvider.createSession (/Applications/Visual Studio Code.app/Contents/Resources/app/extensions/github-authentication/dist/extension.js:2:1299643)

Extension version: 0.57.2022120809 VS Code version: Code 1.74.0 (Universal) (5235c6bb189b60b01b1f49062f4ffa42384f8c91, 2022-12-05T16:43:37.5

Issue Analytics

  • State:open
  • Created 9 months ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
TylerLeonhardtcommented, Dec 30, 2022

@SuibianP it’s a holiday pause 😃 they’ll resume next week.

0reactions
SuibianPcommented, Dec 30, 2022

Thanks a ton for the efforts @TylerLeonhardt!

Back to the device flow issue, I consulted the docs and found that it was added in GHES 3.1 which antedates mine. While all GHES versions in support as of now supports it, it is still explicitly marked as subject to change in the docs, and when the API should change in the future there might be yet another bunch of such issues with confusing error messages. Could there be some kind of guard check implemented to ensure version compatibility before enabling a feature?

By the way, I tried to get Insiders build but the latest version seems to be last week on 6ed4d436a9b6ae131732f4e2a723868231f4473a rather than nightly as described in the docs. Off-topic here but just asking first in case it’s something silly of me 😹

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTTP 500 Internal Server Error: What It Means & How to Fix It
An HTTP 500 internal server error is a general error message. It covers unexpected issues that don't fit into existing error codes. HTTP...
Read more >
500 Internal Server Error - HTTP - MDN Web Docs - Mozilla
This error response is a generic "catch-all" response. Usually, this indicates the server cannot find a better 5xx error code to response.
Read more >
What is a 500 Internal Server Error? - Allconnect.com
A 500 Internal Server Error is an umbrella term for several issues often involving the server of the website you're trying to reach....
Read more >
NestJS, 500 "Internal server error" in authentication
The problem was that I was using the newer versions of Typeorm (3.1), and the last version of NestJS (9.1.4) and I have...
Read more >
How to Fix a 500 Internal Server Error - Lifewire
Learn about the 500 Internal Server Error (aka HTTP 500 error), a generic error suggesting a problem with the website's server.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found