-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[App Service] az webapp ssh silently exits on macOS with Python 3.14 and Invoke 2.2.0 #34005
Copy link
Copy link
Open
Labels
Auto-AssignAuto assign by botAuto assign by botService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Web Appsaz webappaz webappact-observability-squadapp-service-generalapp-service-networkingbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Description
Activity
Metadata
Metadata
Labels
Auto-AssignAuto assign by botAuto assign by botService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.Web Appsaz webappaz webappact-observability-squadapp-service-generalapp-service-networkingbugThis issue requires a change to an existing behavior in the product in order to be resolved.This issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.
Describe the bug
On macOS with Azure CLI 2.89.1 installed by Homebrew,
az webapp sshestablishes the App Service tunnel and opens a Paramiko SSH channel, but immediately closes without displaying an error. The command exits with status 0.With
--debug, the interactive session reportsbuffer overflow. Azure CLI catches the exception in_start_ssh_session, logs it only at INFO/debug level, closes the connection, and returns success.The bundled Invoke 2.2.0 uses a 4-byte
"HH"buffer forTIOCGWINSZ. Python 3.14 detects the 8-byte write on macOS and raisesSystemError: buffer overflow. Updating Invoke to 2.2.1 fixes the command.Upstream: pyinvoke/invoke#1038
Python 3.14 tracking: #32869
Related command
az webapp ssh --resource-group --name
Errors
No error appears normally; the command silently returns with exit status 0.
With
--debug:Issue script & Debug output
``shell
az webapp ssh
--resource-group
--name
--debug
paramiko.transport: Secsh channel 0 opened.
paramiko.transport: [chan 0] EOF sent (0)
azure.cli.command_modules.appservice.custom: buffer overflow
Client disconnected
websocket close: Connection failure.
az_command_data_logger: exit code: 0
Invoke 2.2.1 uses the correct 8-byte
"HHHH"structure. Installing 2.2.1 into Azure CLI's environment makes the same command work.Expected behavior
The command should maintain an interactive SSH session. If terminal creation fails, Azure CLI should display the exception and return a nonzero status instead of silently closing with status 0.
Environment Summary
azure-cli 2.89.1
core 2.89.1
telemetry 1.1.0
Installation: Homebrew
Python location: /opt/homebrew/Cellar/azure-cli/2.89.1/libexec/bin/python
Python: 3.14.7
Bundled Invoke: 2.2.0
Fabric: 3.2.2
OS: macOS 26.6.2
Architecture: arm64
Additional context
Homebrew's current Azure CLI 2.89.1 formula depends on Python 3.14 and packages Invoke 2.2.0.
Working dependency update:
Another workaround is
az webapp create-remote-connectionplus the system SSH client.Suggested fixes: