Dealing with slow XHR requests while using Server Side Rendering #258

Closed
opened 2025-08-09 17:15:36 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @joelnotified on 12/18/2017

Hi,
I've started using Microsoft.AspNetCore.SpaServices.Extensions 2.0.0-preview1-final (as described here https://github.com/aspnet/JavaScriptServices/issues/1288#issuecomment-346003334) to enable SSR.

It works just fine. However, during boot of my application I have an XHR request that for various reasons might take some time. If it does, then the SSR will timeout and I get an error like "NodeInvocationException: Prerendering timed out after 30000ms because the boot function in '../Clients/dist-server/main.bundle.js' returned a promise that did not resolve or reject".

Can I set some kind of fallback so that the server ignores requests or aborts SSR if if should take more than a couple of seconds?

*Originally created by @joelnotified on 12/18/2017* Hi, I've started using `Microsoft.AspNetCore.SpaServices.Extensions 2.0.0-preview1-final` (as described here https://github.com/aspnet/JavaScriptServices/issues/1288#issuecomment-346003334) to enable SSR. It works just fine. However, during boot of my application I have an XHR request that for various reasons might take some time. If it does, then the SSR will timeout and I get an error like "NodeInvocationException: Prerendering timed out after 30000ms because the boot function in '../Clients/dist-server/main.bundle.js' returned a promise that did not resolve or reject". Can I set some kind of fallback so that the server ignores requests or aborts SSR if if should take more than a couple of seconds?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#258
No description provided.