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

Error getting GitHub context fetch failed HttpError: fetch failed #282

Open
DavidJFowler opened this issue Dec 6, 2023 · 3 comments
Open
Labels
bug Something isn't working

Comments

@DavidJFowler
Copy link

Describe the bug
The GitHub Actions extension is reporting this error message:

Screenshot 2023-12-06 084828

In the Output window the following messages are shown:

Error getting GitHub context
fetch failed
HttpError: fetch failed
	at c:\Users\xxx\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1366802
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async c:\Users\xxx\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1447997
	at async Object.get (c:\Users\xxx\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1447724)
	at async Lt (c:\Users\xxx\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1447916)
	at async c:\Users\xxx\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1626346
	at async i.h (c:\Users\xxx\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:139661)

Cannot fetch github context
Error: Cannot fetch github context
	at vt (c:\Users\xxx\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1444927)
	at async c:\Users\xxx\.vscode\extensions\github.vscode-github-actions-0.26.2\dist\extension-node.js:2:1626446
	at async i.h (c:\Users\xxx\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:125:139661)

To Reproduce
Steps to reproduce the behavior:

  1. Open VSCode. See GitHub Actions Output
  2. Click refresh button on extension. Same error is logged

Expected behavior
No error message is shown

Screenshots
See above.

Extension Version
0.26.2

Additional context
I have seen issues #77 and #251.

I followed the instructions at #77 (comment) but the problem is still unresolved.

@DavidJFowler
Copy link
Author

I tried Developer: Reload Window again and the problem seems to have gone away for now.

@alexgshaw
Copy link

I'm running into this same issue. Developer: Reload Window unfortunately did not work for me.

@wegmans-alex-beck
Copy link

wegmans-alex-beck commented Apr 22, 2024

Some things to try:

  1. Remove any expired root certificates from your machine.
    • This fixed a GitHub Co-Pilot issue for me.
  2. Install the win-ca extension.
    • This fixed a GitHub Actions issue for me (almost**).
  3. Close all open files and then do Developer: Reload Window.
    • There might be a bug where an open GitHub Action yaml file causes the extension to prematurely activate before the GitHub account context is ready.
  4. Disable extension GitHub Actions. Then Restart Extensions. Then Enable extension GitHub Actions.

**Some of the steps above got me further, thought I am still experiencing issues with errors when hovering in the Action file.
Failure to retrieve username: Cs [HttpError]: fetch failed
Request textDocument/hover failed with message: fetch failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog 🗒
Development

No branches or pull requests

3 participants