Skip to content

[VSCode] Triggering intellisense crashes vscode extension/LSP on br/public:avm/res/network/application-gateway:0.5.1 on the sku fieldΒ #15569

Closed

Description

Does this occur consistently? YES
Repro steps:

  1. Create a file apwg.bicep
  2. Copy this
targetScope = 'resourceGroup'


module applicationGateway2 'br/public:avm/res/network/application-gateway:0.5.1' = {
  name: 'aname'
  params: {
    name: 'aname-2'
    location: 'northeurope'
    sku: {
      
    }
  }
}
  1. Trigger intellisense/auto-complete inside the params.sku section
  2. See the server restart and crash 5 times and it says to "report issue"
  3. Reload and try again,
  4. Yeah, still failing

Action: bicep.lsp-error
Error type: Error
Error Message: Connection closed

Version: 0.31.34
OS: darwin
OS Release: 24.1.0
Product: Visual Studio Code
Product Version: 1.95.2
Language: en

Call Stack
callback client.ts:213:15
callWithTelemetryAndErrorHandlingSync @microsoft/callWithTelemetryAndErrorHandling.js:68:16
Object.closed client.ts:210:7
LanguageClient.handleConnectionClosed vscode-languageclient/client.js:1164:72
LanguageClient.handleConnectionClosed vscode-languageclient/main.js:180:22
apply vscode-languageclient/client.js:1142:18
CallbackList.call [as invoke] vscode-jsonrpc/events.js:55:39
Emitter.fire vscode-jsonrpc/events.js:117:36
apply vscode-jsonrpc/connection.js:314:26
CallbackList.call [as invoke] vscode-jsonrpc/events.js:55:39
Emitter.fire vscode-jsonrpc/events.js:117:36
SocketMessageWriter.fireClose vscode-jsonrpc/messageWriter.js:42:27
Socket.<anonymous> vscode-jsonrpc/messageWriter.js:74:42
Manually copied bicep output, hoping it helps as well [bicep-extension-report.log](https://github.com/user-attachments/files/17718080/bicep-extension-report.log)

Activity

  1. alexrecuenco commented on Nov 12, 2024

    @alexrecuenco
    Author

    Obviously the br/public:avm/res/network/application-gateway:0.5.1::params.sku field here is a string, but I don't think it should fry itself when it isn't

  2. added
    devdiv
    and removed
    devdiv
    on Nov 13, 2024
  3. added this to the v0.32 milestone on Nov 13, 2024
  4. majastrz commented on Nov 13, 2024

    @majastrz
    Member

    I was able to reproduce this issue. It is caused by a Stack Overflow in the language server and likely related to the type mismatch between the sku property declared type and the object value, which we need to handle gracefully instead of crashing.

  5. moved this from Todo to Done in Bicepon Nov 14, 2024
  6. majastrz commented on Nov 14, 2024

    @majastrz
    Member

    Fix will be available in the next release.

  7. added a commit that references this issue on Nov 15, 2024
    9e3757b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bug

Type

No type

Projects

  • Status
    Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions