Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.26k stars 3.86k forks source link

Get-AzAppConfigurationKeyValue fails with "The 'file' scheme is not supported." #26096

Open avernigora-clgx opened 2 months ago

avernigora-clgx commented 2 months ago

Description

Get-AzAppConfigurationKeyValue fails with "The 'file' scheme is not supported."

image

Issue script & Debug output

Get-AzAppConfigurationKeyValue -endpoint https://xxx.azconfig.io *> cc.txt

<removed sensitive info>
....
    {
      "etag": "fggdfgdfgdf",
      "key": "common:SomeSvc:SpveValueXXX",
      "label": "iii",
      "content_type": null,
      "value": "https://xxx.xxx.com",
      "tags": {},
      "locked": false,
      "last_modified": "2024-09-24T16:49:54+00:00"
    }
  ],
  "@nextLink": "/kv?label=iii&api-version=1.0&after=ldlfglddnknnfnl"
}
 ....

============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
file:///kv%3Flabel=iii&api-version=1.0&after=dsdfsdfsdfdsf
Headers:
x-ms-client-request-id        : dfsdfdfdsfdff
CommandName                   : Get-AzAppConfigurationKeyValue
FullCommandName               : Get-AzAppConfigurationKeyValue_Get
ParameterSetName              : __AllParameterSets
User-Agent                    : AzurePowershell/v0.0.0,PSVersion/v7.4.4,Az.AppConfigurationdata/1.3.2

Body:
....

BeforeCall: 
Finally: 
Finally: 
[CmdletProcessRecordAsyncEnd]: Finish HTTP process
CmdletProcessRecordAsyncEnd: 
[CmdletException]: Received Exception with message 'NotSupportedException - The 'file' scheme is not supported. :    at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next)
   at Microsoft.Azure.Commands.Common.ContextAdapter.AuthenticationHelper(IAzureContext context, String endpointResourceIdKey, String endpointSuffixKey, HttpRequestMessage request, CancellationToken cancelToken, Action cancelAction, Func`4 signal, Func`5 next, Func`6 tokenAudienceConverter)
   at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass10_0.<<AddAuthorizeRequestHandler>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass9_0.<<AddPatchRequestUriHandler>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.onOk(HttpResponseMessage responseMessage, Task`1 response)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues(String syncToken, String acceptDatetime, String key, String label, String after, List`1 Select, String endpoint, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()'
CmdletException: NotSupportedException - The 'file' scheme is not supported. :    at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next)
   at Microsoft.Azure.Commands.Common.ContextAdapter.AuthenticationHelper(IAzureContext context, String endpointResourceIdKey, String endpointSuffixKey, HttpRequestMessage request, CancellationToken cancelToken, Action cancelAction, Func`4 signal, Func`5 next, Func`6 tokenAudienceConverter)
   at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass10_0.<<AddAuthorizeRequestHandler>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass9_0.<<AddPatchRequestUriHandler>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.onOk(HttpResponseMessage responseMessage, Task`1 response)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues(String syncToken, String acceptDatetime, String key, String label, String after, List`1 Select, String endpoint, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()
   at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()
Get-AzAppConfigurationKeyValue_Get: /usr/local/share/powershell/Modules/Az.AppConfiguration/1.3.2/AppConfigurationData.Autorest/exports/ProxyCmdletDefinitions.ps1:1771:9
Line |
1771 |          $steppablePipeline.Begin($PSCmdlet)
     |          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | The 'file' scheme is not supported.

CmdletProcessRecordEnd:

Environment data

Name                           Value
----                           -----
PSVersion                      7.4.4
PSEdition                      Core
GitCommitId                    7.4.4
OS                             Debian GNU/Linux 12 (bookworm)
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

oduleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     3.0.4                 Az.Accounts                         {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault…}
Script     1.3.2                 Az.AppConfiguration                 {Clear-AzAppConfigurationDeletedStore, Get-AzAppConfigurationDeletedStore, Get-AzAppConfigurationKey, Get-AzAppConfigurationKeyValue…}
Script     6.1.0                 Az.KeyVault                         {Add-AzKeyVaultCertificate, Add-AzKeyVaultCertificateContact, Add-AzKeyVaultKey, Add-AzKeyVaultManagedStorageAccount…}

Error output

DEBUG: 7:16:49 PM - [ConfigManager] Got [False] from [DisplaySecretsWarning], Module = [], Cmdlet = [].
DEBUG: 7:16:49 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 7:16:49 PM - using account id 'avernigora@xxx.com'...
DEBUG: 7:16:49 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 7:16:49 PM - [ConfigManager] Got [False] from [DisplaySecretsWarning], Module = [], Cmdlet = [].

   HistoryId: 32

Message        : The 'file' scheme is not supported.
StackTrace     :    at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource 
                 pendingRequestsCts, CancellationToken originalCancellationToken)
                    at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.Retry429(HttpRequestMessage request, IEventListener callback, ISendAsync next)
                    at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Runtime.HttpPipeline.RetryError(HttpRequestMessage request, IEventListener callback, ISendAsync next)
                    at Microsoft.Azure.Commands.Common.ContextAdapter.AuthenticationHelper(IAzureContext context, String endpointResourceIdKey, String endpointSuffixKey, HttpRequestMessage request, CancellationToken 
                 cancelToken, Action cancelAction, Func`4 signal, Func`5 next, Func`6 tokenAudienceConverter)
                    at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass10_0.<<AddAuthorizeRequestHandler>b__0>d.MoveNext()
                 --- End of stack trace from previous location ---
                    at Microsoft.Azure.Commands.Common.ContextAdapter.<>c__DisplayClass9_0.<<AddPatchRequestUriHandler>b__0>d.MoveNext()
                 --- End of stack trace from previous location ---
                    at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
                    at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
                    at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.onOk(HttpResponseMessage responseMessage, Task`1 response)
                    at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
                    at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues_Call(HttpRequestMessage request, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
                    at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.AppConfigurationdata.GetKeyValues(String syncToken, String acceptDatetime, String key, String label, String after, List`1 Select, String 
                 endpoint, Func`3 onOk, Func`3 onDefault, IEventListener eventListener, ISendAsync sender)
                    at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()
                    at Microsoft.Azure.PowerShell.Cmdlets.AppConfigurationdata.Cmdlets.GetAzAppConfigurationKeyValue_Get.ProcessRecordAsync()
Exception      : System.NotSupportedException
InvocationInfo : {Get-AzAppConfigurationKeyValue_Get}
Line           :         $steppablePipeline.Begin($PSCmdlet)

Position       : At /usr/local/share/powershell/Modules/Az.AppConfiguration/1.3.2/AppConfigurationData.Autorest/exports/ProxyCmdletDefinitions.ps1:1771 char:9
                 +         $steppablePipeline.Begin($PSCmdlet)
                 +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 32

DEBUG: 7:16:49 PM - [ConfigManager] Got [False] from [DisplaySecretsWarning], Module = [], Cmdlet = [].
avernigora-clgx commented 1 month ago

Any updates on this, any workarounds?