aspnetcore-angular-universal: The Node invocation timed out

I started a new project yesterday but after a few hours experimenting I get this error: An unhandled exception occurred while processing the request.

NodeInvocationException: The Node invocation timed out after 60000ms. You can change the timeout duration by setting the InvocationTimeoutMilliseconds property on NodeServicesOptions.

The first debugging step is to ensure that your Node.js function always invokes the supplied callback (or throws an exception synchronously), even if it encounters an error. Otherwise, the .NET code has no way to know that it is finished or has failed. Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance+<InvokeExportAsync>d__14.MoveNext()

If I follow documentation for removing server rendering, app works.

When I execute npm run build:dev the progress takes arround 55seconds. (If that helps)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 21 (7 by maintainers)

Most upvoted comments

Excellent! Hopefully someday we’ll try to get NodeServices to bubble them up all the way to the browser. I think it just gets lost in error limbo somewhere and outputs there for now

I am trying to use the Angular 4 oriented SPA template from the Microsoft SPA template. I generated the template using “dotnet new angular --name [project name]”. Everything was working fine until I started trying to use JWT for authentication in a manor that was successful for me when I was using the Angular2 ASP.NET Core starter kit that I found on a blog. I’ve implemented MarkPieszak’s last suggest by removing the server side prerendering via <app></app> replacement. I was able to get the project to run again but now it is not displaying the CSS bootstrap stuff correctly. More specifically, the hover colors on the NavBar aren’t working. I can’t say I understand the server-side prerendering enough to troubleshoot the problem.

Here are the nuget packages I am using from the *.cproj file:

<PackageReference Include="Microsoft.AspNetCore" Version="1.1.0" />
    <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="1.1.2" />
    <PackageReference Include="microsoft.aspnetcore.identity.entityframeworkcore" Version="1.1.2" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.SpaServices" Version="1.1.1" />
    <PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="1.1.0" />
    <PackageReference Include="Microsoft.EntityFrameworkCore" Version="1.1.2" />
    <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="1.1.2" />
    <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.0" />
    <PackageReference Include="Microsoft.IdentityModel.Tokens" Version="5.1.4" />
    <PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.1.4" />

I think that it is time for somebody from Microsoft to produce a template that has the Angular SPA, and the individual account authorization baked in together so the “rest of us” can start producing useful and productive projects for our clients. The time that I’ve wasted on trying to figure out all of this is a fine example of the downside of Microsoft’s new open source agendas.

as Mark said. to try to see vs output window set combox box on Asp.net core Web to see real errors

Do you have the node console up to see what the error is itself? Let me know. @yeganehaym Usually NodeServices is able to bubble up the error, but sometimes it gets caught in there somehow.