Open SouravKumar89 opened 5 years ago
Hi I had a similar bug. Try increasing the timeout in class HttpRequestExtensions from 30000 to a higher value
@nsaban - ok i'll try that.
i tried changing the httprequestExceptions to 100000ms but then it thrown this error-
Microsoft.AspNetCore.NodeServices.HostingModels.NodeInvocationException: The Node invocation timed out after 60000ms.\r\nYou can change the timeout duration by setting the InvocationTimeoutMilliseconds property on NodeServicesOptions.\n\nThe 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.\r\n at Microsoft.AspNetCore.NodeServices.HostingModels.OutOfProcessNodeInstance.
I also have similar problem. In my case I have lazy loading in routing and I'm adding sub routes children in the module using:
@NgModule({ imports: [ RouterModule.forChild(routes) ], exports: [RouterModule] })
When I try to reload some of these lazy loaded children routes or hit directly in URL:
{"statusCode":500,"message":"Prerendering timed out after 30000ms because the boot function in '/ClientApp/dist/main-server' returned a promise that did not resolve or reject. Make sure that your boot function always resolves or rejects its promise. You can change the timeout value using the 'asp-prerender-timeout' tag helper.\r\n"}
My Microsoft.AspNetCore.All is version 2.2.0
``
Below is my Routing code - where while deploying in server the router is throwing the above(image) error if we are refreshing route other '/home' or '/' .
app-Routing.ts file-->
const appRoutes: Routes = [ { path: '', redirectTo: 'home', pathMatch: 'full', data: { name: 'home' } }, { path: 'home', component: HomeComponent, data: { name: 'home', title: 'Home' } }, { path: 'terms', loadChildren: './containers/terms/terms.module#TermsModule', data: { name: 'terms', title: 'Terms' } }, { path: 'policy', component: PolicyComponent,, data: { name: 'policy', title: 'Policy' } }]
I have implemented lazy loading also for some component as you can see. Every thing is working fine in Local but with AOT production it's running fine with router btn click navigation but not with refreshing any other page other than home page. my webpack version is-2.2.0 and "aspnet-webpack": "^2.0.1", Can anyone help me! is it lazy loading issue or something else!!