vscode-azurestorage icon indicating copy to clipboard operation
vscode-azurestorage copied to clipboard

Error opening file from Azure Storage blob in VSCode

Open JKamsker opened this issue 1 year ago • 6 comments

Issue Type: Bug

Description

I'm experiencing an issue when trying to open a file from an Azure Storage blob within Visual Studio Code using the Azure Storage extension. The error indicates a problem with finding the subscription ID.

Steps to Reproduce

  1. Open Visual Studio Code.
  2. Navigate to the Azure Storage extension.
  3. Attempt to open a file from a blob container within a storage account.

Error Message

Unable to read file 'azurestorageblob:/[blob-path]/[script-name].ps1?storageAccountld=[sanitized-storage-account-id]' (Error: Could not find subscription With ID "[sanitized-subscription-id]")

Expected Behavior

The file should open without any errors, allowing for editing and management within Visual Studio Code.

Actual Behavior

An error is thrown stating that the subscription with the provided ID could not be found.

Environment

  • Visual Studio Code Version: 1.85.2
  • Azure Storage Extension Version: v0.15.3
  • Operating System: Windows 10

Additional Details

  • The issue occurs consistently when attempting to open this particular file.
  • The subscription ID and storage account details have been verified and are correct.
  • The account associated has multiple subscriptions

JKamsker avatar Jan 29 '24 10:01 JKamsker

Are you able to open any other files under this subscription? Is this the ONLY file you can't open?

MicroFish91 avatar Jan 31 '24 18:01 MicroFish91

Error is happening at https://github.com/microsoft/vscode-azurestorage/blob/61a1f0640db5c54a9828f57fc45d6fdfcd926493/src/BlobContainerFS.ts#L104

alexweininger avatar Jan 31 '24 18:01 alexweininger

@MicroFish91

Are you able to open any other files under this subscription? Is this the ONLY file you can't open?

Here is what i have tested, that doesnt work:

  • Opening atleast 3 distinct files on the same Blob container
  • Opening atleast 2 distinct file on different Blob container
  • Opening atleast 2 distinct file on different Blob contianer & subscription

JKamsker avatar Feb 05 '24 10:02 JKamsker

This is an issue related to not being signed in using the Azure Accounts extension.

As a temporary workaround, could you please try signing in using the Azure Accounts extension and see if this resolves the issue for you.

To do so, you can press F1 > Azure: Sign In

image

MicroFish91 avatar Feb 21 '24 19:02 MicroFish91

In order to fix this, we need to provide a way through the Resources API to list subscriptions. If we use our authentication library directly to list subscriptions, it will result in an additional authentication prompt.

alexweininger avatar Feb 29 '24 18:02 alexweininger

I am experiencing the same issue. For me, it happens to all files in parquet format. Signing in again as mentioned above those not resolve the issue.

westr029 avatar Jun 26 '24 13:06 westr029