Azure / azure-cli

Azure Command-Line Interface
MIT License
3.94k stars 2.92k forks source link

az notification-hub credential apns update returns "ERROR: ResourceNotFoundError" | same for google gcm #27080

Open ChrWeinert opened 1 year ago

ChrWeinert commented 1 year ago

Describe the bug

Our Deployment Pipeline stops working two weeks ago. During the deployment we are updating the Azure notification hub credentials for Apple and Google. This works fine, but since two weeks the Task failes and returns with "ERROR: ResourceNotFoundError".

This is part of our inline-script called by a AzureCLI@2 task;

az config set extension.use_dynamic_install=yes_without_prompt

az notification-hub credential apns update --namespace-name "$(armOutputs.notificationHubNamespaceName)" --notification-hub-name "$(armOutputs.notificationHubName)" --resource-group "$(resourceGroupName)" --app-id "$(applePushTeamId)" --app-name "$(applePushBundleId)" --endpoint "$(applePushEndpoint)" --key-id "$(applePushKeyId)" --token "$(applePushToken)"

The output looks like this:

Install Notification-Hub Extentions...
WARNING: Command group 'config' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Done.
-----------------------------------------------
Setting Apple Push Norification Service (APNS)...
WARNING: This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
ERROR: ResourceNotFoundError
Done.

We deleted the existing credentials and run the pipeline again. The credentials will be created as expected, but the Task still returns the error. We changes the output to debug and the put request shows a status code 200, but the command returns "ERROR: ResourceNotFoundError".

Related command

az notification-hub credential apns update --namespace-name "$(armOutputs.notificationHubNamespaceName)" --notification-hub-name "$(armOutputs.notificationHubName)" --resource-group "$(resourceGroupName)" --app-id "$(applePushTeamId)" --app-name "$(applePushBundleId)" --endpoint "$(applePushEndpoint)" --key-id "$(applePushKeyId)" --token "$(applePushToken)"

Errors

Setting Apple Push Norification Service (APNS)... WARNING: This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus ERROR: ResourceNotFoundError Done.

Issue script & Debug output

2023-08-03T06:42:16.7575423Z ##[section]Starting: Set Push Notification Credentials for NotificationHub 2023-08-03T06:42:16.7580866Z ============================================================================== 2023-08-03T06:42:16.7581044Z Task : Azure CLI 2023-08-03T06:42:16.7581156Z Description : Run Azure CLI commands against an Azure subscription in a PowerShell Core/Shell script when running on Linux agent or PowerShell/PowerShell Core/Batch script when running on Windows agent. 2023-08-03T06:42:16.7581451Z Version : 2.225.0 2023-08-03T06:42:16.7581543Z Author : Microsoft Corporation 2023-08-03T06:42:16.7581667Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/deploy/azure-cli 2023-08-03T06:42:16.7581819Z ============================================================================== 2023-08-03T06:42:17.0752288Z [command]/usr/bin/az --version 2023-08-03T06:42:17.8659223Z WARNING: You have 3 update(s) available. Consider updating your CLI installation with 'az upgrade' 2023-08-03T06:42:17.8659775Z azure-cli 2.50.0 2023-08-03T06:42:17.8660283Z 2023-08-03T06:42:17.8660709Z core 2.50.0 2023-08-03T06:42:17.8661024Z telemetry 1.0.8 * 2023-08-03T06:42:17.8661212Z 2023-08-03T06:42:17.8661481Z Extensions: 2023-08-03T06:42:17.8661852Z azure-devops 0.26.0 2023-08-03T06:42:17.8662054Z 2023-08-03T06:42:17.8662314Z Dependencies: 2023-08-03T06:42:17.8662611Z msal 1.22.0 2023-08-03T06:42:17.8662980Z azure-mgmt-resource 23.1.0b2 2023-08-03T06:42:17.8663179Z 2023-08-03T06:42:17.8663532Z Python location '/opt/az/bin/python3' 2023-08-03T06:42:17.8663957Z Extensions directory '/opt/az/azcliextensions' 2023-08-03T06:42:17.8664175Z 2023-08-03T06:42:17.8664534Z Python (Linux) 3.10.10 (main, Jun 29 2023, 11:09:14) [GCC 11.3.0] 2023-08-03T06:42:17.8664781Z 2023-08-03T06:42:17.8665094Z Legal docs and information: aka.ms/AzureCliLegal 2023-08-03T06:42:17.8665296Z 2023-08-03T06:42:17.8665450Z 2023-08-03T06:42:17.8680592Z Setting AZURE_CONFIG_DIR env variable to: /home/vsts/work/_temp/.azclitask 2023-08-03T06:42:17.8685867Z Setting active cloud to: AzureCloud 2023-08-03T06:42:17.8697454Z [command]/usr/bin/az cloud set -n AzureCloud 2023-08-03T06:42:20.1359522Z [command]/usr/bin/az login --service-principal -u --password= --tenant --allow-no-subscriptions 2023-08-03T06:42:21.0205273Z [ 2023-08-03T06:42:21.0205937Z { 2023-08-03T06:42:21.0206938Z "cloudName": "AzureCloud", 2023-08-03T06:42:21.0207772Z "homeTenantId": "", 2023-08-03T06:42:21.0208383Z "id": "", 2023-08-03T06:42:21.0209047Z "isDefault": true, 2023-08-03T06:42:21.0209609Z "managedByTenants": [], 2023-08-03T06:42:21.0212813Z "name": "XXX", 2023-08-03T06:42:21.0213255Z "state": "Enabled", 2023-08-03T06:42:21.0213878Z "tenantId": "", 2023-08-03T06:42:21.0267994Z "user": { 2023-08-03T06:42:21.0268547Z "name": "*", 2023-08-03T06:42:21.0268782Z "type": "servicePrincipal" 2023-08-03T06:42:21.0268996Z } 2023-08-03T06:42:21.0269185Z } 2023-08-03T06:42:21.0269355Z ] 2023-08-03T06:42:21.0275019Z [command]/usr/bin/az account set --subscription 2023-08-03T06:42:21.3891842Z [command]/usr/bin/pwsh -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command . '/home/vsts/work/_temp/azureclitaskscript1691044937069.ps1' 2023-08-03T06:42:22.3612530Z Install Notification-Hub Extentions... 2023-08-03T06:42:22.5903598Z WARNING: Command group 'config' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus 2023-08-03T06:42:22.7138023Z Done. 2023-08-03T06:42:22.7139043Z ----------------------------------------------- 2023-08-03T06:42:22.7139669Z Setting Apple Push Norification Service (APNS)... 2023-08-03T06:42:22.9338605Z DEBUG: cli.knack.cli: Command arguments: ['notification-hub', 'credential', 'apns', 'update', '--namespace-name', '', '--notification-hub-name', '', '--resource-group', '', '--app-id', '', '--app-name', '', '--endpoint', 'https://api.push.apple.com:443/3/device', '--key-id', '', '--token', '', '--debug'] 2023-08-03T06:42:22.9340502Z DEBUG: cli.knack.cli: init debug log: 2023-08-03T06:42:22.9341126Z Cannot enable color. 2023-08-03T06:42:22.9341560Z DEBUG: cli.knack.cli: Event: Cli.PreExecute [] 2023-08-03T06:42:22.9346097Z DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f39d0c41360>, <function OutputProducer.on_global_arguments at 0x7f39d0998280>, <function CLIQuery.on_global_arguments at 0x7f39d09bd480>] 2023-08-03T06:42:22.9355686Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] 2023-08-03T06:42:22.9362216Z DEBUG: cli.azure.cli.core: No module found from index for '['notification-hub', 'credential', 'apns', 'update', '--namespace-name', '', '--notification-hub-name', '', '--resource-group', '', '--app-id', '', '--app-name', '', '--endpoint', 'https://api.push.apple.com:443/3/device', '--key-id', '', '--token', '', '--debug']' 2023-08-03T06:42:22.9369549Z DEBUG: cli.azure.cli.core: Loading all modules and extensions 2023-08-03T06:42:22.9403061Z DEBUG: cli.azure.cli.core: Discovered command modules: ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'config', 'configure', 'consumption', 'container', 'cosmosdb', 'databoxedge', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'kusto', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', 'mysql', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'resource', 'role', 'search', 'security', 'servicebus', 'serviceconnector', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'synapse', 'util', 'vm'] 2023-08-03T06:42:22.9404382Z DEBUG: cli.azure.cli.core: Loading command modules: 2023-08-03T06:42:22.9404934Z DEBUG: cli.azure.cli.core: Name Load Time Groups Commands 2023-08-03T06:42:23.0434802Z DEBUG: cli.azure.cli.core: acr 0.103 34 144 2023-08-03T06:42:23.0603653Z DEBUG: cli.azure.cli.core: acs 0.017 6 48 2023-08-03T06:42:23.0614021Z DEBUG: cli.azure.cli.core: advisor 0.001 3 6 2023-08-03T06:42:23.0667197Z DEBUG: cli.azure.cli.core: ams 0.005 22 100 2023-08-03T06:42:23.0715783Z DEBUG: cli.azure.cli.core: apim 0.005 14 68 2023-08-03T06:42:23.0743638Z DEBUG: cli.azure.cli.core: appconfig 0.003 9 47 2023-08-03T06:42:23.1308059Z DEBUG: cli.azure.cli.core: appservice 0.056 73 260 2023-08-03T06:42:23.1379619Z DEBUG: cli.azure.cli.core: aro 0.007 1 9 2023-08-03T06:42:23.1417338Z DEBUG: cli.azure.cli.core: backup 0.004 16 58 2023-08-03T06:42:23.1659499Z DEBUG: cli.azure.cli.core: batch 0.024 36 104 2023-08-03T06:42:23.1683236Z DEBUG: cli.azure.cli.core: batchai 0.002 10 30 2023-08-03T06:42:23.1734561Z DEBUG: cli.azure.cli.core: billing 0.005 19 52 2023-08-03T06:42:23.1765153Z DEBUG: cli.azure.cli.core: botservice 0.003 12 42 2023-08-03T06:42:23.1830133Z DEBUG: cli.azure.cli.core: cdn 0.006 39 133 2023-08-03T06:42:23.1842319Z DEBUG: cli.azure.cli.core: cloud 0.001 1 7 2023-08-03T06:42:23.1861166Z DEBUG: cli.azure.cli.core: cognitiveservices 0.002 8 31 2023-08-03T06:42:23.1871679Z DEBUG: cli.azure.cli.core: config 0.001 2 7 2023-08-03T06:42:23.1879647Z DEBUG: cli.azure.cli.core: configure 0.001 2 5 2023-08-03T06:42:23.1907531Z DEBUG: cli.azure.cli.core: consumption 0.003 8 9 2023-08-03T06:42:23.1965896Z DEBUG: cli.azure.cli.core: container 0.006 1 11 2023-08-03T06:42:23.2068752Z DEBUG: cli.azure.cli.core: cosmosdb 0.010 57 191 2023-08-03T06:42:23.2101386Z DEBUG: cli.azure.cli.core: databoxedge 0.003 5 27 2023-08-03T06:42:23.2135387Z DEBUG: cli.azure.cli.core: dla 0.003 23 62 2023-08-03T06:42:23.2160650Z DEBUG: cli.azure.cli.core: dls 0.002 7 41 2023-08-03T06:42:23.2177538Z DEBUG: cli.azure.cli.core: dms 0.002 3 22 2023-08-03T06:42:23.2234065Z DEBUG: cli.azure.cli.core: eventgrid 0.006 25 96 2023-08-03T06:42:23.2295025Z DEBUG: cli.azure.cli.core: eventhubs 0.006 12 18 2023-08-03T06:42:23.2303135Z DEBUG: cli.azure.cli.core: extension 0.001 1 7 2023-08-03T06:42:23.2308833Z DEBUG: cli.azure.cli.core: feedback 0.001 1 2 2023-08-03T06:42:23.2315433Z DEBUG: cli.azure.cli.core: find 0.001 1 1 2023-08-03T06:42:23.2358982Z DEBUG: cli.azure.cli.core: hdinsight 0.004 8 39 2023-08-03T06:42:23.2373798Z DEBUG: cli.azure.cli.core: identity 0.001 2 11 2023-08-03T06:42:23.2377095Z DEBUG: cli.azure.cli.core: interactive 0.000 1 1 2023-08-03T06:42:23.3123679Z DEBUG: cli.azure.cli.core: iot 0.074 19 82 2023-08-03T06:42:23.3205882Z DEBUG: cli.azure.cli.core: keyvault 0.008 22 131 2023-08-03T06:42:23.3219847Z DEBUG: cli.azure.cli.core: kusto 0.002 3 14 2023-08-03T06:42:23.3259904Z DEBUG: cli.azure.cli.core: lab 0.004 11 34 2023-08-03T06:42:23.3270140Z DEBUG: cli.azure.cli.core: managedservices 0.001 3 8 2023-08-03T06:42:23.3283366Z DEBUG: cli.azure.cli.core: maps 0.001 5 13 2023-08-03T06:42:23.3300502Z DEBUG: cli.azure.cli.core: marketplaceordering 0.002 1 2 2023-08-03T06:42:23.3557848Z DEBUG: cli.azure.cli.core: monitor 0.025 26 80 2023-08-03T06:42:23.5058752Z DEBUG: cli.azure.cli.core: mysql 0.150 13 47 2023-08-03T06:42:23.5112097Z DEBUG: cli.azure.cli.core: netappfiles 0.005 17 94 2023-08-03T06:42:23.9192512Z DEBUG: cli.azure.cli.core: network 0.408 103 336 2023-08-03T06:42:23.9280652Z DEBUG: cli.azure.cli.core: policyinsights 0.009 9 17 2023-08-03T06:42:23.9317983Z DEBUG: cli.azure.cli.core: privatedns 0.004 14 66 2023-08-03T06:42:23.9329152Z DEBUG: cli.azure.cli.core: profile 0.001 2 9 2023-08-03T06:42:23.9504635Z DEBUG: cli.azure.cli.core: rdbms 0.017 44 185 2023-08-03T06:42:23.9523092Z DEBUG: cli.azure.cli.core: redis 0.002 5 27 2023-08-03T06:42:23.9546466Z DEBUG: cli.azure.cli.core: relay 0.002 10 37 2023-08-03T06:42:23.9681678Z DEBUG: cli.azure.cli.core: resource 0.013 51 224 2023-08-03T06:42:23.9710070Z DEBUG: cli.azure.cli.core: role 0.003 17 61 2023-08-03T06:42:23.9727063Z DEBUG: cli.azure.cli.core: search 0.002 7 22 2023-08-03T06:42:23.9787734Z DEBUG: cli.azure.cli.core: security 0.006 48 104 2023-08-03T06:42:23.9847175Z DEBUG: cli.azure.cli.core: servicebus 0.006 13 15 2023-08-03T06:42:24.0027768Z DEBUG: cli.azure.cli.core: serviceconnector 0.018 8 129 2023-08-03T06:42:24.0122989Z DEBUG: cli.azure.cli.core: servicefabric 0.010 27 76 2023-08-03T06:42:24.0142240Z DEBUG: cli.azure.cli.core: signalr 0.002 8 30 2023-08-03T06:42:24.0301184Z DEBUG: cli.azure.cli.core: sql 0.016 57 215 2023-08-03T06:42:24.0411908Z DEBUG: cli.azure.cli.core: sqlvm 0.011 4 20 2023-08-03T06:42:24.0890415Z DEBUG: cli.azure.cli.core: storage 0.047 58 272 2023-08-03T06:42:24.1019643Z DEBUG: cli.azure.cli.core: synapse 0.013 54 246 2023-08-03T06:42:24.1026977Z DEBUG: cli.azure.cli.core: util 0.001 3 7 2023-08-03T06:42:24.2242136Z DEBUG: cli.azure.cli.core: vm 0.121 58 264 2023-08-03T06:42:24.2249708Z DEBUG: cli.azure.cli.core: Total (64) 1.277 1182 4556 2023-08-03T06:42:24.2250236Z DEBUG: cli.azure.cli.core: Loading extensions: 2023-08-03T06:42:24.2250601Z DEBUG: cli.azure.cli.core: Name Load Time Groups Commands Directory 2023-08-03T06:42:24.2839375Z DEBUG: cli.azure.cli.core: azure-devops 0.058 60 192 /opt/az/azcliextensions/azure-devops 2023-08-03T06:42:24.2839926Z DEBUG: cli.azure.cli.core: Total (1) 0.058 60 192
2023-08-03T06:42:24.2840285Z DEBUG: cli.azure.cli.core: Loaded 1231 groups, 4748 commands. 2023-08-03T06:42:24.2905008Z DEBUG: cli.azure.cli.core: Updated command index in 0.006 seconds. 2023-08-03T06:42:24.2905511Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f39cf96ed40>] 2023-08-03T06:42:24.2934114Z DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/vsts/work/_temp/.azclitask/commands/2023-08-03.06-42-24.unknown_command.2124.log'. 2023-08-03T06:42:24.2935073Z INFO: az_command_data_logger: command args: notification-hub credential apns update --namespace-name {} --notification-hub-name {} --resource-group {} --app-id {} --app-name {} --endpoint {} --key-id {} --token {} --debug 2023-08-03T06:42:24.2987142Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f39cf993880>] 2023-08-03T06:42:24.3008677Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] 2023-08-03T06:42:24.3009238Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f39cf9d17e0>, <function register_cache_arguments..add_cache_arguments at 0x7f39cf9d1900>] 2023-08-03T06:42:24.3826155Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] 2023-08-03T06:42:24.3826862Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7f39cea608b0>] 2023-08-03T06:42:24.3836625Z DEBUG: cli.knack.prompting: No tty available. 2023-08-03T06:42:24.3837150Z INFO: cli.azure.cli.core._session: Failed to load or parse file /home/vsts/work/_temp/.azclitask/extensionCommandTree.json. It will be overridden by default settings. 2023-08-03T06:42:24.3862077Z DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443 2023-08-03T06:42:24.5015049Z DEBUG: urllib3.connectionpool: https://aka.ms:443 "GET /azExtCmdTree HTTP/1.1" 301 0 2023-08-03T06:42:24.5039708Z DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): azurecliextensionsync.blob.core.windows.net:443 2023-08-03T06:42:25.0434268Z DEBUG: urllib3.connectionpool: https://azurecliextensionsync.blob.core.windows.net:443 "GET /cmd-index/extensionCommandTree.json HTTP/1.1" 200 143706 2023-08-03T06:42:25.4021658Z WARNING: cli.azure.cli.core.extension.dynamic_install: The command requires the extension notification-hub. It will be installed first. 2023-08-03T06:42:25.4036510Z DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): aka.ms:443 2023-08-03T06:42:25.4890848Z DEBUG: urllib3.connectionpool: https://aka.ms:443 "GET /azure-cli-extension-index-v1 HTTP/1.1" 301 0 2023-08-03T06:42:25.4908599Z DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): azcliextensionsync.blob.core.windows.net:443 2023-08-03T06:42:26.1643181Z DEBUG: urllib3.connectionpool: https://azcliextensionsync.blob.core.windows.net:443 "GET /index1/index.json HTTP/1.1" 200 3072370 2023-08-03T06:42:28.1764081Z DEBUG: cli.azure.cli.core.extension._resolve: Candidates ['notification_hub-0.1.0-py2.py3-none-any.whl', 'notification_hub-0.2.0-py3-none-any.whl', 'notification_hub-1.0.0a1-py3-none-any.whl'] 2023-08-03T06:42:28.1764976Z DEBUG: cli.azure.cli.core.extension._resolve: Candidates ['notification_hub-0.1.0-py2.py3-none-any.whl', 'notification_hub-0.2.0-py3-none-any.whl', 'notification_hub-1.0.0a1-py3-none-any.whl'] 2023-08-03T06:42:28.1765714Z DEBUG: cli.azure.cli.core.extension._resolve: Candidates ['notification_hub-0.1.0-py2.py3-none-any.whl', 'notification_hub-0.2.0-py3-none-any.whl', 'notification_hub-1.0.0a1-py3-none-any.whl'] 2023-08-03T06:42:28.1770435Z DEBUG: cli.azure.cli.core.extension._resolve: Candidates ['notification_hub-0.1.0-py2.py3-none-any.whl', 'notification_hub-0.2.0-py3-none-any.whl', 'notification_hub-1.0.0a1-py3-none-any.whl'] 2023-08-03T06:42:28.1773399Z DEBUG: cli.azure.cli.core.extension._resolve: Chosen {'downloadUrl': 'https://azcliprod.blob.core.windows.net/cli-extensions/notification_hub-1.0.0a1-py3-none-any.whl', 'filename': 'notification_hub-1.0.0a1-py3-none-any.whl', 'metadata': {'azext.minCliCoreVersion': '2.49.0', 'classifiers': ['Development Status :: 4 - Beta', 'Intended Audience :: Developers', 'Intended Audience :: System Administrators', 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License'], 'extensions': {'python.details': {'contacts': [{'email': 'azpycli@microsoft.com', 'name': 'Microsoft Corporation', 'role': 'author'}], 'document_names': {'description': 'DESCRIPTION.rst'}, 'project_urls': {'Home': 'https://github.com/Azure/azure-cli-extensions/tree/main/src/notification-hub'}}}, 'generator': 'bdist_wheel (0.30.0)', 'license': 'MIT', 'metadata_version': '2.0', 'name': 'notification-hub', 'summary': 'Microsoft Azure Command-Line Tools Notification Hub Extension', 'version': '1.0.0a1'}, 'sha256Digest': 'a03751b715700e0d18a38e808bfeed164335024c9608c4bfd53aeacc731d1099'} 2023-08-03T06:42:28.1782619Z DEBUG: cli.azure.cli.core.extension.operations: Extension source is url? True 2023-08-03T06:42:28.1788483Z DEBUG: cli.azure.cli.core.extension.operations: Downloading https://azcliprod.blob.core.windows.net/cli-extensions/notification_hub-1.0.0a1-py3-none-any.whl to /tmp/tmpdrpwefs3/notification_hub-1.0.0a1-py3-none-any.whl 2023-08-03T06:42:28.1808174Z DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): azcliprod.blob.core.windows.net:443 2023-08-03T06:42:28.8677951Z DEBUG: urllib3.connectionpool: https://azcliprod.blob.core.windows.net:443 "GET /cli-extensions/notification_hub-1.0.0a1-py3-none-any.whl HTTP/1.1" 200 176630 2023-08-03T06:42:29.4389167Z DEBUG: cli.azure.cli.core.extension.operations: Downloaded to /tmp/tmpdrpwefs3/notification_hub-1.0.0a1-py3-none-any.whl 2023-08-03T06:42:29.4390842Z DEBUG: cli.azure.cli.core.extension.operations: Validating the extension /tmp/tmpdrpwefs3/notification_hub-1.0.0a1-py3-none-any.whl 2023-08-03T06:42:29.4397763Z DEBUG: cli.azure.cli.core.extension.operations: Checksum of /tmp/tmpdrpwefs3/notification_hub-1.0.0a1-py3-none-any.whl is OK 2023-08-03T06:42:29.4641317Z DEBUG: cli.azure.cli.core.extension.operations: Validation successful on /tmp/tmpdrpwefs3/notification_hub-1.0.0a1-py3-none-any.whl 2023-08-03T06:42:29.4642382Z DEBUG: cli.azure.cli.core.extension.operations: Linux distro check: Reading from: /etc/apt/sources.list.d/azure-cli.list 2023-08-03T06:42:29.4648501Z DEBUG: cli.azure.cli.core.extension.operations: Linux distro check: An error occurred while checking linux distribution version source list consistency. 2023-08-03T06:42:29.4649606Z DEBUG: cli.azure.cli.core.extension.operations: [Errno 2] No such file or directory: '/etc/apt/sources.list.d/azure-cli.list' 2023-08-03T06:42:29.4650550Z DEBUG: cli.azure.cli.core.extension.operations: Executing pip with args: ['install', '--target', '/opt/az/azcliextensions/notification-hub', '/tmp/tmpdrpwefs3/notification_hub-1.0.0a1-py3-none-any.whl'] 2023-08-03T06:42:29.4652877Z DEBUG: cli.azure.cli.core.extension.operations: Running: ['/usr/bin/../../opt/az/bin/python3', '-m', 'pip', 'install', '--target', '/opt/az/azcliextensions/notification-hub', '/tmp/tmpdrpwefs3/notification_hub-1.0.0a1-py3-none-any.whl', '-vv', '--disable-pip-version-check', '--no-cache-dir'] 2023-08-03T06:42:31.1039412Z DEBUG: cli.azure.cli.core.extension.operations: Using pip 23.1.2 from /opt/az/lib/python3.10/site-packages/pip (python 3.10) 2023-08-03T06:42:31.1040440Z Non-user install due to --prefix or --target option 2023-08-03T06:42:31.1041569Z Created temporary directory: /tmp/pip-target-xagdpokp 2023-08-03T06:42:31.1042060Z Created temporary directory: /tmp/pip-build-tracker-o2hpzejd 2023-08-03T06:42:31.1042478Z Initialized build tracking at /tmp/pip-build-tracker-o2hpzejd 2023-08-03T06:42:31.1042946Z Created build tracker: /tmp/pip-build-tracker-o2hpzejd 2023-08-03T06:42:31.1043328Z Entered build tracker: /tmp/pip-build-tracker-o2hpzejd 2023-08-03T06:42:31.1043694Z Created temporary directory: /tmp/pip-install-c43tksay 2023-08-03T06:42:31.1044117Z Created temporary directory: /tmp/pip-ephem-wheel-cache-7cc7lqfe 2023-08-03T06:42:31.1044533Z Processing /tmp/tmpdrpwefs3/notification_hub-1.0.0a1-py3-none-any.whl 2023-08-03T06:42:31.1045126Z Added notification-hub==1.0.0a1 from file:///tmp/tmpdrpwefs3/notification_hub-1.0.0a1-py3-none-any.whl to build tracker '/tmp/pip-build-tracker-o2hpzejd' 2023-08-03T06:42:31.1045796Z Removed notification-hub==1.0.0a1 from file:///tmp/tmpdrpwefs3/notification_hub-1.0.0a1-py3-none-any.whl from build tracker '/tmp/pip-build-tracker-o2hpzejd' 2023-08-03T06:42:31.1046263Z Created temporary directory: /tmp/pip-unpack-116jwte4 2023-08-03T06:42:31.1046565Z Installing collected packages: notification-hub 2023-08-03T06:42:31.1046695Z 2023-08-03T06:42:31.1046994Z Successfully installed notification-hub-1.0.0a1 2023-08-03T06:42:31.1047374Z Removed build tracker: '/tmp/pip-build-tracker-o2hpzejd' 2023-08-03T06:42:31.1047509Z 2023-08-03T06:42:31.1067948Z DEBUG: cli.azure.cli.core.extension.operations: Saved the whl to /opt/az/azcliextensions/notification-hub/notification_hub-1.0.0a1-py3-none-any.whl 2023-08-03T06:42:31.1096681Z DEBUG: cli.azure.cli.core: Command index has been invalidated. 2023-08-03T06:42:31.3304753Z DEBUG: cli.knack.cli: Command arguments: ['notification-hub', 'credential', 'apns', 'update', '--namespace-name', '', '--notification-hub-name', '', '--resource-group', '', '--app-id', '', '--app-name', '', '--endpoint', 'https://api.push.apple.com:443/3/device', '--key-id', '', '--token', '', '--debug'] 2023-08-03T06:42:31.3306494Z DEBUG: cli.knack.cli: init debug log: 2023-08-03T06:42:31.3307508Z Cannot enable color. 2023-08-03T06:42:31.3307826Z DEBUG: cli.knack.cli: Event: Cli.PreExecute [] 2023-08-03T06:42:31.3315442Z DEBUG: cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x7f778ef5d360>, <function OutputProducer.on_global_arguments at 0x7f778ecbc280>, <function CLIQuery.on_global_arguments at 0x7f778ece1480>] 2023-08-03T06:42:31.3330757Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate [] 2023-08-03T06:42:31.3339239Z DEBUG: cli.azure.cli.core: Command index version or cloud profile is invalid or doesn't match the current command. 2023-08-03T06:42:31.3350342Z DEBUG: cli.azure.cli.core: Command index has been invalidated. 2023-08-03T06:42:31.3352375Z DEBUG: cli.azure.cli.core: No module found from index for '['notification-hub', 'credential', 'apns', 'update', '--namespace-name', '', '--notification-hub-name', '', '--resource-group', '', '--app-id', '', '--app-name', '', '--endpoint', 'https://api.push.apple.com:443/3/device', '--key-id', '', '--token', '', '--debug']' 2023-08-03T06:42:31.3353534Z DEBUG: cli.azure.cli.core: Loading all modules and extensions 2023-08-03T06:42:31.3396188Z DEBUG: cli.azure.cli.core: Discovered command modules: ['acr', 'acs', 'advisor', 'ams', 'apim', 'appconfig', 'appservice', 'aro', 'backup', 'batch', 'batchai', 'billing', 'botservice', 'cdn', 'cloud', 'cognitiveservices', 'config', 'configure', 'consumption', 'container', 'cosmosdb', 'databoxedge', 'dla', 'dls', 'dms', 'eventgrid', 'eventhubs', 'extension', 'feedback', 'find', 'hdinsight', 'identity', 'interactive', 'iot', 'keyvault', 'kusto', 'lab', 'managedservices', 'maps', 'marketplaceordering', 'monitor', 'mysql', 'netappfiles', 'network', 'policyinsights', 'privatedns', 'profile', 'rdbms', 'redis', 'relay', 'resource', 'role', 'search', 'security', 'servicebus', 'serviceconnector', 'servicefabric', 'signalr', 'sql', 'sqlvm', 'storage', 'synapse', 'util', 'vm'] 2023-08-03T06:42:31.3397844Z DEBUG: cli.azure.cli.core: Loading command modules: 2023-08-03T06:42:31.3398812Z DEBUG: cli.azure.cli.core: Name Load Time Groups Commands 2023-08-03T06:42:31.4437443Z DEBUG: cli.azure.cli.core: acr 0.104 34 144 2023-08-03T06:42:31.4607615Z DEBUG: cli.azure.cli.core: acs 0.017 6 48 2023-08-03T06:42:31.4617203Z DEBUG: cli.azure.cli.core: advisor 0.001 3 6 2023-08-03T06:42:31.4673302Z DEBUG: cli.azure.cli.core: ams 0.005 22 100 2023-08-03T06:42:31.4721719Z DEBUG: cli.azure.cli.core: apim 0.005 14 68 2023-08-03T06:42:31.4751199Z DEBUG: cli.azure.cli.core: appconfig 0.003 9 47 2023-08-03T06:42:31.5318666Z DEBUG: cli.azure.cli.core: appservice 0.057 73 260 2023-08-03T06:42:31.5394617Z DEBUG: cli.azure.cli.core: aro 0.007 1 9 2023-08-03T06:42:31.5432675Z DEBUG: cli.azure.cli.core: backup 0.004 16 58 2023-08-03T06:42:31.5681950Z DEBUG: cli.azure.cli.core: batch 0.025 36 104 2023-08-03T06:42:31.5705296Z DEBUG: cli.azure.cli.core: batchai 0.002 10 30 2023-08-03T06:42:31.5757974Z DEBUG: cli.azure.cli.core: billing 0.005 19 52 2023-08-03T06:42:31.5788918Z DEBUG: cli.azure.cli.core: botservice 0.003 12 42 2023-08-03T06:42:31.5853977Z DEBUG: cli.azure.cli.core: cdn 0.006 39 133 2023-08-03T06:42:31.5863826Z DEBUG: cli.azure.cli.core: cloud 0.001 1 7 2023-08-03T06:42:31.5884559Z DEBUG: cli.azure.cli.core: cognitiveservices 0.002 8 31 2023-08-03T06:42:31.5894651Z DEBUG: cli.azure.cli.core: config 0.001 2 7 2023-08-03T06:42:31.5902317Z DEBUG: cli.azure.cli.core: configure 0.001 2 5 2023-08-03T06:42:31.5921189Z DEBUG: cli.azure.cli.core: consumption 0.002 8 9 2023-08-03T06:42:31.5989634Z DEBUG: cli.azure.cli.core: container 0.007 1 11 2023-08-03T06:42:31.6090882Z DEBUG: cli.azure.cli.core: cosmosdb 0.010 57 191 2023-08-03T06:42:31.6124297Z DEBUG: cli.azure.cli.core: databoxedge 0.003 5 27 2023-08-03T06:42:31.6158049Z DEBUG: cli.azure.cli.core: dla 0.003 23 62 2023-08-03T06:42:31.6183310Z DEBUG: cli.azure.cli.core: dls 0.002 7 41 2023-08-03T06:42:31.6200726Z DEBUG: cli.azure.cli.core: dms 0.002 3 22 2023-08-03T06:42:31.6259150Z DEBUG: cli.azure.cli.core: eventgrid 0.006 25 96 2023-08-03T06:42:31.6319957Z DEBUG: cli.azure.cli.core: eventhubs 0.006 12 18 2023-08-03T06:42:31.6327538Z DEBUG: cli.azure.cli.core: extension 0.001 1 7 2023-08-03T06:42:31.6332753Z DEBUG: cli.azure.cli.core: feedback 0.000 1 2 2023-08-03T06:42:31.6339324Z DEBUG: cli.azure.cli.core: find 0.001 1 1 2023-08-03T06:42:31.6387379Z DEBUG: cli.azure.cli.core: hdinsight 0.004 8 39 2023-08-03T06:42:31.6400045Z DEBUG: cli.azure.cli.core: identity 0.001 2 11 2023-08-03T06:42:31.6403016Z DEBUG: cli.azure.cli.core: interactive 0.000 1 1 2023-08-03T06:42:31.7158148Z DEBUG: cli.azure.cli.core: iot 0.075 19 82 2023-08-03T06:42:31.7239965Z DEBUG: cli.azure.cli.core: keyvault 0.008 22 131 2023-08-03T06:42:31.7253178Z DEBUG: cli.azure.cli.core: kusto 0.002 3 14 2023-08-03T06:42:31.7294365Z DEBUG: cli.azure.cli.core: lab 0.004 11 34 2023-08-03T06:42:31.7303797Z DEBUG: cli.azure.cli.core: managedservices 0.001 3 8 2023-08-03T06:42:31.7316787Z DEBUG: cli.azure.cli.core: maps 0.001 5 13 2023-08-03T06:42:31.7333715Z DEBUG: cli.azure.cli.core: marketplaceordering 0.002 1 2 2023-08-03T06:42:31.7594654Z DEBUG: cli.azure.cli.core: monitor 0.026 26 80 2023-08-03T06:42:31.9171289Z DEBUG: cli.azure.cli.core: mysql 0.157 13 47 2023-08-03T06:42:31.9226501Z DEBUG: cli.azure.cli.core: netappfiles 0.005 17 94 2023-08-03T06:42:32.3398147Z DEBUG: cli.azure.cli.core: network 0.417 103 336 2023-08-03T06:42:32.3486935Z DEBUG: cli.azure.cli.core: policyinsights 0.009 9 17 2023-08-03T06:42:32.3525240Z DEBUG: cli.azure.cli.core: privatedns 0.004 14 66 2023-08-03T06:42:32.3535017Z DEBUG: cli.azure.cli.core: profile 0.001 2 9 2023-08-03T06:42:32.3709336Z DEBUG: cli.azure.cli.core: rdbms 0.017 44 185 2023-08-03T06:42:32.3725238Z DEBUG: cli.azure.cli.core: redis 0.002 5 27 2023-08-03T06:42:32.3749981Z DEBUG: cli.azure.cli.core: relay 0.002 10 37 2023-08-03T06:42:32.3889472Z DEBUG: cli.azure.cli.core: resource 0.013 51 224 2023-08-03T06:42:32.3911944Z DEBUG: cli.azure.cli.core: role 0.003 17 61 2023-08-03T06:42:32.3927941Z DEBUG: cli.azure.cli.core: search 0.002 7 22 2023-08-03T06:42:32.3987386Z DEBUG: cli.azure.cli.core: security 0.006 48 104 2023-08-03T06:42:32.4043995Z DEBUG: cli.azure.cli.core: servicebus 0.006 13 15 2023-08-03T06:42:32.4282474Z DEBUG: cli.azure.cli.core: serviceconnector 0.024 8 129 2023-08-03T06:42:32.4380153Z DEBUG: cli.azure.cli.core: servicefabric 0.010 27 76 2023-08-03T06:42:32.4400413Z DEBUG: cli.azure.cli.core: signalr 0.002 8 30 2023-08-03T06:42:32.4560483Z DEBUG: cli.azure.cli.core: sql 0.016 57 215 2023-08-03T06:42:32.4671799Z DEBUG: cli.azure.cli.core: sqlvm 0.011 4 20 2023-08-03T06:42:32.5145693Z DEBUG: cli.azure.cli.core: storage 0.047 58 272 2023-08-03T06:42:32.5268028Z DEBUG: cli.azure.cli.core: synapse 0.012 54 246 2023-08-03T06:42:32.5282843Z DEBUG: cli.azure.cli.core: util 0.002 3 7 2023-08-03T06:42:32.6466403Z DEBUG: cli.azure.cli.core: vm 0.117 58 264 2023-08-03T06:42:32.6467386Z DEBUG: cli.azure.cli.core: Total (64) 1.299 1182 4556 2023-08-03T06:42:32.6467822Z DEBUG: cli.azure.cli.core: Loading extensions: 2023-08-03T06:42:32.6468197Z DEBUG: cli.azure.cli.core: Name Load Time Groups Commands Directory 2023-08-03T06:42:32.7048214Z DEBUG: cli.azure.cli.core: azure-devops 0.057 60 192 /opt/az/azcliextensions/azure-devops 2023-08-03T06:42:32.7259987Z DEBUG: cli.azure.cli.core: notification-hub 0.020 5 20 /opt/az/azcliextensions/notification-hub 2023-08-03T06:42:32.7260492Z DEBUG: cli.azure.cli.core: Total (2) 0.077 65 212
2023-08-03T06:42:32.7260872Z DEBUG: cli.azure.cli.core: Loaded 1236 groups, 4768 commands. 2023-08-03T06:42:32.7315812Z DEBUG: cli.azure.cli.core: Updated command index in 0.004 seconds. 2023-08-03T06:42:32.7316372Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x7f778dd16d40>] 2023-08-03T06:42:32.7321826Z DEBUG: cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/home/vsts/work/_temp/.azclitask/commands/2023-08-03.06-42-32.notification-hub_credential_apns_update.2135.log'. 2023-08-03T06:42:32.7326388Z INFO: az_command_data_logger: command args: notification-hub credential apns update --namespace-name {} --notification-hub-name {} --resource-group {} --app-id {} --app-name {} --endpoint {} --key-id {} --token {} --debug 2023-08-03T06:42:32.7333831Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x7f778dd3b880>] 2023-08-03T06:42:32.7355574Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostArgumentLoad [] 2023-08-03T06:42:32.7356108Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostCommandTableCreate [<function register_ids_argument..add_ids_arguments at 0x7f778dd757e0>, <function register_cache_arguments..add_cache_arguments at 0x7f778dd75900>] 2023-08-03T06:42:32.7389521Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnCommandTableLoaded [] 2023-08-03T06:42:32.7389933Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPreParseArgs [<function _documentdb_deprecate at 0x7f778cdb08b0>] 2023-08-03T06:42:32.7398692Z DEBUG: cli.knack.cli: Event: CommandInvoker.OnPostParseArgs [<function OutputProducer.handle_output_argument at 0x7f778ecbc310>, <function CLIQuery.handle_query_parameter at 0x7f778ece1510>, <function register_ids_argument..parse_ids_arguments at 0x7f778dd75870>, <function handler at 0x7f778cb87760>, <function DevCommandsLoader.post_parse_args at 0x7f7788c23eb0>] 2023-08-03T06:42:32.7411694Z INFO: az_command_data_logger: extension name: notification-hub 2023-08-03T06:42:32.7412030Z INFO: az_command_data_logger: extension version: 1.0.0a1 2023-08-03T06:42:32.7412422Z WARNING: This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus 2023-08-03T06:42:32.7425247Z DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='/home/vsts/work/_temp/.azclitask/service_principal_entries.json', encrypt=False 2023-08-03T06:42:32.7425915Z DEBUG: cli.azure.cli.core.auth.persistence: build_persistence: location='/home/vsts/work/_temp/.azclitask/msal_token_cache.json', encrypt=False 2023-08-03T06:42:32.7429458Z DEBUG: cli.azure.cli.core.auth.binary_cache: load: /home/vsts/work/_temp/.azclitask/msal_http_cache.bin 2023-08-03T06:42:32.7433758Z DEBUG: urllib3.util.retry: Converted retries value: 1 -> Retry(total=1, connect=None, read=None, redirect=None, status=None) 2023-08-03T06:42:32.7443005Z DEBUG: msal.authority: openid_config = {'token_endpoint': 'https://login.microsoftonline.com//oauth2/v2.0/token', 'token_endpoint_auth_methods_supported': ['client_secret_post', 'private_key_jwt', 'client_secret_basic'], 'jwks_uri': 'https://login.microsoftonline.com//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//v2.0', 'request_uri_parameter_supported': False, 'userinfo_endpoint': 'https://graph.microsoft.com/oidc/userinfo', 'authorization_endpoint': 'https://login.microsoftonline.com//oauth2/v2.0/authorize', 'device_authorization_endpoint': 'https://login.microsoftonline.com//oauth2/v2.0/devicecode', 'http_logout_supported': True, 'frontchannel_logout_supported': True, 'end_session_endpoint': 'https://login.microsoftonline.com//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//kerberos', 'tenant_region_scope': 'EU', 'cloud_instance_name': 'microsoftonline.com', 'cloud_graph_host_name': 'graph.windows.net', 'msgraph_host': 'graph.microsoft.com', 'rbac_url': 'https://pas.windows.net'} 2023-08-03T06:42:32.7445150Z DEBUG: msal.application: Broker enabled? False 2023-08-03T06:42:32.7445444Z DEBUG: msal.application: Region to be used: None 2023-08-03T06:42:32.7486093Z DEBUG: cli.azure.cli.core.auth.credential_adaptor: CredentialAdaptor.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={} 2023-08-03T06:42:32.7487070Z DEBUG: cli.azure.cli.core.auth.msal_authentication: ServicePrincipalCredential.get_token: scopes=('https://management.core.windows.net//.default',), kwargs={} 2023-08-03T06:42:32.7490466Z DEBUG: msal.application: Cache hit an AT 2023-08-03T06:42:32.7491139Z DEBUG: msal.telemetry: Generate or reuse correlation_id: 89bfd515-6401-48f2-acdf-ac3237e57653 2023-08-03T06:42:32.7492370Z DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.NotificationHubs/namespaces//notificationHubs/?api-version=2017-04-01' 2023-08-03T06:42:32.7493235Z DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'GET' 2023-08-03T06:42:32.7493685Z DEBUG: cli.azure.cli.core.sdk.policies: Request headers: 2023-08-03T06:42:32.7494565Z DEBUG: cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' 2023-08-03T06:42:32.7495785Z DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'ebaf86f9-31c8-11ee-8a1f-87702ffcf224' 2023-08-03T06:42:32.7496368Z DEBUG: cli.azure.cli.core.sdk.policies: 'CommandName': 'notification-hub credential apns update' 2023-08-03T06:42:32.7497027Z DEBUG: cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--namespace-name --notification-hub-name --resource-group --app-id --app-name --endpoint --key-id --token --debug' 2023-08-03T06:42:32.7497856Z DEBUG: cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.50.0 (DEB) (AAZ) azsdk-python-core/1.26.0 Python/3.10.10 (Linux-5.15.0-1041-azure-x86_64-with-glibc2.35) VSTS_293cace5-cc04-4ef2-8e74-a37278f3fccb_build_45_0' 2023-08-03T06:42:32.7498435Z DEBUG: cli.azure.cli.core.sdk.policies: 'Authorization': '***
' 2023-08-03T06:42:32.7498744Z DEBUG: cli.azure.cli.core.sdk.policies: Request body: 2023-08-03T06:42:32.7499073Z DEBUG: cli.azure.cli.core.sdk.policies: This request has no body 2023-08-03T06:42:32.7519272Z DEBUG: urllib3.connectionpool: Starting new HTTPS connection (1): management.azure.com:443 2023-08-03T06:42:33.3501108Z DEBUG: urllib3.connectionpool: https://management.azure.com:443 "GET /subscriptions//resourceGroups//providers/Microsoft.NotificationHubs/namespaces//notificationHubs/?api-version=2017-04-01 HTTP/1.1" 200 None 2023-08-03T06:42:33.3517209Z DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200 2023-08-03T06:42:33.3517643Z DEBUG: cli.azure.cli.core.sdk.policies: Response headers: 2023-08-03T06:42:33.3518262Z DEBUG: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' 2023-08-03T06:42:33.3518814Z DEBUG: cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' 2023-08-03T06:42:33.3519297Z DEBUG: cli.azure.cli.core.sdk.policies: 'Transfer-Encoding': 'chunked' 2023-08-03T06:42:33.3519844Z DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' 2023-08-03T06:42:33.3520338Z DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Encoding': 'gzip' 2023-08-03T06:42:33.3520796Z DEBUG: cli.azure.cli.core.sdk.policies: 'Expires': '-1' 2023-08-03T06:42:33.3521268Z DEBUG: cli.azure.cli.core.sdk.policies: 'Vary': 'Accept-Encoding' 2023-08-03T06:42:33.3521792Z DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-reads': '11999' 2023-08-03T06:42:33.3522400Z DEBUG: cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' 2023-08-03T06:42:33.3522983Z DEBUG: cli.azure.cli.core.sdk.policies: 'TrackingId': '196d4288-f540-4078-9080-2a44dd3cf88d' 2023-08-03T06:42:33.3523573Z DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': '049e5362-1d72-47ca-960e-581b07411a48' 2023-08-03T06:42:33.3524277Z DEBUG: cli.azure.cli.core.sdk.policies: 'api-supported-versions': '2014-09-01, 2016-03-01, 2017-04-01, 2020-01-01-preview, 2023-01-01-preview' 2023-08-03T06:42:33.3524810Z DEBUG: cli.azure.cli.core.sdk.policies: 'Server': 'Kestrel' 2023-08-03T06:42:33.3525356Z DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-request-id': '049e5362-1d72-47ca-960e-581b07411a48' 2023-08-03T06:42:33.3526423Z DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'WESTEUROPE:20230803T064233Z:049e5362-1d72-47ca-960e-581b07411a48' 2023-08-03T06:42:33.3527009Z DEBUG: cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' 2023-08-03T06:42:33.3527530Z DEBUG: cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 03 Aug 2023 06:42:33 GMT' 2023-08-03T06:42:33.3527910Z DEBUG: cli.azure.cli.core.sdk.policies: Response content: 2023-08-03T06:42:33.3536515Z DEBUG: cli.azure.cli.core.sdk.policies: {"properties":{"registrationTtl":"10675199.02:48:05.4775807","authorizationRules":[],"dailyMaxActiveDevices":22},"id":"/subscriptions//resourceGroups//providers/Microsoft.NotificationHubs/namespaces//NotificationHubs/","name":"","type":"Microsoft.NotificationHubs/namespaces/notificationHubs","location":"Germany West Central"} 2023-08-03T06:42:33.3569140Z DEBUG: cli.azure.cli.core.sdk.policies: Request URL: 'https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.NotificationHubs/namespaces//notificationHubs/?api-version=2017-04-01' 2023-08-03T06:42:33.3569855Z DEBUG: cli.azure.cli.core.sdk.policies: Request method: 'PUT' 2023-08-03T06:42:33.3570164Z DEBUG: cli.azure.cli.core.sdk.policies: Request headers: 2023-08-03T06:42:33.3570589Z DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json' 2023-08-03T06:42:33.3571016Z DEBUG: cli.azure.cli.core.sdk.policies: 'Accept': 'application/json' 2023-08-03T06:42:33.3571411Z DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Length': '517' 2023-08-03T06:42:33.3571937Z DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-client-request-id': 'ebaf86f9-31c8-11ee-8a1f-87702ffcf224' 2023-08-03T06:42:33.3572434Z DEBUG: cli.azure.cli.core.sdk.policies: 'CommandName': 'notification-hub credential apns update' 2023-08-03T06:42:33.3573092Z DEBUG: cli.azure.cli.core.sdk.policies: 'ParameterSetName': '--namespace-name --notification-hub-name --resource-group --app-id --app-name --endpoint --key-id --token --debug' 2023-08-03T06:42:33.3573915Z DEBUG: cli.azure.cli.core.sdk.policies: 'User-Agent': 'AZURECLI/2.50.0 (DEB) (AAZ) azsdk-python-core/1.26.0 Python/3.10.10 (Linux-5.15.0-1041-azure-x86_64-with-glibc2.35) VSTS_293cace5-cc04-4ef2-8e74-a37278f3fccb_build_45_0' 2023-08-03T06:42:33.3574451Z DEBUG: cli.azure.cli.core.sdk.policies: 'Authorization': '**' 2023-08-03T06:42:33.3574768Z DEBUG: cli.azure.cli.core.sdk.policies: Request body: 2023-08-03T06:42:33.3575605Z DEBUG: cli.azure.cli.core.sdk.policies: {"location": "Germany West Central", "properties": {"apnsCredential": {"properties": {"appId": "", "appName": "", "endpoint": "https://api.push.apple.com:443/3/device", "keyId": "", "token": ""}}, "authorizationRules": [], "registrationTtl": "10675199.02:48:05.4775807"}} 2023-08-03T06:42:34.3342600Z DEBUG: urllib3.connectionpool: https://management.azure.com:443 "PUT /subscriptions//resourceGroups//providers/Microsoft.NotificationHubs/namespaces//notificationHubs/?api-version=2017-04-01 HTTP/1.1" 200 None 2023-08-03T06:42:34.3356915Z DEBUG: cli.azure.cli.core.sdk.policies: Response status: 200 2023-08-03T06:42:34.3357317Z DEBUG: cli.azure.cli.core.sdk.policies: Response headers: 2023-08-03T06:42:34.3357927Z DEBUG: cli.azure.cli.core.sdk.policies: 'Cache-Control': 'no-cache' 2023-08-03T06:42:34.3358380Z DEBUG: cli.azure.cli.core.sdk.policies: 'Pragma': 'no-cache' 2023-08-03T06:42:34.3358862Z DEBUG: cli.azure.cli.core.sdk.policies: 'Transfer-Encoding': 'chunked' 2023-08-03T06:42:34.3359745Z DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Type': 'application/json; charset=utf-8' 2023-08-03T06:42:34.3360230Z DEBUG: cli.azure.cli.core.sdk.policies: 'Content-Encoding': 'gzip' 2023-08-03T06:42:34.3360688Z DEBUG: cli.azure.cli.core.sdk.policies: 'Expires': '-1' 2023-08-03T06:42:34.3361135Z DEBUG: cli.azure.cli.core.sdk.policies: 'Vary': 'Accept-Encoding' 2023-08-03T06:42:34.3361666Z DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-ratelimit-remaining-subscription-writes': '1199' 2023-08-03T06:42:34.3362252Z DEBUG: cli.azure.cli.core.sdk.policies: 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains' 2023-08-03T06:42:34.3362835Z DEBUG: cli.azure.cli.core.sdk.policies: 'TrackingId': 'b02cee03-d0c8-4d29-91e8-063addffd98a' 2023-08-03T06:42:34.3363548Z DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-correlation-request-id': 'a3798a4f-edb9-4d3c-9396-1b00deaa090a' 2023-08-03T06:42:34.3364237Z DEBUG: cli.azure.cli.core.sdk.policies: 'api-supported-versions': '2014-09-01, 2016-03-01, 2017-04-01, 2020-01-01-preview, 2023-01-01-preview' 2023-08-03T06:42:34.3364783Z DEBUG: cli.azure.cli.core.sdk.policies: 'Server': 'Kestrel' 2023-08-03T06:42:34.3365312Z DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-request-id': 'a3798a4f-edb9-4d3c-9396-1b00deaa090a' 2023-08-03T06:42:34.3366008Z DEBUG: cli.azure.cli.core.sdk.policies: 'x-ms-routing-request-id': 'WESTEUROPE:20230803T064234Z:a3798a4f-edb9-4d3c-9396-1b00deaa090a' 2023-08-03T06:42:34.3366587Z DEBUG: cli.azure.cli.core.sdk.policies: 'X-Content-Type-Options': 'nosniff' 2023-08-03T06:42:34.3367093Z DEBUG: cli.azure.cli.core.sdk.policies: 'Date': 'Thu, 03 Aug 2023 06:42:34 GMT' 2023-08-03T06:42:34.3367488Z DEBUG: cli.azure.cli.core.sdk.policies: Response content: 2023-08-03T06:42:34.3368746Z DEBUG: cli.azure.cli.core.sdk.policies: {"properties":{"registrationTtl":"10675199.02:48:05.4775807","dailyMaxActiveDevices":0},"id":"/subscriptions//resourceGroups//providers/Microsoft.NotificationHubs/namespaces//NotificationHubs/","name":"","type":"Microsoft.NotificationHubs/namespaces/notificationHubs","location":"Germany West Central"} 2023-08-03T06:42:34.3906189Z DEBUG: cli.azure.cli.core.azclierror: Traceback (most recent call last): 2023-08-03T06:42:34.3907207Z File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke 2023-08-03T06:42:34.3907582Z cmd_result = self.invocation.execute(args) 2023-08-03T06:42:34.3908099Z File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 663, in execute 2023-08-03T06:42:34.3908453Z raise ex 2023-08-03T06:42:34.3908961Z File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 726, in _run_jobs_serially 2023-08-03T06:42:34.3909388Z results.append(self._run_job(expanded_arg, cmd_copy)) 2023-08-03T06:42:34.3909910Z File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/init.py", line 697, in _run_job 2023-08-03T06:42:34.3910279Z result = cmd_copy(params) 2023-08-03T06:42:34.3910771Z File "/opt/az/lib/python3.10/site-packages/azure/cli/core/aaz/_command.py", line 149, in call 2023-08-03T06:42:34.3911116Z return self._handler(args, kwargs) 2023-08-03T06:42:34.3911724Z File "/opt/az/azcliextensions/notification-hub/azext_notification_hub/aaz/latest/notification_hub/credential/apns/_create.py", line 32, in _handler 2023-08-03T06:42:34.3912123Z return self._output() 2023-08-03T06:42:34.3912708Z File "/opt/az/azcliextensions/notification-hub/azext_notification_hub/aaz/latest/notification_hub/credential/apns/_create.py", line 126, in _output 2023-08-03T06:42:34.3913229Z result = self.deserialize_output(self.ctx.selectors.subresource.required(), client_flatten=True) 2023-08-03T06:42:34.3913789Z File "/opt/az/lib/python3.10/site-packages/azure/cli/core/aaz/_selector.py", line 59, in required 2023-08-03T06:42:34.3914455Z raise UserFault("ResourceNotFoundError") 2023-08-03T06:42:34.3914794Z azure.cli.core.azclierror.UserFault: ResourceNotFoundError 2023-08-03T06:42:34.3914965Z 2023-08-03T06:42:34.4003154Z ERROR: cli.azure.cli.core.azclierror: ResourceNotFoundError 2023-08-03T06:42:34.4003541Z ERROR: az_command_data_logger: ResourceNotFoundError 2023-08-03T06:42:34.4003923Z DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f778dd16f80>] 2023-08-03T06:42:34.4004257Z INFO: az_command_data_logger: exit code: 1 2023-08-03T06:42:34.4004584Z INFO: cli.main: Command ran in 3.265 seconds (init: 0.195, invoke: 3.070) 2023-08-03T06:42:34.4808790Z INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1 2023-08-03T06:42:34.4810020Z INFO: telemetry.client: Accumulated 0 events. Flush the clients. 2023-08-03T06:42:34.4810913Z INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1 2023-08-03T06:42:34.4811579Z INFO: telemetry.save: Save telemetry record of length 3644 in cache 2023-08-03T06:42:34.4815374Z WARNING: telemetry.check: Negative: The /home/vsts/work/_temp/.azclitask/telemetry.txt was modified at 2023-08-03 06:42:19.988517, which in less than 600.000000 s 2023-08-03T06:42:34.7853522Z DEBUG: cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x7f39cf96ef80>] 2023-08-03T06:42:34.7854444Z INFO: az_command_data_logger: exit code: 1 2023-08-03T06:42:34.7855157Z INFO: cli.main: Command ran in 12.040 seconds (init: 0.188, invoke: 11.852) 2023-08-03T06:42:34.8658533Z INFO: telemetry.main: Begin splitting cli events and extra events, total events: 1 2023-08-03T06:42:34.8659375Z INFO: telemetry.client: Accumulated 0 events. Flush the clients. 2023-08-03T06:42:34.8660033Z INFO: telemetry.main: Finish splitting cli events and extra events, cli events: 1 2023-08-03T06:42:34.8663928Z INFO: telemetry.save: Save telemetry record of length 3717 in cache 2023-08-03T06:42:34.8664991Z WARNING: telemetry.check: Negative: The /home/vsts/work/_temp/.azclitask/telemetry.txt was modified at 2023-08-03 06:42:19.988517, which in less than 600.000000 s 2023-08-03T06:42:35.1773010Z Done. 2023-08-03T06:42:35.1774043Z ----------------------------------------------- 2023-08-03T06:42:35.1774743Z Setting Google Push... 2023-08-03T06:42:35.5267658Z WARNING: This command is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus 2023-08-03T06:42:36.1853869Z ERROR: ResourceNotFoundError 2023-08-03T06:42:36.3550287Z Done. 2023-08-03T06:42:36.4471095Z ##[error]Script failed with exit code: 1 2023-08-03T06:42:36.4495883Z [command]/usr/bin/az account clear 2023-08-03T06:42:37.0056273Z ##[section]Finishing: Set Push Notification Credentials for NotificationHub

Expected behavior

The command is executed successfully, so "ERROR: ResourceNotFoundError" should not be raised.

Environment Summary

azure-cli 2.50.0 *

core 2.50.0 telemetry 1.0.8

Extensions: azure-devops 0.26.0

Dependencies: msal 1.22.0 azure-mgmt-resource 23.1.0b2

Additional context

No response

azure-client-tools-bot-prd[bot] commented 1 year ago

Hi @ChrWeinert,

2.50.0 is not the latest Azure CLI(2.51.0).

Please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

yonzhan commented 1 year ago

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

ghost commented 1 year ago

Thank you for your feedback. This has been routed to the support team for assistance.

ChrWeinert commented 1 year ago

I integrated the "az upgrade --all --yes" command within the inline script. It seems, that upgrading az within a AzureCLI@2 tasks does not work:

WARNING: Your current Azure CLI version is 2.50.0. It will be updated to 2.51.0.
...
azure-cli is already the newest version (2.50.0-1~jammy)
ChrWeinert commented 1 year ago

Hi @yonzhan, can You reproduce the issue or do You need any further information?

chrisnelson commented 8 months ago

Any update on this issue? I am experiencing the same exact issue when upgrading from 2.43.0 to 2.51.0 version of the CLI.

After some digging, I see that there is a 1.0.0a1 version of notification-hub extension which got installed when issuing the first CLI command. I was able to work around this by issuing the following 2 commands:

az extension remove --name notification-hub (this removes the existing (bad) 1.0.0a1 version) az extension add --name notification-hub --version 0.2.0 (this installs the latest working version)

This is just a work around and the 1.0.0a1 version should be investigated.

maheshrai commented 8 months ago

Thank you so much @chrisnelson! That worked.