Comments (4)
As stated in the issue description this only reproduces when connected to a GitHub CodeSpace in a browser. I'm able to consistently reproduce this error.
In my investigation, I found that the type of token returned to the extension by the built-in VS Code GitHub authentication provider is different on browser CodeSpaces than it is everywhere else.
In a browser connected to a CodeSpace we receive "GitHub App user-to-server tokens" (prefixed with ghu_
). In all other places I tested, we receive "OAuth access tokens" (prefixed by gho_
) 1. The user-to-server tokens are created by GitHub Apps, whereas OAuth tokens are created by OAuth apps 2.
ghu
tokens have their own set of scopes different from gho
tokens. I discovered that ghu
tokens require the actions
scope for workflow related REST API endpoints 3. Adding the actions
scope to our requested scopes does fix the issue, but what happens is this makes the GitHub authentication provider return a gho
token. So an easy fix is to just request an additional scope outside of the default ghu
token so that we get a gho
token.
Footnotes
-
GitHub authentication token formats: https://github.blog/2021-04-05-behind-githubs-new-authentication-token-formats/ ↩
-
Differences between GitHub Apps and OAuth apps https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/differences-between-github-apps-and-oauth-apps ↩
-
https://docs.github.com/en/rest/actions/workflow-jobs?apiVersion=2022-11-28#about-workflow-jobs-in-github-actions ↩
from vscode-azurestaticwebapps.
I'm having the same issue. Any progress with this?
from vscode-azurestaticwebapps.
I'm having the same issue. Any progress with this?
So apparently this error happened on my browser. So when I moved the codespace to Vs Code desktop it worked fine.
from vscode-azurestaticwebapps.
Upstream issue: microsoft/vscode#185915
from vscode-azurestaticwebapps.
Related Issues (20)
- Zanega Browser HOT 4
- [Bug] Azure Static Web Apps Extension, bad credentials error message HOT 2
- Issue with Creating Static Web App - Error: "[Provider "/subscriptions/<mySubscriptionID>/providers/Microsoft.Resources" does not have resource type "resourceGroups"]" HOT 3
- hhhhhh HOT 2
- Failed to very "AzureWebJobsStorage" error when debugging HOT 4
- Unable to debug Blazor app with function in WSL HOT 2
- Internal error: 'branchDataProvider.getResourceltem' threw exception Cannot read properties of null (reading 'contextValuesToAdd') HOT 18
- Reboot.txt HOT 1
- REMOVE.md HOT 1
- fix? HOT 2
- Itens HOT 2
- Error while hosting static web app HOT 2
- vscode stopped while running in debug mode HOT 2
- [Suggestion] It would be better to open the "Environment Variables" page after clicking "Open in Portal" for the "Application Settings" node
- Voice Recognition HOT 2
- Internal error: 'branchDataProvider.getResourceltem' threw exception Cannot read properties of null (reading 'contextValuesToAdd') HOT 3
- How do I create an app with no api? HOT 1
- hvv HOT 2
- Static Web App: Bad Credentials error HOT 2
- Blank Space
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-azurestaticwebapps.