Azure / Azure/azure-powershell

Get-AzFunctionAppFlexConsumptionRuntime fails for DotNet-Isolated in any region

Open
#29,647 0 comments 0 reactions 0 assignees View on GitHub
bug customer-reported
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

### Description

just errors whilst retrieving DotNet-Isolated.
I've tried multiple regions and nothing is returned.
Failed to retrieve Flex Consumption Function App stack definitions from the ARM API for runtime 'DotNet-Isolated' in
location 'East Asia'. Please try a different region.
At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:911

### Issue script & Debug output

```PowerShell
Get-AzFunctionAppFlexConsumptionRuntime -Location 'eastus'
Failed to retrieve Flex Consumption Function App stack definitions from the ARM API for runtime 'DotNet-Isolated' in
location 'eastus'. Please try a different region.
At C:\Program Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:911
char:5
+ throw $errorRecord
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], InvalidOperationException
+ FullyQualifiedErrorId : FlexConsumptionStackRetrievalFailed
```

### Environment data

```PowerShell
$PSVersionTable

Name Value
---- -----
PSVersion 5.1.26100.8115
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.26100.8115
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
```

### Module versions

```PowerShell
Get-Module Az*

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 5.3.3 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear...
Script 4.3.1 Az.Functions {Get-AzFunctionApp, Get-AzFunctionAppAvailableLocation, Ge...
```

### Error output

```PowerShell
Resolve-AzError

HistoryId: -1

Message : Failed to retrieve Flex Consumption Function App stack definitions from the ARM API for runtime
'DotNet-Isolated' in location 'eastus'. Please try a different region.
StackTrace :
Exception : System.InvalidOperationException
InvocationInfo : {}
Line : throw $errorRecord

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:911
char:5
+ throw $errorRecord
+ ~~~~~~~~~~~~~~~~~~
HistoryId : -1

HistoryId: 1

Message : Operation cancelled due to security concerns. Use -UseBasicParsing parameter for safe HTML parsing
without script execution.
StackTrace : at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
Exception : System.InvalidOperationException
InvocationInfo : {Invoke-WebRequest}
Line : $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers $headers
-ErrorAction Stop

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:1895
char:27
+ ... $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Operation cancelled due to security concerns. Use -UseBasicParsing parameter for safe HTML parsing
without script execution.
StackTrace : at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
Exception : System.InvalidOperationException
InvocationInfo : {Invoke-WebRequest}
Line : $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers $headers
-ErrorAction Stop

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:1895
char:27
+ ... $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Operation cancelled due to security concerns. Use -UseBasicParsing parameter for safe HTML parsing
without script execution.
StackTrace : at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
Exception : System.InvalidOperationException
InvocationInfo : {Invoke-WebRequest}
Line : $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers $headers
-ErrorAction Stop

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:1895
char:27
+ ... $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Operation cancelled due to security concerns. Use -UseBasicParsing parameter for safe HTML parsing
without script execution.
StackTrace : at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
Exception : System.InvalidOperationException
InvocationInfo : {Invoke-WebRequest}
Line : $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers $headers -body
$params -ErrorAction Stop

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:1899
char:27
+ ... $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Operation cancelled due to security concerns. Use -UseBasicParsing parameter for safe HTML parsing
without script execution.
StackTrace : at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
Exception : System.InvalidOperationException
InvocationInfo : {Invoke-WebRequest}
Line : $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers $headers -body
$params -ErrorAction Stop

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:1899
char:27
+ ... $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Operation cancelled due to security concerns. Use -UseBasicParsing parameter for safe HTML parsing
without script execution.
StackTrace : at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
Exception : System.InvalidOperationException
InvocationInfo : {Invoke-WebRequest}
Line : $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers $headers -body
$params -ErrorAction Stop

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:1899
char:27
+ ... $result = Invoke-WebRequest -Uri $apiEndPoint -Method Get -Headers ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Cannot find a variable with the name 'DefaultFunctionsVersion'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:48
char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Cannot find a variable with the name 'RequiredStorageEndpoints'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:48
char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Cannot find a variable with the name 'ReservedFunctionAppSettingNames'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:48
char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Cannot find a variable with the name 'DefaultCentauriImage'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:48
char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Cannot find a variable with the name 'RuntimeToDefaultOSType'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:48
char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Cannot find a variable with the name 'AllowedStorageTypes'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:48
char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Cannot find a variable with the name 'SetDefaultValueParameterWarningMessage'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:48
char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Cannot find a variable with the name 'DEBUG_PREFIX'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:48
char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Cannot find a variable with the name 'RuntimeToFormattedName'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:48
char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1

Message : Cannot find a variable with the name 'FlexConsumptionSupportedRuntimes'.
StackTrace :
Exception : System.Management.Automation.ItemNotFoundException
InvocationInfo : {Get-Variable}
Line : if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue))

Position : At C:\Program
Files\WindowsPowerShell\Modules\Az.Functions\4.3.1\Functions.Autorest\custom\HelperFunctions.ps1:48
char:15
+ ... if (-not (Get-Variable $variableName -ErrorAction SilentlyContinue) ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing Get-AzFunctionAppFlexConsumptionRuntime -Location 'eastus' and inspect Functions.Autorest/custom/HelperFunctions.ps1 at lines 911, 1895, and 1899. Trace the ARM API retrieval and Invoke-WebRequest errors for DotNet-Isolated; done means the command retrieves the runtime without the reported failure across the affected regions.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
api, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.