microsoft / vscode-apimanagement

VS Code extension for Azure API Management.
MIT License
59 stars 38 forks source link

Debug API Not working - Cannot read properties of undefined #319

Closed jayendranarumugam closed 10 months ago

jayendranarumugam commented 11 months ago

Does this occur consistently? Repro steps:

  1. Trying to Debug the API

APIM Details: Developer Tier Platform Version: stv2 Region: EAST US 2 Network: Internal VNET apiVersionConstraint.minApiVersion : 2019-12-01

Action: azureApiManagement.debugPolicy Error type: TypeError Error Message: Cannot read properties of undefined (reading 'primaryKey')

Version: 1.0.6 OS: darwin OS Release: 22.5.0 Product: Visual Studio Code Product Version: 1.80.1 Language: en

Call Stack ``` extension.bundle.js:479:71081 OperationConsole. extension.bundle.js:479:71044 fulfilled extension.bundle.js:479:68637 ```
zakariazafar commented 11 months ago

any update on this issue?

jayendranarumugam commented 11 months ago

After some investigation, it seems this issue is happening only if the management api is 2019-12-01 . If i change this to null the issue is not happening. But the problem of this workaround will be security reason from ms

Microsoft recommends to make this to value not null and keep it 2019-12-01 or higher The reason for this would be To prevent service secrets from being shared with read-only users, the minimum API version should be set to 2019-12-01 or higher.

So i think we should not start practising the workaround by making the api version to null and fix the extension code to support the version 2019-12-01 and above

jayendranarumugam commented 10 months ago

@DeagleGross / @malincrist / @quanterion thanks for fixing the issue. Is this part of any new release ? Is there a place we can check the changelog or release doc ?

malincrist commented 10 months ago

Hello @jayendranarumugam , the fix will come with a new release. You can track GitHub releases or the changelog from the VSCode extension.