Azure / azure-functions-powershell-worker

PowerShell language worker for Azure Functions.
MIT License
206 stars 54 forks source link

Cosmetic (?) Error in Core Tools when proxies.json is configured #555

Open JustinGrote opened 4 years ago

JustinGrote commented 4 years ago

Using Core Tools 3.0.2931

When configuring a simple proxies.json:

{
  "$schema": "http://json.schemastore.org/proxies",
  "proxies": {
    "AzureRetailPrices": {
      "matchCondition": {
        "methods": [
          "GET"
        ],
        "route": "/api/prices"
      },
      "backendUri": "https://prices.azure.com/api/retail/prices"
    }
  }
}

I get the below error from the Powershell Worker, however the proxy continues to work fine.

[2020-11-03T17:37:38.857] Worker failed to function id 2bec701c-a38e-472e-bcb1-5211e957aae6.
[2020-11-03T17:37:38.861] Result: Failure
Exception: The script file '' has parsing errors:
The file could not be read: Cannot process argument because the value of argument "path" is not valid. Change the 
value of the "path" argument and run the operation again..
[2020-11-03T17:37:38.865]
Stack:    at Microsoft.Azure.Functions.PowerShellWorker.AzFunctionInfo.GetParameters(String scriptFile, String entryPoint, ScriptBlockAst& scriptAst) in D:\a\1\s\src\FunctionInfo.cs:line 186
[2020-11-03T17:37:38.866]    at Microsoft.Azure.Functions.PowerShellWorker.AzFunctionInfo..ctor(RpcFunctionMetadata metadata) in D:\a\1\s\src\FunctionInfo.cs:line 73
[2020-11-03T17:37:38.867]    at Microsoft.Azure.Functions.PowerShellWorker.FunctionLoader.LoadFunction(FunctionLoadRequest request) in D:\a\1\s\src\FunctionLoader.cs:line 52
[2020-11-03T17:37:38.868]    at Microsoft.Azure.Functions.PowerShellWorker.RequestProcessor.ProcessFunctionLoadRequest(StreamingMessage request) in D:\a\1\s\src\RequestProcessor.cs:line 226.
cholmes12 commented 3 years ago

I get this error every time I run an Azure Function. Is there a way to resolve it? I have proxies.json configured.

heglund commented 3 years ago

I can second this - I seem to be having the same exact issue.