microsoft / vscode-azureresourcegroups

VS Code extension for managing Azure resources.
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azureresourcegroups
MIT License
54 stars 29 forks source link

Can not view the storage account in Azure China, error: Could not resolve resource xxx #917

Closed JohnTangZX closed 2 months ago

JohnTangZX commented 2 months ago

VS Code Version: 1.93.0 OS Version: Windows 11

Steps to Reproduce:

  1. Sign in to Azure China after modifying the settings as below. image

  2. Install the latest extensions, for example "Azure Storage v0.16.1" and "Azure Resources v0.9.4", then I can see the below error for the storage account. The issue happens for all resources, not specific to storage accounts. image

  3. The signed in account is the owner of the resources.

  4. I am able to create the storage account, but can not view it. The error is as below.

Output of Storage account: Error: The subscription 'xxxx-b158-4cfc-b303-xxxxx' could not be found. Creating resource group "testvssa" in location "China North 3"... Successfully created resource group "testvssa". Creating storage account "testvssa" in location "China North 3" with sku "Standard_LRS"... Successfully created storage account "testvssa". Error: The subscription 'xxxx-b158-4cfc-b303-xxxx' could not be found.

Output of Azure resource Groups:

2024-09-09 12:59:58.260 [info] Internal error: 'branchDataProvider.getResourceItem' threw an exception Could not resolve resource "/subscriptions/xxx-b158-4cfc-b303-xxx/resourceGroups/testvssa/providers/Microsoft.Storage/storageAccounts/testvssa" at CompatibleApplicationResourceBranchDataProvider. extension.bundle.js:2:1541296 fulfilled extension.bundle.js:2:1540321

  1. I am able to see the storage accounts and othre resources after installing the old version extension "Azure Resources v0.8.1".
alexweininger commented 2 months ago

Hi John, we've already merged the fix for this issue, but it hasn't been released yet. We hope to release it this week. https://github.com/microsoft/vscode-azureresourcegroups/pull/915

If you want to use the fixed extension before we release it, you can use the dev build by following these steps:

Steps to install extension development build:

  1. Download the .zip that contains the extension .VSIX: Download extension.zip
  2. Extract the .VSIX from the .zip archive
  3. From the command palette (F1 or Command/Ctrl + Shift + P), run the "Extensions: Install from VSIX..." command.
  4. Select the downloaded .VSIX file, then reload VS Code as prompted.
JohnTangZX commented 2 months ago

Okay, thank you for your help!

alexweininger commented 2 months ago

Hi @JohnTangZX, the fix has been released in the latest version, v0.9.5 https://github.com/microsoft/vscode-azureresourcegroups/releases/tag/v0.9.5