The prerendering build process did not complete within the timeout period of 50 seconds.
See original GitHub issueDescribe the bug
When I upgrade to Angular 8,and run the spa project on ssr mode,it thorw the timeout exception:
The prerendering build process did not complete within the timeout period of 50 seconds.
To Reproduce
Steps to reproduce the behavior:
- Using this version of ASP.NET Core 2.2
- Using Angular Template and upgrade the angular version to 8.0
- Run the project on SSR mode.
- See error
- Remove the
AngularCliBuilder,build the ssr bundles with angular-cli and it work…
my ssr options:
app.UseSpa(spa =>
{
spa.Options.SourcePath = "ClientApp";
spa.UseSpaPrerendering(options =>
{
options.BootModulePath = $"{spa.Options.SourcePath}/dist/server/main.js";
options.BootModuleBuilder = env.IsDevelopment()
? new AngularCliBuilder(npmScript: "build:ssr")
: null;
options.ExcludeUrls = new[] { "/sockjs-node" };
options.SupplyData = (context, data) =>
{
data.Add("Cookies", context.Request.Cookies);
};
});
if (env.IsDevelopment())
{
//spa.UseAngularCliServer(npmScript: "start");
spa.UseProxyToSpaDevelopmentServer("http://localhost:4200");
}
});
Expected behavior
Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
output of dotnet --info
.NET Core SDK(反映任何 global.json):
Version: 3.0.100-preview4-011223
Commit: 118dd862c8
运行时环境:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview4-011223\
Host (useful for support):
Version: 3.0.0-preview4-27615-11
Commit: ee54d4cbd2
.NET Core SDKs installed:
2.2.204 [C:\Program Files\dotnet\sdk]
3.0.100-preview4-011223 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview4-19216-03 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview4-27615-11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-preview4-27613-28 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:6 (2 by maintainers)
Top Results From Across the Web
ASP.Net MVC Core: The prerendering build process did ...
TimeoutException : The prerendering build process did not complete within the timeout period of 50 seconds. Check the log output for error ...
Read more >The Angular CLI process did not start listening for requests ...
TimeoutException : The Angular CLI process did not start listening for requests within the timeout period of 50 seconds.
Read more >Can I use asp.net core 3.1 with angualr 11
[Note] You might meet the "The Angular CLI process did not start listening for requests within the timeout period of 0 seconds.
Read more >The Angular CLI process did not start listening for requests ...
Complete list of page response is : TimeoutException: The Angular CLI process did not start listening for requests within the timeout period of...
Read more >[Fix]-The Angular CLI process did not start listening for requests ...
Net MVC Core: The prerendering build process did not complete within the timeout period of 50 seconds · Exception: In process hosting is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Just ran into this myself during an Angular 8 upgrade. It appears the output of the SSR build process no longer contains output matching the Regex(“Date”) as required by https://github.com/aspnet/AspNetCore/blob/7269dbb73f4aa0ebf5ebb8bc07a076ee181851be/src/Middleware/SpaServices.Extensions/src/AngularCli/AngularCliBuilder.cs#L65
Under Angular 8, my build:ssr output is as follows (this is based on output generated by @angular-devkit/build-angular:server):
However, the browser build still contains the string “Date”:
@ElderJames @JasonBro My extremely naive workaround for now is to append an “echo Date” to the end of my build:ssr script definition in package.json, e.g.:
"build:ssr": "ng build --configuration=production --project=test-spa-ssr && echo Date",This works around the issue for me.
Any progress in this issue? esoderquist’s workaround works, but does not seem to be a durable solution.