Closed kmillerdevx3 closed 1 week ago
Hi @kmillerdevx3,
Can you try closing all instances of Visual Studio, delete the contents of this folder %UserProfile%\%LOCALAPPDATA%\aws\toolkits\language-servers\AmazonQ\2.0.0\
, restart VS and try again?
You mentioned you have been having issues since the release that added Amazon Q chat support. Have you been seeing issues since v1.54.x.x or only with the latest version 1.55.2.0? Was there a version of the toolkit that worked successfully for you?
I have no 2.0.0 folder inside the AmazonQ folder.
Yes, this issue has persisted since v1.54 - assuming that's when AmazonQ was added. I don't know the toolkit version numbers prior to that, and they don't appear in the release list here on GitHub; the versions with only CodeWhisperer worked (as of CodeWhisperer 1.0.0), it was just with the release of AmazonQ that it stopped working.
Hi @kmillerdevx3 , can you try going to these urls from a browser on the same system? This will help rule out that something like a firewall would prevent the successful downloading of these files:
You can delete the files after they are downloaded.
@awschristou As mentioned in the original post, I am able to download the files in a browser.
Hi @kmillerdevx3, Can you check if the following environment variables match the listed expected values from when you use Visual Studio from your standard user profile?
C:\Users\%username%\AppData\Local\Temp
C:\Users\%username%\AppData\Local\Temp
C:\Users\%username%
@shruti0085 I had the first two (TMP and TEMP) already set correctly. I did not have USERPROFILE, but adding it made no difference - same error.
Thanks for confirming. Can you try a couple more things:
"C:\Users\%username%\AppData\Local\AWSToolkit\lsp\manifest\Amazon Q\0\"
and try again?TMP
or TEMP
env variable might become full resulting in unexpected errors. Can you verify if the temp folder is not full C:\Users\%username%\AppData\Local\Temp
?@shruti0085 Cleared the \0\ and \Local\Temp folders, with no change.
Can you please share your latest toolkit log file after redacting any sensitive information? Out of curiousity, I am interested to know what version folders are listed for you in this location?
C:\Users\%username%\AppData\Local\aws\toolkits\language-servers\CodeWhisperer\
C:\Users\%username%\AppData\Local\aws\toolkits\language-servers\AmazonQ
: this will likely be empty
@shruti0085: Current log - I think I got any sensitive data.
I have no language-servers\CodeWhisperer\ folder any longer - when working through the issue where the AWS Toolkit didn't appear in the Visual Studio extensions list I uninstalled the toolkit and removed all artifacts.
The AmazonQ folder is empty. When the toolkit is trying to install the language server, I do see a 2.0.0 folder appear here, but it gets deleted right away - too fast for me to see if anything got placed there.
Unrelated (I think) - the full log includes an error related to the default profile. I haven't bothered to mention it previously because I also get this error in VSCode (in which Amazon Q works just fine) and we use SSO profiles - which the toolkit Getting Started screen reports as logged in - rather than the default profile so I've never really thought about it.
@shruti0085 Also, as mentioned in my previous comment, the Toolkit keeps disappearing from the list of installed extensions (even though it is still installed) - I keep going through the steps in the linked ticket, it reappears in the list for some undefined amount of time, then disappears again. I just noticed that it's gone again.
@kmillerdevx3 we have released v1.56.0.0 of the Toolkit which adds logging to help us better understand and troubleshoot this issue. Can you please install that version and share your logs?
the Toolkit keeps disappearing from the list of installed extensions (even though it is still installed)
Have you already attempted the guidance listed in #452 and #451?
@shruti0085 Yes, as mentioned, I've gone through those steps every time it disappeared.
With 1.56.0.0, here is the updated section of the logs, possible sensitive data obfuscated:
2024-08-05 16:16:07,588 [15] INFO Amazon.AWSToolkit.ResourceFetchers.FileResourceFetcher - Loading resource: C:\Users[userprofile]\AppData\Local/AWSToolkit\lsp\manifest\Amazon Q\0\manifest.json 2024-08-05 16:16:07,848 [111] INFO Amazon.AwsToolkit.AmazonQ.Common.Lsp.Manifest.VersionManifestFetcher - Version manifest cache has the latest contents 2024-08-05 16:16:07,871 [111] INFO Amazon.AWSToolkit.ResourceFetchers.HttpResourceFetcher - Loading resource: https://aws-language-servers.us-east-1.amazonaws.com/a8dafbc7-b928-4ca5-82b4-c261f51dd39f/servers.zip 2024-08-05 16:16:07,874 [111] INFO Amazon.AWSToolkit.ResourceFetchers.HttpResourceFetcher - Loading resource: https://aws-language-servers.us-east-1.amazonaws.com/a8dafbc7-b928-4ca5-82b4-c261f51dd39f/clients.zip 2024-08-05 16:16:09,064 [61] ERROR Amazon.AwsToolkit.AmazonQ.Common.Lsp.Install.LspManager - Computed hash [hash1] does not match expected [hash2] for clients.zip 2024-08-05 16:16:09,066 [61] INFO Amazon.AWSToolkit.ResourceFetchers.CallbackResourceFetcher - No contents fetched for https://aws-language-servers.us-east-1.amazonaws.com/a8dafbc7-b928-4ca5-82b4-c261f51dd39f/clients.zip using ConditionalResourceFetcher. 2024-08-05 16:16:15,395 [61] ERROR Amazon.AwsToolkit.AmazonQ.Common.Lsp.Install.LspManager - Computed hash [hash3] does not match expected [hash4] for servers.zip 2024-08-05 16:16:15,399 [61] INFO Amazon.AWSToolkit.ResourceFetchers.CallbackResourceFetcher - No contents fetched for https://aws-language-servers.us-east-1.amazonaws.com/a8dafbc7-b928-4ca5-82b4-c261f51dd39f/servers.zip using ConditionalResourceFetcher.
Not sure what his Github handle is, but I was able to work with Aniket Braganza (AWS) to get the toolkit running locally using the Amazon Q settings block in Visual Studio. That obviously isn't the ideal long-term solution, but will work short-term until we can figure out the issue logged above. I think the current working theory is that it might be related to Bitlocker, or possibly some other security software running on our corporate laptops.
Thanks for verifying and for sharing your logs. Yes, we were able to work with Aniket(AWS) to provide a workaround for now. We are currently investigating this and are looking into the reasons for the discrepancy in the hash computation.
I never provided an update, but this was ultimately tracked down to a conflict with NetSkope, our ZTN provider. Our IT NetSec department deployed a fix that resolved the issue - something in NetSkope was causing the hashes not to match. (Not on that team so I don't know the details - sorry.)
After this update, the Q language server installs and works as expected without workarounds.
Thank you for providing an update and sharing the source of the issue. Glad after the fix, it is working as expected.
Describe the bug
With latest version(s) of AWS Toolkit, attempting to start Q/CodeWhisperer suggestions results in the error shown in title. The Amazon Web Services output window shows:
Relevant AWS Toolkit logs are included below.
This behavior started to exhibit with the release that added Amazon Q to the existing CodeWhisperer functionality.
To Reproduce
Expected behavior
Language server should be downloaded and initialized, and begin serving suggestions.
Toolkit Logs
Relevant section of AWSToolkit logs:
I am able to retrieve the specified clients.zip in a browser by pasting the above URL, so it appears to be an issue in the class mentioned in the stack trace.
Development System (please complete the following information):
Additional context
Possibly relevant: my user profile that I run Visual Studio under does not have admin rights to add/remove software or extensions. I have a separate admin profile that I can log into to perform these steps, but that profile does not have a license to run Visual Studio.
The path mentioned above, in the log excerpt, is for my standard user profile.