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

Extension views never finish loading, 'bad credentials' when setting current user #3022

Closed
joyceerhl opened this issue Oct 6, 2021 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Milestone

Comments

@joyceerhl
Copy link
Contributor

  • Extension version: v2021.10.7747
  • VSCode Version: 1.61.0-insider
  • OS: Windows 10

Steps to Reproduce:

  1. Install GHPRI Insider extension
  2. Open a PR
  3. 🐛 View never finishes loading. I see a 'Bad credentials' message in the dev log but am never prompted to reauth:
    image
@alexr00 alexr00 self-assigned this Oct 15, 2021
@alexr00 alexr00 added the bug Issue identified by VS Code Team member as probable bug label Oct 15, 2021
@alexr00 alexr00 added this to the October 2021 milestone Oct 15, 2021
@alexr00 alexr00 removed this from the October 2021 milestone Oct 28, 2021
@alexr00
Copy link
Member

alexr00 commented Oct 28, 2021

I'm not able to repro. If you're still seeing this please let me know!

@alexr00 alexr00 closed this as completed Oct 28, 2021
@alexr00 alexr00 added this to the April 2022 milestone Mar 31, 2022
@alexr00 alexr00 reopened this Mar 31, 2022
@alexr00
Copy link
Member

alexr00 commented Mar 31, 2022

I hit this and fixed it, but it's going to be tough to verify. Here's how, in case someone has some expired credentials lying around somewhere:

  1. First, we need to see if you have some bad credentials.
    a. Do not open VS Code!
    a. Have an old install of VS Code or VS Code insiders that you've used this extension with before but haven't opened in a while.
    a. Navigate to where your extensions are installed and make sure you're either on stable GHPRI or just delete the extension all together.
    a. Open your old install of VS Code or VS Code insiders.
    a. Install GHPRI stable.
    a. If you see an error notification about "Bad credentials" then it is possible for you to verify this issue. If not, thank you for trying!
  2. Switch to the pre-release version of this extension and reload.
  3. Verify that you get prompted to sign in.
  4. Verify that PRs load in the PRs view and that you don't get a "Bad credentials" message.

@connor4312 connor4312 added verified Verification succeeded and removed verified Verification succeeded labels Apr 28, 2022
@joyceerhl
Copy link
Contributor Author

@alexr00 it seems nobody can verify this (myself included 😅) Optimistically marking as verified since I reported the original issue and have not been able to repro it since.

@joyceerhl joyceerhl added the verified Verification succeeded label May 4, 2022
@qc00
Copy link

qc00 commented Nov 21, 2023

This is still happening to me, but even after I removed the saved GitHub credentials from the Windows credential store.

mainThreadExtensionService.ts:82 HttpError: Bad credentials
	at c:\Users\XX\.vscode\extensions\github.vscode-pull-request-github-0.76.1\dist\extension.js:1903:6173
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async Sf.execute (c:\Users\XX\.vscode\extensions\github.vscode-pull-request-github-0.76.1\dist\extension.js:1871:46996)

Judging by the logs, I think it's confusing our internal Git remote (actually accessed via SSH, not HTTP) as GitHub?

This is despite the githubPullRequests.remotes setting only containing the names of the GitHub remotes (upstream and fork) and not our internal one.

2023-11-21 11:16:02.934 [info] Activation> Extension version: 0.76.1
2023-11-21 11:16:04.193 [info] Looking for git repository
2023-11-21 11:16:04.194 [info] Found 0 repositories during activation
2023-11-21 11:16:04.195 [info] Git repository found, initializing review manager and pr tree view.
2023-11-21 11:16:04.206 [info] Registering git provider
2023-11-21 11:16:07.098 [warning] GitHubServer> No response from host https://internal.linux.box/arcticdb/: request to https://internal.linux.box/api/v3/rate_limit failed, reason: connect ECONNREFUSED 10.222.14.232:443
2023-11-21 11:16:07.102 [warning] GitHubServer> No response from host https://internal.linux.box/arcticdb/: request to https://internal.linux.box/api/v3/rate_limit failed, reason: connect ECONNREFUSED 10.222.14.232:443
2023-11-21 11:16:07.117 [warning] GitHubServer> No response from host https://internal.linux.box/arcticdb/: request to https://internal.linux.box/api/v3/rate_limit failed, reason: connect ECONNREFUSED 10.222.14.232:443
2023-11-21 11:16:07.119 [warning] GitHubServer> No response from host https://internal.linux.box/arcticdb/: request to https://internal.linux.box/api/v3/rate_limit failed, reason: connect ECONNREFUSED 10.222.14.232:443
2023-11-21 11:16:07.621 [info] Repo state for file:///c%3A/git/ArcticDB changed.
2023-11-21 11:16:07.622 [info] Repo file:///c%3A/git/ArcticDB has already been setup.
2023-11-21 11:16:14.181 [info] Git initialization state changed: state=initialized
2023-11-21 11:16:14.181 [info] Review> Validate state in progress
2023-11-21 11:16:14.182 [info] Review> Validating state...
2023-11-21 11:16:14.377 [info] Found GitHub remote for folder c:\git\ArcticDB
2023-11-21 11:16:14.647 [warning] Unable to resolve remote: HttpError: Bad credentials
2023-11-21 11:16:15.026 [info] Missing upstream check failed: HttpError: Bad credentials
2023-11-21 11:16:15.038 [info] Trying to use globalState for assignableUsers.
2023-11-21 11:16:15.436 [info] Using globalState assignableUsers for 1.
2023-11-21 11:16:18.921 [info] Review> No matching pull request metadata found locally for current branch 1014-storage-fixtures
2023-11-21 11:16:22.380 [info] Review> Failed to get upstream for branch 1014-storage-fixtures from git config.
2023-11-21 11:16:22.382 [info] Review> No matching pull request metadata found on GitHub for current branch 1014-storage-fixtures
2023-11-21 11:16:44.619 [warning] GitHubRepository> Fetching default branch failed: HttpError: Bad credentials
2023-11-21 11:16:49.718 [error] GitHubRepository> Unable to fetch PR: Error: Network error: Response not successful: Received status code 401
2023-11-21 11:18:22.499 [info] Found GitHub remote for folder c:\git\ArcticDB
2023-11-21 11:18:22.858 [warning] Unable to resolve remote: HttpError: Bad credentials
2023-11-21 11:18:22.860 [warning] Unable to resolve remote: HttpError: Bad credentials
2023-11-21 11:18:23.102 [info] Missing upstream check failed: HttpError: Bad credentials
2023-11-21 11:18:23.104 [info] Trying to use globalState for assignableUsers.
2023-11-21 11:18:23.124 [info] No globalState for assignableUsers.

@stevekrouse
Copy link

@alexr00 I have this issue, and continue to have this issue on the pre-release version

@stevekrouse
Copy link

Is there a command I can use to force it to trigger a re-authentication?

@alexr00
Copy link
Member

alexr00 commented Dec 18, 2023

No command, but you can use the Account menu to sign out (then reload the window to make sure all extensions have properly given up your auth token) and then sign back in again.

@stevekrouse
Copy link

Very helpful, thanks @alexr00!

For posterity, that menu is here:

Screenshot 2023-12-18 at 09 01 43@2x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants