Failed to retrieve Scm Uri
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
When trying to view the logs of a function app running on python, using `az webapp log tail --resource-group --name `, I get the following error:
```
The command failed with an unexpected error. Here is the traceback:
Failed to retrieve Scm Uri
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/knack/cli.py", line 206, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 351, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 409, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 402, in _run_job
six.reraise(*sys.exc_info())
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 379, in _run_job
result = cmd_copy(params)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 171, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/core/__init__.py", line 451, in default_command_handler
return op(**command_args)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/command_modules/appservice/custom.py", line 1627, in get_streaming_log
scm_url = _get_scm_url(cmd, resource_group_name, name, slot)
File "/usr/local/Cellar/azure-cli/2.0.61/libexec/lib/python3.7/site-packages/azure/cli/command_modules/appservice/custom.py", line 1375, in _get_scm_url
raise ValueError('Failed to retrieve Scm Uri')
ValueError: Failed to retrieve Scm Uri
```
**To Reproduce**
Create a python function app, publish it and try to view the logs.
**Expected behavior**
Logs should appear like they do for other function apps
**Environment summary**
Using MacOS `10.14.3`, installed azure-cli using `brew install azure-cli`
```
$ az -v
azure-cli 2.0.61
acr 2.2.3
acs 2.3.20
advisor 2.0.0
ams 0.4.3
appservice 0.2.16
backup 1.2.2
batch 4.0.0
batchai 0.4.8
billing 0.2.1
botservice 0.1.9
cdn 0.2.1
cloud 2.1.1
cognitiveservices 0.2.5
command-modules-nspkg 2.0.2
configure 2.0.20
consumption 0.4.2
container 0.3.15
core 2.0.61
cosmosdb 0.2.9
dla 0.2.5
dls 0.1.8
dms 0.1.3
eventgrid 0.2.2
eventhubs 0.3.4
extension 0.2.4
feedback 2.1.4
find 0.3.1
hdinsight 0.3.2
interactive 0.4.2
iot 0.3.7
iotcentral 0.1.6
keyvault 2.2.13
kusto 0.2.1
lab 0.1.6
maps 0.3.4
monitor 0.2.11
network 2.3.5
nspkg 3.0.3
policyinsights 0.1.2
profile 2.1.4
rdbms 0.3.9
redis 0.4.2
relay 0.1.4
reservations 0.4.2
resource 2.1.12
role 2.4.3
search 0.1.1
security 0.1.1
servicebus 0.3.4
servicefabric 0.1.15
signalr 1.0.0
sql 2.2.0
sqlvm 0.1.1
storage 2.3.2
telemetry 1.0.2
vm 2.2.17
Python location '/usr/local/Cellar/azure-cli/2.0.61/libexec/bin/python'
Extensions directory '/.azure/cliextensions'
Python (Darwin) 3.7.3 (default, Mar 28 2019, 11:25:53)
[Clang 10.0.1 (clang-1001.0.46.3)]
Legal docs and information: aka.ms/AzureCliLegal
Your CLI is up-to-date.
```
**Additional context**
I tried to connect to another function app running on node, and I got no problem. Seems to be related to reading logs from `python` function apps
Contributor guide
Assessment
This issue has not been assessed yet.