microsoft / vscode-azurestorage

Azure Storage extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-azurestorage
MIT License
60 stars 38 forks source link

Error opening file from Azure Storage blob in VSCode #1292

Open JKamsker opened 5 months ago

JKamsker commented 5 months ago

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

Additional Details

MicroFish91 commented 5 months ago

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

alexweininger commented 5 months ago

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

JKamsker commented 5 months ago

@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:

MicroFish91 commented 4 months ago

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

alexweininger commented 4 months ago

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.

westr029 commented 1 week ago

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.