BlazorWasmPreRendering.Build: publish and deploy by action from github - Oryx has failed to build the solution.

I use static web app on azure and publish through github action.

this is the error i get: /var/nuget/blazorwasmprerendering.build/2.0.0-preview.4/build/BlazorWasmPreRendering.Build.targets(58,5): error MSB3073: The command "dotnet "/var/nuget/blazorwasmprerendering.build/2.0.0-preview.4/build/../tools/net6.0/BlazorWasmPreRendering.Build.dll" -a "SD.WEB" -t "SD.WEB.App" --selectorofrootcomponent "#app,app" --selectorofheadoutletcomponent "head::after" -p "/bin/staticsites/ss-oryx/app" -i "/github/workspace/SD.WEB/obj/Release/net6.0/." -m "" -f "net6.0" --serviceworkerassetsmanifest "service-worker-assets.js" -e "Prerendering" --locale "en" -o "IndexHtmlInSubFolders" -u "" -r "Static" --serverport "5050-5999" --bwapoptionsxorkey """ exited with code 1. [/github/workspace/SD.WEB/SD.WEB.csproj] | 1 | Please build your app locally before publishing. | https://docs.microsoft.com/en-us/azure/app-service/configure-language-dotnetcore?pivots=platform-linux

my project: https://github.com/drma-dev/SD

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 25 (12 by maintainers)

Most upvoted comments

I don’t think I was ever going to find that out. I’m bad at authentication.

@drma-dev [Progress report] I’m investigating the problem that your site could not prerender with the “BlazorWasmPreRendering.Build” after upgrade to .NET7. Unfortunately, it has been a difficult task. I can’t say anything about the root reason for now, but I think that there is a possibility the Azure static web app’s authentication library might involve with this problem. I continue to try to resolve this problem.

Getting http://127.0.0.1:5050/...
  Unhandled exception. System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 100 seconds elapsing.
   ---> System.TimeoutException: The operation was canceled.
   ---> System.Threading.Tasks.TaskCanceledException: The operation was canceled.
   ---> System.IO.IOException: Unable to read data from the transport connection: Operation canceled.
   ---> System.Net.Sockets.SocketException (125): Operation canceled
     --- End of inner exception stack trace ---
     at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
     at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
     at System.Net.Http.HttpConnection.InitialFillAsync(Boolean async)
     at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
     --- End of inner exception stack trace ---
     at System.Net.Http.HttpConnection.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
     at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
     at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
     at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
     --- End of inner exception stack trace ---
     --- End of inner exception stack trace ---
     at System.Net.Http.HttpClient.HandleFailure(Exception e, Boolean telemetryStarted, HttpResponseMessage response, CancellationTokenSource cts, CancellationToken cancellationToken, CancellationTokenSource pendingRequestsCts)
     at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
     at Toolbelt.Blazor.WebAssembly.PreRendering.Build.StaticlizeCrawler.SaveToStaticFileAsync(ValueTuple`3 args) in C:\Projects\My\Blazor\PreRendering\BlazorWasmPreRendering.Build\StaticlizeCrawler.cs:line 120
     at Toolbelt.Blazor.WebAssembly.PreRendering.Build.StaticlizeCrawler.SaveToStaticFileAsync() in C:\Projects\My\Blazor\PreRendering\BlazorWasmPreRendering.Build\StaticlizeCrawler.cs:line 81
     at Toolbelt.Blazor.WebAssembly.PreRendering.Build.Program.PreRenderToStaticFilesAsync(CommandLineOptions commandLineOptions, BlazorWasmPrerenderingOptions prerenderingOptions) in C:\Projects\My\Blazor\PreRendering\BlazorWasmPreRendering.Build\Program.cs:line 56
     at Toolbelt.Blazor.WebAssembly.PreRendering.Build.Program.Main(String[] args) in C:\Projects\My\Blazor\PreRendering\BlazorWasmPreRendering.Build\Program.cs:line 28
     at Toolbelt.Blazor.WebAssembly.PreRendering.Build.Program.<Main>(String[] args)
  Aborted (core dumped)

I’m trying to solve it with IMemoryCache, if it doesn’t work, then I’m going to use OnAfterRenderAsync .

now is public