Azure / static-web-apps

Azure Static Web Apps. For bugs and feature requests, please create an issue in this repo. For community discussions, latest updates, kindly refer to the Discussions Tab. To know what's new in Static Web Apps, visit https://aka.ms/swa/ThisMonth
https://aka.ms/swa
MIT License
327 stars 56 forks source link

BlazorWebAssembly Build is failing continuously #1110

Open bkumarcredex opened 1 year ago

bkumarcredex commented 1 year ago

We are using github action to deploy blazor webassembly app on Azure static webApp, which was working fine motst of the time, but from today we are getting same error continuously, **Please build your app locally before publishing. | https://docs.microsoft.com/en-us/azure/app-service/configure-language-dotnetcore?pivots=platform-linux

---End of Oryx build logs--- Oryx has failed to build the solution.**

While my app is building fine, there is no error at all. I have not added any new dependency. Why it is failing to build the app now?

Here is Error snippet from github action:

`BL0005: Component parameter 'SelectedItems' should not be set outside of its component. [/github/workspace/Client/Client.csproj] /github/workspace/Client/Pages/VehicleServices/RequestBase.cs(1109,17): warning BL0005: Component parameter 'SelectedItems' should not be set outside of its component. [/github/workspace/Client/Client.csproj] /github/workspace/Client/Pages/VehicleServices/OtherRequestBase.cs(1113,17): warning BL0005: Component parameter 'SelectedItems' should not be set outside of its component. [/github/workspace/Client/Client.csproj] /github/workspace/Client/Pages/VehicleServices/SecondRequestBase.cs(1217,9): warning BL0005: Component parameter 'SelectedItems' should not be set outside of its component. [/github/workspace/Client/Client.csproj] | 1 | Please build your app locally before publishing. | https://docs.microsoft.com/en-us/azure/app-service/configure-language-dotnetcore?pivots=platform-linux

---End of Oryx build logs--- Oryx has failed to build the solution.

For further information, please visit the Azure Static Web Apps documentation at https://docs.microsoft.com/en-us/azure/static-web-apps/ `

nicolasxbx commented 10 months ago

I have the same problem. What fixed it for you? Thank you.

bkumarcredex commented 10 months ago

It was related to github action, clear your action history, check github action usage. I don't remember exactly the process.

nicolasxbx commented 10 months ago

I found what caused the problem for me. It wasn't Github nor Azure. In a .razor Page I added a dynamic PageTitle (from an injected-Service function) instead of a static string. Yet this dynamic PageTitle ran and built fine locally, but the Oryx-Deployment doesn't accept it I guess. Reverting from <PageTitle>@InjectedService.Function()</PageTitle> to <PageTitle>XYZ</PageTitle> fixed it for me and Oryx-Deployment worked again.

Edit: Nevermind. After changing my code a bit again, adding new libraries, the same issue occurs. Here they seemed to have found the issue, which is already fixed in .Net 7 and 8: https://github.com/microsoft/Oryx/issues/1187 The main issue seems to be the compilation of native assemblies.