Closed john-aws closed 1 year ago
Note: I have also tried the following available options but none are helpful:
When using 'Add New Connection', I select 'Use a personal email ... AWS Builder ID' which prompts me that I am 'Currently signed in with AWS Builder ID. Sign out to add another?' When I click that option to sign out, it fails with the following logs:
2023-05-04 10:47:03 [WARN]: auth: failed to logout of connection "https://view.awsapps.com/start?scopes=codecatalyst:read_write,codewhisperer:analysis,codewhisperer:completions": Error: Failed to read from "/Users/me/.aws/sso/cache/af009b1f7ddb9ae5f8834321607bbc785f21ffcb.json" [FSReadFailed] (key: https://view.awsapps.com/start?scopes=codecatalyst:read_write,codewhisperer:analysis,codewhisperer:completions)
-> EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, open '/Users/me/.aws/sso/cache/af009b1f7ddb9ae5f8834321607bbc785f21ffcb.json' [Unknown]
2023-05-04 10:47:03 [ERROR]: aws.auth.addConnection: Error: Failed to delete "/Users/me/.aws/sso/cache/af009b1f7ddb9ae5f8834321607bbc785f21ffcb.json" [FSDeleteFailed] (key: https://view.awsapps.com/start?scopes=codecatalyst:read_write,codewhisperer:analysis,codewhisperer:completions)
-> EntryNotFound (FileSystemError): Error: ENOENT: no such file or directory, unlink '/Users/me/.aws/sso/cache/af009b1f7ddb9ae5f8834321607bbc785f21ffcb.json' [Unknown]
Experiencing same issue
Downgrading the version to 1.70.0 fixes the issue
@divineniiquaye are you also using vscode "insiders" ? @john-aws can you try the stable release of vscode?
I'm using the insider today's release
@justinmk3 stable VS Code release does not appear to have the same issue (so far anyway).
May be related to this vscode change: https://github.com/microsoft/vscode/pull/181107
Possibly fixed by https://github.com/microsoft/vscode/pull/181526
Confirmed that problem is no longer reproducible after VS Code Insiders update to:
Version: 1.79.0-insider Commit: 2c73d2651cc525b27fc697b820743098a204ec01
Problem
AWS Toolkit seems to be unable to resurrect expired connections for CodeWhisperer. Previously this worked fine - I used an AWS Builder ID specifically for CodeWhisperer authentication and I used local
~/.aws/credentials
profiles for other AWS Toolkit features. Now I am unable to use CodeWhisperer.I see the following logs:
What's interesting here is that the
/Users/me/.aws/sso/cache/
folder is actually empty, but I did not explicitly empty it. So, why does the AWS Toolkit extension fail completely in this scenario with no apparent attempt to treat it like a greenfield installation and simply initiate the authentication process?I have uninstalled the AWS Toolkit VS Code extension, reloaded VS Code, and reinstalled the extension to no avail. Even after re-installation, the same 'Unable to authenticate connection' symptoms occur and new logs (with a current timestamp) indicate the same "Failed to read from ..." cause. The fact that a re-installed AWS Toolkit extension seems to be attempting to re-use configuration information from a prior installation also seems problematic to me. I would expect it to start afresh.
Expected behavior
AWS Toolkit CodeWhisperer feature would recognize that my AWS Builder ID credentials had expired, prompt me to re-authenticate, and then work as expected.
System details (run the
AWS: About Toolkit
command)