_From @ErlendFax on October 2, 2018 8:35_
I have followed every in the tutorial, but when I run func azure functionapp publish myApp, it returns:
Response status code does not indicate success: 400 (Bad Request).
What does this mean? How can I debug this error? Anyone else experiencing this?
EDIT:
Found out I can add CLI_DEBUG=1 which gave me:
GET https://management.azure.com/subscriptions?api-version=2014-04-01
GET https://management.azure.com/subscriptions?api-version=2014-04-01
GET https://management.azure.com/subscriptions?api-version=2014-04-01
GET https://management.azure.com/subscriptions?api-version=2014-04-01
System.Net.Http.HttpRequestException: Response status code does not indicate success: 400 (Bad Request).
at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()
at Azure.Functions.Cli.Helpers.AzureHelper.ArmHttpAsyncT
at Azure.Functions.Cli.Helpers.AzureHelper.GetFunctionApp(String name, String accessToken)
at Azure.Functions.Cli.Actions.AzureActions.PublishFunctionAppAction.RunAsync()
at Azure.Functions.Cli.ConsoleApp.RunAsyncT
EDIT 2:
I tried pushing an that does not exist, func azure functionapp publish myBSApp, same response, could this indicate an error with the "connection" between me and Azure?
EDIT 3:
I tried another method of getting this up in Azure. When I run az functionapp deployment source config-zip -g myRG -n myApp --src myFiles.zip, I get:
Failed to retrieve Scm Uri
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.0.44/libexec/lib/python3.7/site-packages/knack/cli.py", line 197, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.0.44/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 369, in execute
six.reraise(sys.exc_info())
File "/usr/local/Cellar/azure-cli/2.0.44/libexec/lib/python3.7/site-packages/six.py", line 693, in reraise
raise value
File "/usr/local/Cellar/azure-cli/2.0.44/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 343, in execute
result = cmd(params)
File "/usr/local/Cellar/azure-cli/2.0.44/libexec/lib/python3.7/site-packages/azure/cli/core/commands/__init__.py", line 182, in __call__
return self.handler(args, kwargs)
File "/usr/local/Cellar/azure-cli/2.0.44/libexec/lib/python3.7/site-packages/azure/cli/core/__init__.py", line 436, in default_command_handler
result = op(command_args)
File "/usr/local/Cellar/azure-cli/2.0.44/libexec/lib/python3.7/site-packages/azure/cli/command_modules/appservice/custom.py", line 170, in enable_zip_deploy
scm_url = _get_scm_url(cmd, resource_group_name, name, slot)
File "/usr/local/Cellar/azure-cli/2.0.44/libexec/lib/python3.7/site-packages/azure/cli/command_modules/appservice/custom.py", line 1153, in _get_scm_url
raise ValueError('Failed to retrieve Scm Uri')
ValueError: Failed to retrieve Scm Uri
I can't reach Kudu (Scm). Neither here or with Portal.
_Copied from original issue: Azure/azure-functions-python-worker#214_
@ErlendFax Are you able to view the Function App in the Azure portal? If so, can you please share the app name?
/cc @ahmelsayed
_From @ErlendFax on October 2, 2018 16:13_
Yes, I can see it. However, I can not enter/use Kudu, among a few other features under the Platform features in Portal. Name: erlendapp
@ErlendFax kudu is not available in the linux preview offering.
The issue seems similar to this - https://github.com/Azure/azure-functions-core-tools/issues/770
Can you please try one of the builds here https://ci.appveyor.com/project/appsvc/azure-functions-cli/build/679/artifacts and confirm if the fix works for you?
It did not work. I started from scratch, using the 2.1.679 version you sent.
Response status code does not indicate success: 400 (Bad Request).
By the way, I forgot to mention that I when I run az functionapp createpreviewapp (still in my virtual environment (env)), I get ModuleNotFoundError: No module named '_cffi_backend'. I solved this by running, (env) - pip3 install cffi. Dont know if it matters though.
@ErlendFax can you email me your subscription and app name: ahmels at microsoft dot com?
I got same error. Did not find any answer online, but ultimately resolved by preceding with az login command to login form Azure CLI (https://docs.microsoft.com/en-us/cli/azure/reference-index?view=azure-cli-latest#az-login). Hope this helps.
I can't quite figure out what's happening from the logs on the backend. I see the request to list subscriptions is getting a 401, but I'm not sure why. Also more puzzling, the error reported here is a 400 not a 401. I added more logging in the CLI and updated the API version used for listing subscriptions.
@ahmelsayed Was this resolved? I too, am trying to func azure functionapp list-functions [functionapp name] and am met with Response status code does not indicate success: 401 (Unauthorized) despite a seemingly successful login via az login. Any insight would be awesome. Thanks!
Most helpful comment
@ahmelsayed Was this resolved? I too, am trying to
func azure functionapp list-functions [functionapp name]and am met withResponse status code does not indicate success: 401 (Unauthorized)despite a seemingly successful login viaaz login. Any insight would be awesome. Thanks!