Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Every functionapp sub-command result in "Invalid URI: The URI scheme is not valid." error #2824

Closed
wisaTong opened this issue Nov 9, 2021 · 4 comments
Labels

Comments

@wisaTong
Copy link

wisaTong commented Nov 9, 2021

I created a simple function app with func init func new and then tried to publish it with func azure functionapp publish myapp and got "Invalid URI: The URI scheme is not valid." as an output.

output of CLI_DEBUG=1 func azure functionapp publish myapp

> az account get-access-token --query "accessToken" --output json
> az cloud list --query "[?isActive].endpoints.resourceManager | [0]" --output json
System.UriFormatException: Invalid URI: The URI scheme is not valid.
   at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
   at System.Uri..ctor(String uriString)
   at Azure.Functions.Cli.Helpers.AzureHelper.GetSubscriptions(String accessToken, String managementURL) in D:\a\1\s\src\Azure.Functions.Cli\Helpers\AzureHelper.cs:line 295
   at Azure.Functions.Cli.Helpers.AzureHelper.GetFunctionApp(String name, String accessToken, String managementURL, String slot, String defaultSubscription, IEnumerable`1 allSubs) in D:\a\1\s\src\Azure.Functions.Cli\Helpers\AzureHelper.cs:line 33
   at Azure.Functions.Cli.Actions.AzureActions.PublishFunctionAppAction.RunAsync() in D:\a\1\s\src\Azure.Functions.Cli\Actions\AzureActions\PublishFunctionAppAction.cs:line 133
   at Azure.Functions.Cli.ConsoleApp.RunAsync[T](String[] args, IContainer container) in D:\a\1\s\src\Azure.Functions.Cli\ConsoleApp.cs:line 66

fetch-app-settings, list-functions, and logstream also give similar output.

@wisaTong
Copy link
Author

I think I know what my problem is. The --query flag for my az CLI doesn't work, so the output was messed up. But I still can't figure out why my --query flag does nothing.

@wisaTong
Copy link
Author

This issue might be the root cause Azure/azure-cli#20269

@apawast
Copy link

apawast commented Nov 10, 2021

@wisaTong thanks for pointing out the CLI issue. Is okay to close this issue as a duplicate of that one?

@wisaTong
Copy link
Author

Sure, please do.

@ejizba ejizba closed this as completed Nov 11, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Dec 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants