Azure / azure-cli

Azure Command-Line Interface
MIT License
3.99k stars 2.97k forks source link

[Azure Static Web App] - Failed to update app settings: AppSettings is invalid. {"Error":{"Code":"InvalidAppSettings","Message":"AppSetting with name 'WEBSITES_INTERNAL_FREESKU_SITE' is not allowed.","ExtendedData":null,"Details":null}} #28659

Closed luutrongnghia closed 6 months ago

luutrongnghia commented 6 months ago

Describe the bug

This error occurs when I try to update Environment variables: API_CHAT_URL or when I delete all variables.

Failed to update app settings:
AppSettings is invalid.  {"Error":{"Code":"InvalidAppSettings","Message":"AppSetting with name 'WEBSITES_INTERNAL_FREESKU_SITE' is not allowed.","ExtendedData":null,"Details":null}}

image

Related command

az staticwebapp appsettings set --name swa-staging-1 --setting-names "API_CHAT_URL=https://chat-api.example.com/"

Errors

Failed to update app settings: AppSettings is invalid. {"Error":{"Code":"InvalidAppSettings","Message":"AppSetting with name 'WEBSITES_INTERNAL_FREESKU_SITE' is not allowed.","ExtendedData":null,"Details":null}}

Issue script & Debug output

az staticwebapp appsettings set --name swa-staging-1 --setting-names "API_CHAT_URL=https://chat-api.example.com/" --resource-group staging-rg --debug
cli.knack.cli: Command arguments: ['staticwebapp', 'appsettings', 'set', '--name', 'swa-staging-1', '--setting-names', 'API_CHAT_URL=https://chat-api.example.com/', '--resource-group', 'staging-rg', '--debug']
cli.knack.cli: __init__ debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x104fa4360>, <function OutputProducer.on_global_arguments at 0x10503f4c0>, <function CLIQuery.on_global_arguments at 0x10508cfe0>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'staticwebapp': ['azure.cli.command_modules.appservice']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name                  Load Time    Groups  Commands
cli.azure.cli.core: appservice                0.109        73       260
cli.azure.cli.core: Total (1)                 0.109        73       260
cli.azure.cli.core: Loaded 73 groups, 260 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command  : staticwebapp appsettings set
cli.azure.cli.core: Command table: staticwebapp appsettings set
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x107381580>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/nghia/.azure/commands/2024-03-29.15-22-21.staticwebapp_appsettings_set.2562.log'.
az_command_data_logger: command args: staticwebapp appsettings set --name {} --setting-names {} --resource-group {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument.<locals>.add_subscription_parameter at 0x1073d62a0>]
cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad []
cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument.<locals>.add_ids_arguments at 0x1073d6340>, <function register_cache_arguments.<locals>.add_cache_arguments at 0x1073d6480>]
cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded []
cli.knack.cli: Event: CommandInvoker.OnPreParseArgs []
cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x10503f560>, <function CLIQuery.handle_query_parameter at 0x10508d080>, <function register_ids_argument.<locals>.parse_ids_arguments at 0x1073d63e0>]
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
cli.azure.cli.core.auth.persistence: build_persistence: location='/Users/nghia/.azure/msal_token_cache.json', encrypt=False
cli.azure.cli.core.auth.binary_cache: load: /Users/nghia/.azure/msal_http_cache.bin
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/kerberos', 'tenant_region_scope': 'AS', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? False
cli.azure.cli.core.commands.client_factory: Getting management service client client_type=WebSiteManagementClient
urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None)
msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/discovery/v2.0/keys', 'response_modes_supported': ['query', 'fragment', 'form_post'], 'subject_types_supported': ['pairwise'], 'id_token_signing_alg_values_supported': ['RS256'], 'response_types_supported': ['code', 'id_token', 'code id_token', 'id_token token'], 'scopes_supported': ['openid', 'profile', 'email', 'offline_access'], 'issuer': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/oauth2/v2.0/logout', 'claims_supported': ['sub', 'iss', 'cloud_instance_name', 'cloud_instance_host_name', 'cloud_graph_host_name', 'msgraph_host', 'aud', 'exp', 'iat', 'auth_time', 'acr', 'nonce', 'preferred_username', 'name', 'tid', 'ver', 'at_hash', 'c_hash', 'email'], 'kerberos_endpoint': 'https://login.microsoftonline.com/********-0727-4c71-83f7-ad829a1cc596/kerberos', 'tenant_region_scope': 'AS', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'}
msal.application: Broker enabled? False
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: 55a9d9e1-9c4f-466d-9dd3-b2e4240f238e
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/****....9c67-436f-a35a-b4b1952b57e5/resourceGroups/staging-rg/providers/Microsoft.Web/staticSites/swa-staging-1/listAppSettings?api-version=2023-01-01'
cli.azure.cli.core.sdk.policies: Request method: 'POST'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '76bfdfca-eda5-11ee-be90-26f119a7bd66'
cli.azure.cli.core.sdk.policies:     'CommandName': 'staticwebapp appsettings set'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --setting-names --resource-group --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.57.0 (HOMEBREW) azsdk-python-azure-mgmt-web/7.2.0 Python/3.11.7 (macOS-13.0-arm64-arm-64bit)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: This request has no body
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "POST /subscriptions/****....9c67-436f-a35a-b4b1952b57e5/resourceGroups/staging-rg/providers/Microsoft.Web/staticSites/swa-staging-1/listAppSettings?api-version=2023-01-01 HTTP/1.1" 200 711
cli.azure.cli.core.sdk.policies: Response status: 200
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '711'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'c79b656c-5d0a-4f8c-910a-dc2a608bf555'
cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '1199'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': '2101000f-1095-4fe8-82b6-5d49c954c586'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SOUTHINDIA:20240329T082222Z:2101000f-1095-4fe8-82b6-5d49c954c586'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 3A2BBB4A8A304D4BA0FD4C0545F21A7F Ref B: MAA201060516021 Ref C: 2024-03-29T08:22:21Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Fri, 29 Mar 2024 08:22:22 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"id":"/subscriptions/****....9c67-436f-a35a-b4b1952b57e5/resourceGroups/staging-rg/providers/Microsoft.Web/staticSites/swa-staging-1/config/appsettings","name":"appsettings","type":"Microsoft.Web/staticSites/config","location":"Central US","properties":{"API_AUTH_URL":"https://chat-api.example.com/","API_CHAT_URL":"http://chat-api.example.com/","APPLICATIONINSIGHTS_CONNECTION_STRING":"InstrumentationKey=********-fd09-457f-9210-d36409e20478;IngestionEndpoint=https://centralus-2.in.applicationinsights.azure.com/;LiveEndpoint=https://centralus.livediagnostics.monitor.azure.com/","ApplicationInsightsAgent_EXTENSION_VERSION":"~3","NODE_TLS_REJECT_UNAUTHORIZED":"0"}}
cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={}
cli.azure.cli.core.auth.msal_authentication: UserCredential.get_token: scopes=('https://management.core.windows.net//.default',), claims=None, kwargs={}
msal.application: Cache hit an AT
msal.telemetry: Generate or reuse correlation_id: b1f12fed-7d02-4375-8665-ba63409f1c4a
cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions/****....9c67-436f-a35a-b4b1952b57e5/resourceGroups/staging-rg/providers/Microsoft.Web/staticSites/swa-staging-1/config/appsettings?api-version=2023-01-01'
cli.azure.cli.core.sdk.policies: Request method: 'PUT'
cli.azure.cli.core.sdk.policies: Request headers:
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json'
cli.azure.cli.core.sdk.policies:     'Content-Length': '481'
cli.azure.cli.core.sdk.policies:     'Accept': 'application/json'
cli.azure.cli.core.sdk.policies:     'x-ms-client-request-id': '76bfdfca-eda5-11ee-be90-26f119a7bd66'
cli.azure.cli.core.sdk.policies:     'CommandName': 'staticwebapp appsettings set'
cli.azure.cli.core.sdk.policies:     'ParameterSetName': '--name --setting-names --resource-group --debug'
cli.azure.cli.core.sdk.policies:     'User-Agent': 'AZURECLI/2.57.0 (HOMEBREW) azsdk-python-azure-mgmt-web/7.2.0 Python/3.11.7 (macOS-13.0-arm64-arm-64bit)'
cli.azure.cli.core.sdk.policies:     'Authorization': '*****'
cli.azure.cli.core.sdk.policies: Request body:
cli.azure.cli.core.sdk.policies: {"properties": {"API_AUTH_URL": "https://auth-api.example.com/", "API_CHAT_URL": "https://chat-api.example.com/", "APPLICATIONINSIGHTS_CONNECTION_STRING": "InstrumentationKey=********-fd09-457f-9210-d36409e20478;IngestionEndpoint=https://centralus-2.in.applicationinsights.azure.com/;LiveEndpoint=https://centralus.livediagnostics.monitor.azure.com/", "ApplicationInsightsAgent_EXTENSION_VERSION": "~3", "NODE_TLS_REJECT_UNAUTHORIZED": "0"}}
urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443
urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions/****....9c67-436f-a35a-b4b1952b57e5/resourceGroups/staging-rg/providers/Microsoft.Web/staticSites/swa-staging-1/config/appsettings?api-version=2023-01-01 HTTP/1.1" 400 1017
cli.azure.cli.core.sdk.policies: Response status: 400
cli.azure.cli.core.sdk.policies: Response headers:
cli.azure.cli.core.sdk.policies:     'Cache-Control': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Pragma': 'no-cache'
cli.azure.cli.core.sdk.policies:     'Content-Length': '1017'
cli.azure.cli.core.sdk.policies:     'Content-Type': 'application/json; charset=utf-8'
cli.azure.cli.core.sdk.policies:     'Expires': '-1'
cli.azure.cli.core.sdk.policies:     'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'
cli.azure.cli.core.sdk.policies:     'X-AspNet-Version': '4.0.30319'
cli.azure.cli.core.sdk.policies:     'X-Powered-By': 'ASP.NET'
cli.azure.cli.core.sdk.policies:     'x-ms-ratelimit-remaining-subscription-writes': '1199'
cli.azure.cli.core.sdk.policies:     'x-ms-request-id': 'ea5c98c0-c63d-4c2c-934a-91c3ba261682'
cli.azure.cli.core.sdk.policies:     'x-ms-correlation-request-id': 'ea5c98c0-c63d-4c2c-934a-91c3ba261682'
cli.azure.cli.core.sdk.policies:     'x-ms-routing-request-id': 'SOUTHINDIA:20240329T082224Z:ea5c98c0-c63d-4c2c-934a-91c3ba261682'
cli.azure.cli.core.sdk.policies:     'X-Content-Type-Options': 'nosniff'
cli.azure.cli.core.sdk.policies:     'X-Cache': 'CONFIG_NOCACHE'
cli.azure.cli.core.sdk.policies:     'X-MSEdge-Ref': 'Ref A: 34832CB390F2463B947B8A17144FC839 Ref B: MAA201060513039 Ref C: 2024-03-29T08:22:22Z'
cli.azure.cli.core.sdk.policies:     'Date': 'Fri, 29 Mar 2024 08:22:24 GMT'
cli.azure.cli.core.sdk.policies: Response content:
cli.azure.cli.core.sdk.policies: {"Code":"BadRequest","Message":"AppSettings is invalid.  {\"Error\":{\"Code\":\"InvalidAppSettings\",\"Message\":\"AppSetting with name 'WEBSITES_INTERNAL_FREESKU_SITE' is not allowed.\",\"ExtendedData\":null,\"Details\":null}}","Target":null,"Details":[{"Message":"AppSettings is invalid.  {\"Error\":{\"Code\":\"InvalidAppSettings\",\"Message\":\"AppSetting with name 'WEBSITES_INTERNAL_FREESKU_SITE' is not allowed.\",\"ExtendedData\":null,\"Details\":null}}"},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"51021","MessageTemplate":"{0} is invalid.  {1}","Parameters":["AppSettings","{\"Error\":{\"Code\":\"InvalidAppSettings\",\"Message\":\"AppSetting with name 'WEBSITES_INTERNAL_FREESKU_SITE' is not allowed.\",\"ExtendedData\":null,\"Details\":null}}"],"Code":"BadRequest","Message":"AppSettings is invalid.  {\"Error\":{\"Code\":\"InvalidAppSettings\",\"Message\":\"AppSetting with name 'WEBSITES_INTERNAL_FREESKU_SITE' is not allowed.\",\"ExtendedData\":null,\"Details\":null}}"}}],"Innererror":null}
cli.azure.cli.core.azclierror: Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 664, in execute
    raise ex
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 729, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 698, in _run_job
    result = cmd_copy(params)
             ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/__init__.py", line 334, in __call__
    return self.handler(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
           ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/command_modules/appservice/static_sites.py", line 302, in set_staticsite_app_settings
    result = client.create_or_update_static_site_app_settings(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/core/tracing/decorator.py", line 76, in wrapper_use_tracer
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/mgmt/web/v2023_01_01/operations/_static_sites_operations.py", line 6837, in create_or_update_static_site_app_settings
    raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Bad Request'
Content: {"Code":"BadRequest","Message":"AppSettings is invalid.  {\"Error\":{\"Code\":\"InvalidAppSettings\",\"Message\":\"AppSetting with name 'WEBSITES_INTERNAL_FREESKU_SITE' is not allowed.\",\"ExtendedData\":null,\"Details\":null}}","Target":null,"Details":[{"Message":"AppSettings is invalid.  {\"Error\":{\"Code\":\"InvalidAppSettings\",\"Message\":\"AppSetting with name 'WEBSITES_INTERNAL_FREESKU_SITE' is not allowed.\",\"ExtendedData\":null,\"Details\":null}}"},{"Code":"BadRequest"},{"ErrorEntity":{"ExtendedCode":"51021","MessageTemplate":"{0} is invalid.  {1}","Parameters":["AppSettings","{\"Error\":{\"Code\":\"InvalidAppSettings\",\"Message\":\"AppSetting with name 'WEBSITES_INTERNAL_FREESKU_SITE' is not allowed.\",\"ExtendedData\":null,\"Details\":null}}"],"Code":"BadRequest","Message":"AppSettings is invalid.  {\"Error\":{\"Code\":\"InvalidAppSettings\",\"Message\":\"AppSetting with name 'WEBSITES_INTERNAL_FREESKU_SITE' is not allowed.\",\"ExtendedData\":null,\"Details\":null}}"}}],"Innererror":null}

cli.azure.cli.core.azclierror: Operation returned an invalid status 'Bad Request'
az_command_data_logger: Operation returned an invalid status 'Bad Request'
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x107381800>]
az_command_data_logger: exit code: 1
cli.__main__: Command ran in 3.677 seconds (init: 0.096, invoke: 3.581)
cli.azure.cli.core.decorators: Suppress exception:
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/__main__.py", line 62, in <module>
    raise ex
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/__main__.py", line 55, in <module>
    sys.exit(exit_code)
SystemExit: 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/decorators.py", line 79, in _wrapped_func
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/core/telemetry.py", line 532, in _get_secrets_warning_config
    show_secrets_warning = _get_config().getboolean('clients', 'show_secrets_warning', fallback=None)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/knack/config.py", line 147, in getboolean
    raise ValueError('Not a boolean: {}'.format(val))
ValueError: Not a boolean: None

telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 3610 in cache
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/bin/python /opt/homebrew/Cellar/azure-cli/2.57.0/libexec/lib/python3.11/site-packages/azure/cli/telemetry/__init__.py /Users/nghia/.azure"
telemetry.process: Return from creating process
telemetry.main: Finish creating telemetry upload process.

Expected behavior

Update successfully.

Environment Summary

azure-cli 2.57.0 *

core 2.57.0 * telemetry 1.1.0

Dependencies: msal 1.26.0 azure-mgmt-resource 23.1.0b2

Python location '/opt/homebrew/Cellar/azure-cli/2.57.0/libexec/bin/python' Extensions directory '/Users/nghia/.azure/cliextensions'

Python (Darwin) 3.11.7 (main, Dec 4 2023, 18:10:11) [Clang 15.0.0 (clang-1500.1.0.2.5)]

Additional context

No response

azure-client-tools-bot-prd[bot] commented 6 months ago

Hi @luutrongnghia,

2.57.0 is not the latest Azure CLI(2.58.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

yonzhan commented 6 months ago

Thank you for opening this issue, we will look into it.

bertrand-riviere commented 6 months ago

Hello, I have the exact same error when I try to add/edit/remove any env variable in my Static Web App (NextJs) (Even using the Azure Portal UI)

annina-k commented 6 months ago

Hi everyone, the issue stemmed from an issue on the Azure Static Web Apps side and has now been fixed. Thanks for your patience.

luutrongnghia commented 6 months ago

This issue has been resolved. Thanks for your support.

grajdeanserghei commented 6 months ago

We still face this issue. The first time we noticed it was on Friday on one of our Static Web App, but it disappeared on Friday evening (European time). Today we face this issue on a different Static Web App. We tried from both Azure Portal and Azure CLI and the result is the same.