-
Notifications
You must be signed in to change notification settings - Fork 26.2k
SSR outputs <!--container--> instead of HTML as per template syntax #60871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, could you please provide a minimal reproduction of your issue via a github repo or a stackblitz, thank you. |
I am going to try, give me a couple of minutes. |
Here is the link to the StackBlitz: https://stackblitz.com/edit/stackblitz-starters-duec5vxj?file=README.md The libraries have been packed as they are private. The issue is happening on route Ideally code is downloaded locally and is served so that page source can be viewed when accessing for example |
Sorry but this is not a minimal repro. If you don't get any content, it could be because your app became stable before the data was loaded. |
It is happening when a lot of data is being retrieved from Firestore in Firebase. I have tried everything, even Angular is aware of the data fetched from Firestore. This is evident from the I don't think the app is becoming stable... I think it is more of a hard coded timeout on SSR which doesn't allow all the HTML to be generated. If you want, I can create a StackBlitz of the library concerned. |
If you can convert your reproduction into a truly minimal repro with just the specific case where this occurs, we'd be happy to look more into it. |
I managed to find the problem. It is with NgOptimizedImage. I was getting this error below, but I was ignoring it as the content was still being rendered on the client.
This error is marking the app as "stable" and allowing SSR to serialize... Perhaps this should be a warning rather than an error? My suggestion is that the prefetching is not added to the head on SSR if this occurs, but it shouldn't let the application become stable and serialize... The same does not happen on the below.
|
…ge` exceeds the preload limit This should not be treated as a hard error, as it doesn’t break the application but merely degrades performance. Closes angular#60871
Hi @alan-agius4. Just saw the commits and wanted to let you know—the issue of serialisation is also occurring on production mode, not only when the error is thrown on development mode. |
@davidbusuttil, can you please share the repro again as it appears to have been deleted. |
…ge` exceeds the preload limit This should not be treated as a hard error, as it doesn’t break the application but merely degrades performance. Closes angular#60871 (cherry picked from commit 8f25d4a)
Hi @alan-agius4. Here is the issue reproduced: https://stackblitz.com/edit/stackblitz-starters-mtwt34g2. |
Hi @davidbusuttil, https://gist.github.com/alan-agius4/3429095c90111a7d8f44ffc34d38c729 |
Thanks @alan-agius4. I was wrong than. Issue only occurs on development configuration. If I re-encounter the problem, I will let you know. Thanks a lot for the help! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are the source of the bug?
Don't known / other
Is this a regression?
No
Description
Introduction
I am using Firestore to store data for a CMS.
The data is stored in a field called
blocks
.The CMS is divided into two components: Block and Inline.
Block Component
block.component.ts
block.component.html
Inline Component
inline.component.ts
inline.component.html
Generating the Content
When the blocks are retrieved from Firestore, they are simply loaded as follows (example):
The Issue
After a number of iterations, SSR stops rendering the HTML, and instead, it outputs a
<!--container-->
instead, which is simply used for hydration.What Should Happen
SSR should wait until all HTML is rendered and avoid outputing
<!--container-->
as this is not good for SEO.Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: