Skip to content

CloudBlobContainer authentication error when repeating listBlobs() #82

@avinabmalla

Description

@avinabmalla

The method CloudBlobContainer.listBlobs() works when called the first time after installing the app, but will not work again and throw the following MAC signature invalid error.

The MAC signature found in the HTTP request 'xxxxxxxxxx' is not the same as any computed signature. Server used following string to sign: 'GET

Mon, 24 Aug 2020 14:39:19 GMT

x-ms-client-request-id:5830d2ce-c356-40c0-a9a1-cecd66921336
x-ms-date:Mon, 24 Aug 2020 16:48:29 GMT
x-ms-version:2017-04-17
/myaccoun t/mycontainer
comp:list
delimiter:/
restype:container'.

The listBlobs() method will only work for the same container again after the app's cache is cleared.

I am using the following code to list blobs (Kotlin)

`
val storageAccount = CloudStorageAccount.parse(connectionString)
val blobClient = storageAccount.createCloudBlobClient()
val container = blobClient.getContainerReference(name)
val blobs = container.listBlobs()

val blobNames: ArrayList = ArrayList()
for (blob in blobs) {
blobNames.add((blob as CloudBlockBlob).name)
}
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions