question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ContainerClient listBlobsFlat stops working from 12.8.0 to 12.9.0 and up

See original GitHub issue
  • Package Name: storage-blob
  • Package Version: +12.9.0
  • Operating system:
  • nodejs
    • version: 18.12.1
  • browser
    • name/version:
  • typescript
    • version:
  • Is the bug related to documentation in

Describe the bug listBlobsFlat() and other list methods stopped working since v12.9.0.

To Reproduce Steps to reproduce the behavior:

  1. Using example from https://learn.microsoft.com/en-us/javascript/api/@azure/storage-blob/containerclient?view=azure-node-latest#@azure-storage-blob-containerclient-listblobsflat

import { BlobServiceClient } from '@azure/storage-blob;
 async function listFlat(containerClient){
  let i = 1;
  let iter = containerClient.listBlobsFlat();
  let blobItem = await iter.next();
  while (!blobItem.done) {
    console.log(`Blob ${i++}: ${blobItem.value.name}`);
    blobItem = await iter.next();
  }
}
  let blobServiceClient = BlobServiceClient.fromConnectionString(process.env.AZURE_STORAGE_CONNECTION_STRING);
  let containerClient = blobServiceClient.getContainerClient('<mycontainername>');
  ( async( )=>{
      await listFlat(containerClient);
  })()

  1. Using @azure/storage-blob@12.9.0 or above, the code will return an empty iterable (no blobs are listed)
  2. Install @azure/storage-blob@12.8.0 and the code will work as expected, returning a list of

Expected behavior It should return a list of blobs in the container

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
xirzeccommented, Nov 9, 2022

@joaomoreno @algorys @cburatto @azure/core-http@2.3.1 is now live in npm (thanks @jeremymeng !) and I have confirmed that it works locally for me in resolving this trouble. Please let us know if you still experience issues.

My sincere apologies for the disruption, we will revisit our release strategy and be more cautious of these kinds of changes in the future.

1reaction
joaomorenocommented, Nov 10, 2022

Thanks for the speedy recovery!

Read more comments on GitHub >

github_iconTop Results From Across the Web

@azure/storage-blob - NET
Blob storage is optimized for storing massive amounts of unstructured data. Unstructured data is data that does not adhere to a particular data...
Read more >
@azure/storage-blob NPM | npm.io
Blob storage is optimized for storing massive amounts of unstructured data. Unstructured data is data that does not adhere to a particular data...
Read more >
Azure Storage Blobs client library for Python - Microsoft Learn
The following components make up the Azure Blob Service: ... from azure.storage.blob import ContainerClient container_client ...
Read more >
cannot import name 'BlobServiceClient' even if 'Azure-blob ...
from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient, __version__. OUTPUT: enter image description here.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found