Oryx
Oryx copied to clipboard
Blazor WASM App + Azure Static Website + CosmosDB binding + Github Actions = 'cosmosDB' with missing or invalid direction
Bug Report
I used the Github action file that Azure auto generates with. I am using "Microsoft.NET.Sdk.Functions" Version="4.1.0"
My code:
[FunctionName("ProductsGet")]
public static IActionResult GetAllProducts(
[HttpTrigger(AuthorizationLevel.Anonymous, "get", Route = "products")] HttpRequest req,
[CosmosDB(
databaseName: "productsdb",
collectionName: "products",
ConnectionStringSetting = "CosmosDBConnection")]
IEnumerable<Product> products,
ILogger log)
{
log.LogInformation("Getting products");
return new OkObjectResult(products);
}
It run fines locally, but when it gets to the Build and Deploy stage of the Github action it throws this error:
---End of Oryx build logs--- Function Runtime Information. OS: windows, Functions Runtime: ~4, dotnet version: 6.0 Finished building function app with Oryx Error in processing api build artifacts: the file 'ProductsGet/function.json' specifies a binding of type 'cosmosDB' with missing or invalid direction ''. Visit https://github.com/Azure/azure-functions-host/wiki/function.json for more information.
The project is like this one, except I tried to integrate CosmosDB
I have the same issue with the SignalR binding
I had the Exact SameProblem , Reverting back to Microsoft.NET.Sdk.Function 4.01 (Instead of 4.1.0) solved it for me
I had the Exact SameProblem , Reverting back to Microsoft.NET.Sdk.Function 4.01 (Instead of 4.1.0) solved it for me
Thanks! Reverting to 4.0.1 solved the problem for me too.
This issue seems resolved. Will be closing this issue. If this is still relevant and impacting you please open a new issue and link back to this issue for reference.