Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method invocation failed 'DownloadBlockList' #8524

Closed
goudys opened this issue Feb 12, 2019 · 5 comments
Closed

Method invocation failed 'DownloadBlockList' #8524

goudys opened this issue Feb 12, 2019 · 5 comments
Assignees
Milestone

Comments

@goudys
Copy link

goudys commented Feb 12, 2019

Observing below error while executing the script.
<<
Exception calling "Invoke" with "1" argument(s): "Method invocation failed because [Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob] does not contain a method named 'DownloadBlockList'."At /home/gowdilyan/clouddrive/code2.ps1:55 char:20+ return $Action.Invoke($requestOption)

  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
  • FullyQualifiedErrorId : RuntimeException
@maddieclayton
Copy link
Contributor

@goudys The information given above does not give us enough information to look into your issue. Please fill out the issue template:

Description

Script/Steps for Reproduction

Module Version

Get-Module -ListAvailable

Environment Data

$PSVersionTable

Debug Output


@goudys
Copy link
Author

goudys commented Feb 12, 2019

I'm executing the script from Azure cloudshell and the output of above commands are

PS /home/gowdilyan> Get-Module -ListAvailable

Directory: /usr/local/share/powershell/Modules

ModuleType Version Name PSEdition ExportedCommands


Script 1.2.0 Az.Accounts Core,Desk {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutos...
Script 1.0.1 Az.Aks Core,Desk {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredential...}
Script 1.0.0 Az.AnalysisServices Core,Desk {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServicesServer, Re...
Script 1.0.0 Az.ApiManagement Core,Desk {Add-AzApiManagementRegion, Get-AzApiManagementSsoToken, New-AzApiManagementCustomHostnameConfigurat...
Script 1.0.0 Az.ApplicationInsights Core,Desk {Get-AzApplicationInsights, New-AzApplicationInsights, Remove-AzApplicationInsights, Set-AzApplicati...
Script 1.1.0 Az.Automation Core,Desk {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJobOutputR...
Script 1.0.0 Az.Batch Core,Desk {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAccountKeys, New-AzBatchAccount...}
Script 1.0.0 Az.Billing Core,Desk {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollmentAccount, Get-AzConsumptionBudget...}
Script 1.0.1 Az.Cdn Core,Desk {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...}
Script 1.0.0 Az.CognitiveServices Core,Desk {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServicesAccountSk...
Script 1.2.0 Az.Compute Core,Desk {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...}
Script 1.0.0 Az.ContainerInstance Core,Desk {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzContainerGroup, Get-AzContainerInstanceLog}
Script 1.0.1 Az.ContainerRegistry Core,Desk {New-AzContainerRegistry, Get-AzContainerRegistry, Update-AzContainerRegistry, Remove-AzContainerReg...
Script 1.0.1 Az.DataFactory Core,Desk {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}
Script 1.0.0 Az.DataLakeAnalytics Core,Desk {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalyticsCatalogCredential, Remove-AzDataLakeAnaly...
Script 1.0.2 Az.DataLakeStore Core,Desk {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeSto...
Script 1.0.0 Az.DevTestLabs Core,Desk {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolicy, Get-AzDtlAutoStartPolicy, Get-AzDtlVMsP...
Script 1.0.0 Az.Dns Core,Desk {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRecordSet, Set-AzDnsRecordSet...}
Script 1.1.0 Az.EventGrid Core,Desk {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGridTopic, New-AzEventGridTopicKey...}
Script 1.0.0 Az.EventHub Core,Desk {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEventHubNamespa...
Script 1.0.0 Az.HDInsight Core,Desk {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsightStreamin...
Script 1.0.2 Az.IotHub Core,Desk {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...}
Script 1.0.1 Az.KeyVault Core,Desk {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-A...
Script 1.1.0 Az.LogicApp Core,Desk {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccountCallbackUrl, Get-AzIntegrationAccountCer...
Script 1.0.0 Az.MachineLearning Core,Desk {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssociation, Get-AzMlCommitmentPlanUsageHistory, ...
Script 1.0.0 Az.MarketplaceOrdering Core,Desk {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}
Script 1.0.0 Az.Media Core,Desk {Sync-AzMediaServiceStorageKeys, Set-AzMediaServiceKey, Get-AzMediaServiceKeys, Get-AzMediaServiceNa...
Script 1.0.0 Az.Monitor Core,Desk {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...}
Script 1.1.0 Az.Network Core,Desk {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificat...
Script 1.0.0 Az.NotificationHubs Core,Desk {Get-AzNotificationHub, Get-AzNotificationHubAuthorizationRules, Get-AzNotificationHubListKeys, Get-...
Script 1.0.0 Az.OperationalInsights Core,Desk {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLogDataSource, ...
Script 1.0.0 Az.PolicyInsights Core,Desk {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...}
Script 1.0.0 Az.PowerBIEmbedded Core,Desk {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollec...
Script 1.0.0 Az.RecoveryServices Core,Desk {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSetti...
Script 1.0.0 Az.RedisCache Core,Desk {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheScheduleEntry, Get-AzRedisCachePatchSchedule, New...
Script 1.0.0 Az.Relay Core,Desk {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNamespace, Remove-AzRelayNamespace...}
Script 1.1.1 Az.Resources Core,Desk {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}
Script 1.0.0 Az.ServiceBus Core,Desk {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzServiceBu...
Script 1.0.1 Az.ServiceFabric Core,Desk {Add-AzServiceFabricApplicationCertificate, Add-AzServiceFabricClientCertificate, Add-AzServiceFabri...
Script 1.0.2 Az.SignalR Core,Desk {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSignalRKey...}
Script 1.1.0 Az.Sql Core,Desk {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set...
Script 1.0.2 Az.Storage Core,Desk {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script 1.0.0 Az.StreamAnalytics Core,Desk {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefaultFunctionDefinition, New-AzStreamAnalytic...
Script 1.0.1 Az.TrafficManager Core,Desk {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTrafficManagerCustomHeaderFromEndpoint, Add-Az...
Manifest 6.1.0.0 Microsoft.PowerShell.Host Core {Start-Transcript, Stop-Transcript}
Manifest 6.1.0.0 Microsoft.PowerShell.Management Core {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}
Manifest 6.1.0.0 Microsoft.PowerShell.Security Core {Get-Credential, Get-ExecutionPolicy, Set-ExecutionPolicy, ConvertFrom-SecureString...}
Manifest 6.1.0.0 Microsoft.PowerShell.Utility Core {Format-List, Format-Custom, Format-Table, Format-Wide...}
Script 1.1.7.2 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 1.6.7 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
Script 0.0 PSDesiredStateConfiguration Desk {Initialize-ConfigurationRuntimeState, IsPatternMatched, Test-NodeResources, Get-PSCurrentConfigurat...
Script 2.0.0 PSReadLine Desk {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remove-PSReadLineKeyHandler, Get-PSReadLineOpti...
Binary 1.1.2 ThreadJob Desk Start-ThreadJob

PS /home/gowdilyan> $PSVersionTable

Name Value


PSVersion 6.1.2
PSEdition Core
GitCommitId 6.1.2
OS Linux 4.15.0-1036-azure #38~16.04.1-Ubuntu SMP Fri Dec 7 03:21:52 UTC 2018
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

@maddieclayton
Copy link
Contributor

@goudys Can you give us a little more information about the script you are running? Please let us know what the commands you ran to see this error were. Additionally, please run $DebugPreference = "Continue" before you run the script and paste the output. Also, please run Resolve-Error after you hit the error and paste the output here.

@goudys
Copy link
Author

goudys commented Feb 12, 2019

Attaching the output

PS /home/gowdilyan/clouddrive> $DebugPreference = "Continue"
PS /home/gowdilyan/clouddrive> ./code2.ps1 -ResourceGroup xxxxxxxxxxx -StorageAccountName xxxxxxxxxxx -ContainerName xxxxxxxxxxx
DEBUG: 11:36:13 PM - GetAzureStorageAccountCommand begin processing with ParameterSet 'AccountNameParameterSet'.
DEBUG: 11:36:13 PM - using account id 'xxxxxxxxxxx'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'xxxxxxxxxxx', environment: 'AzureCloud', tenant: 'xxxxxxxxxxx'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/dc2a4b35-5221-412c-bca8-cb90aef6fbfb/resourceGroups/emju-prod-hdibase/providers/Microsoft.Storage/storageAccounts/azemjuprodhdist
orage?api-version=2018-07-01

Headers:
x-ms-client-request-id : ab2f2018-687f-440d-8f41-1d814a7ba771
Accept-Language : en-USBody:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Cache-Control : no-cache
Pragma : no-cache
x-ms-request-id : 253fab89-9103-4c86-954d-fae1ad2c9d0e
Strict-Transport-Security : max-age=31536000; includeSubDomains
Server : Microsoft-Azure-Storage-Resource-Provider/1.0,Microsoft-HTTPAPI/2.0 Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-correlation-request-id : 3a66022b-3190-4888-a075-9355070a1e6c
x-ms-routing-request-id : EASTUS:20190212T233613Z:3a66022b-3190-4888-a075-9355070a1e6c
X-Content-Type-Options : nosniff
Date : Tue, 12 Feb 2019 23:36:13 GMT

Body:
{
"sku": {
"name": "Standard_GRS",
"tier": "Standard"
},
"kind": "Storage",
"id": "/subscriptions/dc2a4b35-5221-412c-bca8-cb90aef6fbfb/resourceGroups/emju-prod-hdibase/providers/Microsoft.Storage/storageAccounts/xxxxxxxxxxx",
"name": "xxxxxxxxxxx",
"type": "Microsoft.Storage/storageAccounts",
"location": "westus",
"tags": {},
"properties": {
"networkAcls": {
"bypass": "AzureServices",
"virtualNetworkRules": [],
"ipRules": [],
"defaultAction": "Allow"
},
"supportsHttpsTrafficOnly": false,
"encryption": {
"services": {
"file": {
"enabled": true,
"lastEnabledTime": "2018-01-11T03:07:04.5730091Z"
},
"blob": {
"enabled": true,
"lastEnabledTime": "2018-01-11T03:07:04.5730091Z"
}
},
"keySource": "Microsoft.Storage"
},
"provisioningState": "Succeeded",
"creationTime": "2016-03-21T19:27:29.8411237Z",
"primaryEndpoints": {
"blob": "https:/xxxxxxxxxxx.blob.core.windows.net/",
"queue": "https://xxxxxxxxxxx.queue.core.windows.net/",
"table": "https://xxxxxxxxxxx.table.core.windows.net/",
"file": "https://xxxxxxxxxxx.file.core.windows.net/"
},
"primaryLocation": "westus",
"statusOfPrimary": "available",
"secondaryLocation": "eastus",
"statusOfSecondary": "available"
}
}

DEBUG: AzureQoSEvent: CommandName - Get-AzStorageAccount; IsSuccess - True; Duration - 00:00:00.2804496; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 11:36:13 PM - GetAzureStorageAccountCommand end processing.
DEBUG: 11:36:13 PM - GetAzureStorageAccountCommand end processing.you want to get more details, please add "-Debug" to your command.
DEBUG: 11:36:14 PM - GetAzureStorageContainerCommand begin processing with ParameterSet 'ContainerName'.
DEBUG: 11:36:14 PM - Use storage account 'xxxxxxxxxxx' from storage context.
DEBUG: 11:36:14 PM - Start 12th remote call, method: , destination: https://xxxxxxxxxxx.blob.core.windows.net/hdi-new-container-old-storage?restype=container.
DEBUG: 11:36:14 PM - Start 14th remote call, method: , destination: https://xxxxxxxxxxx.blob.core.windows.net/hdi-new-container-old-storage?restype=container&comp=acl.
DEBUG: 11:36:14 PM - GetAzureStorageContainerCommand end processing, Start 14 remote calls. Finish 14 remote calls. Elapsed time 31440.08 ms. Client operation id: Azure-Sto
rage-PowerShell-35bfd017-9cfb-4316-b8f7-48395833f735.
DEBUG: 11:36:14 PM - GetAzureStorageContainerCommand end processing.
Calculating container hdi-new-container-old-storage ...
Method invocation failed because [Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer] does not contain a method named 'GetPermissions'.
At /home/gowdilyan/clouddrive/code2.ps1:198 char:5

  • $containerSizeInBytes += $Container.GetPermissions().SharedAccess ...
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : InvalidOperation: (:) [], RuntimeException
  • FullyQualifiedErrorId : MethodNotFound

DEBUG: 11:36:14 PM - Init Operation Context for 'GetAzureStorageBlobCommand' with client request id Azure-Storage-PowerShell-35bfd017-9cfb-4316-b8f7-48395833f735. If you want to get more details, please add "-Debug" to your command.
DEBUG: 11:36:14 PM - GetAzureStorageBlobCommand begin processing with ParameterSet 'BlobName'.
DEBUG: 11:36:14 PM - Use storage account 'xxxxxxxxxxx' from storage context.
DEBUG: 11:36:14 PM - Start 15th remote call, method: , destination: https://xxxxxxxxxxx.blob.core.windows.net/hdi-new-container-old-storage?restype=container.
DEBUG: 11:36:18 PM - GetAzureStorageBlobCommand end processing, Start 22 remote calls. Finish 22 remote calls. Elapsed time 34661.73 ms. Client operation id: Azure-Storage-
PowerShell-35bfd017-9cfb-4316-b8f7-48395833f735.
DEBUG: 11:36:18 PM - GetAzureStorageBlobCommand end processing.
Exception calling "Invoke" with "1" argument(s): "Method invocation failed because [Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob] does not contain a method named 'Dow
nloadBlockList'."
At /home/gowdilyan/clouddrive/code2.ps1:55 char:20

  •         return $Action.Invoke($requestOption)
    
  •                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
  • CategoryInfo : NotSpecified: (:) [], ParentContainsErrorRecordException
  • FullyQualifiedErrorId : RuntimeException

PS /home/gowdilyan/clouddrive> Resolve-Error
DEBUG: 11:36:31 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 11:36:31 PM - using account id 'xxxxxxxxxxx'...

HistoryId: -1

Message : Exception calling "Invoke" with "1" argument(s): "Method invocation failed because [Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob] does not contain
a method named 'DownloadBlockList'."
StackTrace : at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.Runspaces.Pipeline.Invoke()
at Microsoft.PowerShell.Executor.ExecuteCommandHelper(Pipeline tempPipeline, Exception& exceptionThrown, ExecutionOptions options)
Exception : System.Management.Automation.MethodInvocationException
InvocationInfo : {}
Line : return $Action.Invoke($requestOption)

Position : At /home/gowdilyan/clouddrive/code2.ps1:55 char:20
+ return $Action.Invoke($requestOption)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1

Message : Method invocation failed because [Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob] does not contain a method named 'DownloadBlockList'.
StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(ScriptBlockClauseToInvoke clauseToInvoke, Boolean createLocalScope, Dictionary2
functionsToDefine, List1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args) at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(Boolean createLocalScope, Dictionary2 functionsToDefine, List1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args) at System.Management.Automation.ScriptBlock.<>c__DisplayClass57_0.<InvokeWithPipe>b__0() at System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Action action) at System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean useLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Boolean propagateAllExceptionsToTop, List1 variablesToDefine,
Dictionary`2 functionsToDefine, Object[] args)
at System.Management.Automation.ScriptBlock.DoInvoke(Object dollarUnder, Object input, Object[] args)
at System.Management.Automation.ScriptBlock.Invoke(Object[] args)
at CallSite.Target(Closure , CallSite , Object , Object )
Exception : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line : return $Action.Invoke($requestOption)

Position : At /home/gowdilyan/clouddrive/code2.ps1:55 char:20
+ return $Action.Invoke($requestOption)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1

Message : Method invocation failed because [Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob] does not contain a method named 'DownloadBlockList'.
StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(ScriptBlockClauseToInvoke clauseToInvoke, Boolean createLocalScope, Dictionary2
functionsToDefine, List1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args) at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(Boolean createLocalScope, Dictionary2 functionsToDefine, List1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args) at System.Management.Automation.ScriptBlock.<>c__DisplayClass57_0.<InvokeWithPipe>b__0() at System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Action action) at System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean useLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Boolean propagateAllExceptionsToTop, List1 variablesToDefine,
Dictionary`2 functionsToDefine, Object[] args)
at System.Management.Automation.ScriptBlock.DoInvoke(Object dollarUnder, Object input, Object[] args)
at System.Management.Automation.ScriptBlock.Invoke(Object[] args)
at CallSite.Target(Closure , CallSite , Object , Object )
Exception : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line : $action = { param($requestOption) return $Blob.ICloudBlob.DownloadBlockList([Microsoft.WindowsAzure.Storage.Blob.BlockListingFilter]::All,
$null, $requestOption) }

Position : At /home/gowdilyan/clouddrive/code2.ps1:101 char:54
+ ... ion) return $Blob.ICloudBlob.DownloadBlockList([Microsoft.WindowsAzur ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1

Message : Method invocation failed because [Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer] does not contain a method named 'GetPermissions'.
StackTrace : at CallSite.Target(Closure , CallSite , CloudBlobContainer )
at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line : $containerSizeInBytes += $Container.GetPermissions().SharedAccessPolicies.Count * 512

Position : At /home/gowdilyan/clouddrive/code2.ps1:198 char:5
+ $containerSizeInBytes += $Container.GetPermissions().SharedAccess ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1

Message : Exception calling "Invoke" with "1" argument(s): "Method invocation failed because [Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob] does not contain
a method named 'DownloadBlockList'."
StackTrace : at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at System.Management.Automation.Runspaces.Pipeline.Invoke()
at Microsoft.PowerShell.Executor.ExecuteCommandHelper(Pipeline tempPipeline, Exception& exceptionThrown, ExecutionOptions options)
Exception : System.Management.Automation.MethodInvocationException
InvocationInfo : {}
Line : return $Action.Invoke($requestOption)

Position : At /home/gowdilyan/clouddrive/code2.ps1:55 char:20
+ return $Action.Invoke($requestOption)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1

Message : Method invocation failed because [Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob] does not contain a method named 'DownloadBlockList'.
StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(ScriptBlockClauseToInvoke clauseToInvoke, Boolean createLocalScope, Dictionary2
functionsToDefine, List1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args) at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(Boolean createLocalScope, Dictionary2 functionsToDefine, List1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args) at System.Management.Automation.ScriptBlock.<>c__DisplayClass57_0.<InvokeWithPipe>b__0() at System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Action action) at System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean useLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Boolean propagateAllExceptionsToTop, List1 variablesToDefine,
Dictionary`2 functionsToDefine, Object[] args)
at System.Management.Automation.ScriptBlock.DoInvoke(Object dollarUnder, Object input, Object[] args)
at System.Management.Automation.ScriptBlock.Invoke(Object[] args)
at CallSite.Target(Closure , CallSite , Object , Object )
Exception : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line : return $Action.Invoke($requestOption)

Position : At /home/gowdilyan/clouddrive/code2.ps1:55 char:20
+ return $Action.Invoke($requestOption)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1

Message : Method invocation failed because [Microsoft.WindowsAzure.Storage.Blob.CloudBlockBlob] does not contain a method named 'DownloadBlockList'.
StackTrace : at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception exception)
at System.Management.Automation.Interpreter.ActionCallInstruction2.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.Interpreter.Run(InterpretedFrame frame) at System.Management.Automation.Interpreter.LightLambda.RunVoid1[T0](T0 arg0) at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(ScriptBlockClauseToInvoke clauseToInvoke, Boolean createLocalScope, Dictionary2
functionsToDefine, List1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args) at System.Management.Automation.ScriptBlock.InvokeWithPipeImpl(Boolean createLocalScope, Dictionary2 functionsToDefine, List1 variablesToDefine, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Object[] args) at System.Management.Automation.ScriptBlock.<>c__DisplayClass57_0.<InvokeWithPipe>b__0() at System.Management.Automation.Runspaces.RunspaceBase.RunActionIfNoRunningPipelinesWithThreadCheck(Action action) at System.Management.Automation.ScriptBlock.InvokeWithPipe(Boolean useLocalScope, ErrorHandlingBehavior errorHandlingBehavior, Object dollarUnder, Object input, Object scriptThis, Pipe outputPipe, InvocationInfo invocationInfo, Boolean propagateAllExceptionsToTop, List1 variablesToDefine,
Dictionary`2 functionsToDefine, Object[] args)
at System.Management.Automation.ScriptBlock.DoInvoke(Object dollarUnder, Object input, Object[] args)
at System.Management.Automation.ScriptBlock.Invoke(Object[] args)
at CallSite.Target(Closure , CallSite , Object , Object )
Exception : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line : $action = { param($requestOption) return $Blob.ICloudBlob.DownloadBlockList([Microsoft.WindowsAzure.Storage.Blob.BlockListingFilter]::All,
$null, $requestOption) }

Position : At /home/gowdilyan/clouddrive/code2.ps1:101 char:54
+ ... ion) return $Blob.ICloudBlob.DownloadBlockList([Microsoft.WindowsAzur ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1

Message : Method invocation failed because [Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer] does not contain a method named 'GetPermissions'.
StackTrace : at CallSite.Target(Closure , CallSite , CloudBlobContainer )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site, T0 arg0)
at System.Management.Automation.Interpreter.DynamicInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
Exception : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line : $containerSizeInBytes += $Container.GetPermissions().SharedAccessPolicies.Count * 512

Position : At /home/gowdilyan/clouddrive/code2.ps1:198 char:5
+ $containerSizeInBytes += $Container.GetPermissions().SharedAccess ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : -1

DEBUG: AzureQoSEvent: CommandName - Resolve-AzError; IsSuccess - True; Duration - 00:00:00.1227932; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 11:36:31 PM - ResolveError end processing.
DEBUG: 11:36:31 PM - ResolveError end processing.

PS /home/gowdilyan/clouddrive>

@maddieclayton
Copy link
Contributor

@goudys From the error message, it looks like you are running synchronous call rather than async calls, which are not supported. Please check out this doc here: https://github.com/Azure/azure-powershell/blob/master/documentation/migration-guides/Az.1.0.0-migration-guide.md#4-set-blob-tier. If this does not fix your error, please copy and paste the contents of the script that you are running so we can see what call caused your failure. I will reopen if this is the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants