Skip to content

401 Error on a Container App in certain Resource Group #9397

@janderson-bh

Description

@janderson-bh

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az containerapp exec Extension Name: containerapp. Version: 0.3.42.

Errors:

The command failed with an unexpected error. Here is the traceback:
Handshake status 401 Unauthorized
Traceback (most recent call last):
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\knack/cli.py", line 233, in invoke
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 663, in execute
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 697, in _run_job
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/__init__.py", line 333, in __call__
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\azure/cli/core/commands/command_operation.py", line 121, in handler
  File "C:\Users\andejoh06\.azure\cliextensions\containerapp\azext_containerapp\custom.py", line 3403, in containerapp_ssh
    conn = WebSocketConnection(cmd=cmd, resource_group_name=resource_group_name, name=name, revision=revision,
  File "C:\Users\andejoh06\.azure\cliextensions\containerapp\azext_containerapp\_ssh_utils.py", line 62, in __init__
    self._socket.connect(self._url, header=[f"Authorization: Bearer {self._token}"])
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\websocket/_core.py", line 253, in connect
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\websocket/_handshake.py", line 57, in handshake
  File "D:\a\_work\1\s\build_scripts\windows\artifacts\cli\Lib\site-packages\websocket/_handshake.py", line 148, in _get_resp_headers
websocket._exceptions.WebSocketBadStatusException: Handshake status 401 Unauthorized

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az containerapp exec -n {} -g {} --container {} --command {}

Expected Behavior

Environment Summary

Windows-10-10.0.26100-SP0
Python 3.10.10
Installer: MSI

azure-cli 2.48.1 *

Extensions:
containerapp 0.3.42

Dependencies:
msal 1.20.0
azure-mgmt-resource 22.0.0

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botContainerAppService AttentionThis issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions