Open upmyoung opened 8 months ago
Can you provide the Toolkit logs (check that private info is removed)?
AWS: View Toolkit Logs
command to get the logs.2023-12-19 13:05:19 [ERROR]: CodeWhisperer Invocation Exception : Cannot redefine property: default
...
2023-12-19 13:05:19 [ERROR]: Error TypeError: Tn?.includes is not a function in getPaginatedRecommendation
That looks like a bug and will help lead to a fix, thank you!
Please do not hesitate to ask if you need any more info from me!
@upmyoung could you try the prerelease? https://github.com/aws/aws-toolkit-vscode/releases/tag/prerelease
OK I have tried the prerelease: OS: Windows_NT x64 10.0.22631 Visual Studio Code extension host: 1.85.1 AWS Toolkit: 2.5.0-7c4e848 node: 18.15.0 electron: 25.9.7
and the behavior has changed, but it still doesn't work. I enclose the toolkit logs log.txt
I repeated the steps outlined above
@upmyoung curious were you able to see CW recommendations in your own files instead of CW's learn example files in the repro step? For example simply create a new file on your own and try trigger CW service
Running into the same issue on Code-OSS in Sagemaker. Install from prereleased removed the Error but code whisperer is not offering code suggestions. Same install in VSCode with same connection type (builder ID) on my local laptop works.
Also getting this error :
2024-01-10 17:34:04 [ERROR]: CodeWhisperer Invocation Exception : Unexpected key 'optOutPreference' found in params
@Will-ShaoHua no, when I try to trigger the CW service in a new file, nothing happens. The logs contain the following error message: 2024-01-22 16:16:23 [ERROR]: CodeWhisperer Invocation Exception : Cannot redefine property: default
@upmyoung Can you try this private build? With this build, you should be able to find the exact stack trace of this exception. aws-toolkit-vscode-2.8.0-dd93682.zip Thank you!
Will do.
Thanks for the help @upmyoung, having this request is because our team doesn't have any helpful finding so far on this issue. It would be helpful if you can provide us the stack trace (which should be available in this private build)
@vdesaintpern thanks for reporting us, I think it's a different issue based on the error message, wondering could you cut another issue for your case and provide us repro steps and extension version to us? Thanks a lot!
stacktrace
2024-01-30 15:19:17.869 [info] TypeError: Cannot redefine property: default
at Function.defineProperty (<anonymous>)
at c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:57:6236
at Array.forEach (<anonymous>)
at g (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:57:6183)
at constructor.loadFrom (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:57:6866)
at N (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:50:14429)
at constructor.region (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:50:15405)
at constructor.set (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:45:181109)
at constructor.<anonymous> (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:45:179164)
at constructor.each (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:67:15974)
at new constructor (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:45:179125)
at g.constructor.g.constructor.initialize (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:53:22783)
at g.constructor.g.constructor.constructor (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:53:22691)
at new g.constructor.g.constructor (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:67:17875)
at new constructor (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:53:22552)
at UHe.createAwsService (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:3951:1068)
at async OEe.createUserSdkClient (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:3579:820)
at async OEe.listRecommendations (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:3579:1464)
at async Hh.getServerResponse (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:4247:1292)
at async Hh.getRecommendations (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:4247:2941)
at async Yu.getPaginatedRecommendation (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:4271:1749)
at async cu.generateRecommendation (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:4274:933)
at async jp.invokeAutomatedTrigger (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:4277:1504)
at async jp.processKeyStroke (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:4277:1353)
at async f.value (c:\Users\bradkno\.vscode\extensions\amazonwebservices.aws-toolkit-vscode-2.8.0-dd93682\dist\src\main.js:4330:4086)
2024-01-30 15:19:17.871 [error] CodeWhisperer Invocation Exception : Cannot redefine property: default
environment Version: 1.85.2 (system setup) Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:10.514Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045
OK, sorry for the delay. I installed the private build: OS: Windows_NT x64 10.0.22631 Visual Studio Code extension host: 1.85.2 AWS Toolkit: 2.8.0-dd93682 node: 18.15.0 electron: 25.9.7 on the latest VSCode:
Version: 1.85.2 (user setup) Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:10.514Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.22631
I enclose a zip file with two logs: aws_toolkit_20240129T114516.log contains the results of trying to use the "guided" CodeWHisperer tools aws_toolkit_20240125T135618-1.log contains the results of trying to use CW in a test file, trying to get it to suggest some code. ToolkitLogs.zip
thanks a lot @upmyoung, it seems something goes wrong while initializing the sdk client in this case. We're actively looking into this issue, again thanks for your patience!
Problem
CodeWhisperer just flat out doesn't work for me after configuring it with a Builder ID on VSCode. Q does work fine.
Steps to reproduce the issue
Expected behavior
I expected CW to provide a code suggestion as shown in several informational videos on YouTube show
System details (run the
AWS: About Toolkit
command)