-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
'Unknown provider' error when Sign in to use Github Copilot Chat extension #22781
Comments
@RomanNikitenko
|
|
Potentially depends on microsoft/vscode#205592 |
Workaround for workspaces without fixes in pull requestIf you try to install the extensions in che-code from the main branch, the copilot chat extension will not work because it cannot get GitHub session due to specific call of the extension plugin API like here If If you apply this fixup, it will update your browser database and granted the access for Pull Request extension and for both Copilot extensions. How to test:
Just to check this workaround is working, try to repeat above steps but do not launch the script. (async function update() {
try {
const accountName = 'vitaliy-guliy';
console.log(`> updating rules for ${accountName}`);
const req = indexedDB.open('vscode-web-state-db-global');
await new Promise((r) => (req.onsuccess = r));
const transaction = req.result.transaction('ItemTable', "readwrite");
const store = transaction.objectStore('ItemTable');
const keys = store.getAllKeys();
await new Promise((r) => (keys.onsuccess = r));
let rules = [];
let usages = [];
if (keys.result.includes(`github-${accountName}`)) {
const value = store.get(`github-${accountName}`);
await new Promise((r) => (value.onsuccess = r));
rules = JSON.parse(value.result);
}
if (keys.result.includes(`github-${accountName}-usages`)) {
const value = store.get(`github-${accountName}-usages`);
await new Promise((r) => (value.onsuccess = r));
usages = JSON.parse(value.result);
}
const ensureRule = function (extensionId, name) {
if (rules.find(rule => rule.id === extensionId)) {
console.log(`> rule for ${extensionId} already exists`);
} else {
console.log(`> add rule for ${extensionId}`);
rules.push({
"id": extensionId,
"name": name,
"allowed": true
});
}
if (usages.find(usage => usage.extensionId === extensionId)) {
console.log(`> usage for ${extensionId} already exists`);
} else {
console.log(`> add usage for ${extensionId}`);
usages.push({
"extensionId": extensionId,
"extensionName": name,
"lastUsed": Date.now().toString()
});
}
};
ensureRule('github.copilot', 'GitHub Copilot');
ensureRule('github.copilot-chat', 'GitHub Copilot Chat');
const putRules = store.put(JSON.stringify(rules), `github-${accountName}`);
await new Promise((r) => (putRules.onsuccess = r));
const putUsages = store.put(JSON.stringify(usages), `github-${accountName}-usages`);
await new Promise((r) => (putUsages.onsuccess = r));
console.log('> done');
await new Promise((r) => setTimeout(r, 1000));
window.location.reload()
} catch (e) {
console.error(e, e.trace);
}
})(); Check the vscode version you are using and download corresponding extensions che-code@7.84.0 (main branch) / vscode@1.88.0 - dogfoodingche-code@7.82.1 / vscode@1.87.0 - staging with Dev Spaces 3.12 |
Describe the bug
I was able to install the extension (see my screenshot below in the
Additional context
section), but I got the following error whenSign in
to use Github Copilot Chat extension:Che version
7.80@latest
Steps to reproduce
Github Copilot Chat
VS Code extensionSign In
buttonExpected behavior
It's possible to Sign in and use
Github Copilot Chat
VS Code extensionAdditional context
I reproduced it on the dogfooding instance
The text was updated successfully, but these errors were encountered: