aws / aws-toolkit-vscode

Amazon Q, CodeCatalyst, Local Lambda debug, SAM/CFN syntax, ECS Terminal, AWS resources
https://marketplace.visualstudio.com/items?itemName=AmazonWebServices.amazon-q-vscode
Apache License 2.0
1.41k stars 349 forks source link

Step Functions: Intellisense does not work on state addition #5163

Closed marcinbelczewski closed 1 week ago

marcinbelczewski commented 3 weeks ago

Problem

Steps to reproduce the issue

  1. Go to 'Comand Palette' and choose 'AWS: Create new Step Functions
  2. Choose 'Hello world' basic example in JSON
  3. Position the cursor anywhere in the map of states as if intending to add a new state
  4. Press Ctrl+Space to invoke intellisense
  5. See no state proposals but rather keywords (prefixed with abc) indicating extension didn't return anything for the intellisense

AWS Toolkit Logs:

2024-06-13 16:07:16.150 [info] Log level: info
2024-06-13 16:07:16.156 [info] endpoints: retrieving AWS endpoints data
2024-06-13 16:07:16.156 [info] Telemetry product: AWS Toolkit For VS Code
2024-06-13 16:07:16.158 [info] telemetry cache not found: '/Users/marcin.belczewski/Library/Application Support/Code/User/globalStorage/amazonwebservices.aws-toolkit-vscode/telemetryCache'
2024-06-13 16:07:16.163 [info] OS: Darwin arm64 23.5.0
2024-06-13 16:07:16.163 [info] Visual Studio Code extension host:  1.90.0
2024-06-13 16:07:16.163 [info] AWS Toolkit:  3.1.0
2024-06-13 16:07:16.163 [info] node: 20.9.0
2024-06-13 16:07:16.163 [info] electron: 29.4.0
2024-06-13 16:07:16.164 [info] initialized 'submitFeedback' command with default feedback id: AWS Toolkit
2024-06-13 16:07:16.180 [info] auth: Updating connection state of profile:octo1 to authenticating
2024-06-13 16:07:16.493 [info] auth: Updating connection state of profile:octo1 to valid
2024-06-13 16:07:17.035 [error] Ec2MetadataClient failed to fetch token: TimeoutError: Socket timed out without establishing a connection ()
2024-06-13 16:07:17.544 [warning] command failed (not registered?): "aws.amazonq.refreshConnectionCallback"
2024-06-13 16:07:18.817 [warning] telemetry: invalid Metric: "stepfunctions_createStateMachineFromTemplate" emitted without the `result` property, which is always required. Consider using `.run()` instead of `.emit()`, which will set these properties automatically. See https://github.com/aws/aws-toolkit-vscode/blob/master/docs/telemetry.md#guidelines
2024-06-13 16:12:17.099 [info] telemetry: sent batch (size=12)

AWS: Amazon States Language Server: logs:

[Error - 4:07:19 PM] Unhandled exception: ToolkitGlobals accessed before initialize()
Error: ToolkitGlobals accessed before initialize()
    at Object.get (/Users/marcin.belczewski/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-3.1.0/dist/src/stepFunctions/asl/aslServer.js:1393:73486)
    at C (/Users/marcin.belczewski/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-3.1.0/dist/src/stepFunctions/asl/aslServer.js:1393:74045)
    at /Users/marcin.belczewski/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-3.1.0/dist/src/stepFunctions/asl/aslServer.js:1394:4828
    at /Users/marcin.belczewski/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-3.1.0/dist/src/stepFunctions/asl/aslServer.js:1394:7358
    at Object.<anonymous> (/Users/marcin.belczewski/.vscode/extensions/amazonwebservices.aws-toolkit-vscode-3.1.0/dist/src/stepFunctions/asl/aslServer.js:1394:7397)
    at Module._compile (node:internal/modules/cjs/loader:1256:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1311:10)
    at Module.load (node:internal/modules/cjs/loader:1098:32)
    at Module._load (node:internal/modules/cjs/loader:945:12)
    at c._load (node:electron/js2c/node_init:2:13672)

This might be related to #5110?

Expected behavior

State proposals visible in intellisense

System details (run AWS: About and/or Amazon Q: About)

justinmk3 commented 1 week ago

Fixed in AWS Toolkit 3.12.0.