-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: ion-content fullscreen is not compatible with pre-rendering #27411
Comments
Thanks for the report. I can reproduce the reported out of memory error, but I don't see anything that would indicate this is an Ionic bug. Have you tried filing an issue with the Angular team? |
Thanks for your reply. I haven't reported the issue to the Angular team yet. But after removing the IonicServerModule from the imports in app.server.module the page starts to render (obviously the ionic components have some visual issues, but all other added components render fine). Also Angular starter app works well with ssr. |
Are you able to identify which part of If you have a stack trace with the source coming from Ionic-related code, that would be helpful. |
Unfortunately, the only logs I have currently come from the prod build, so they are not very readable, but I also attach the main.ts file related to reported logs (https://github.com/WDrzewiecki/ionic-ssr/blob/main/main.js) And these are my log:
As you can see line 161244 is part of hydrateIonicComponents function so maybe this can help somehow. |
Is there a way I can reproduce this in a development build? |
Just change in angular.json file in serve-ssr from |
Hello @WDrzewiecki can you try with this dev-build and let me know if you experience any issues?
The problematic UI was Related Stencil bugs that should be closed with this: |
Everything seems to be working fine now, thank you so much for your assistance |
Issue number: Resolves #27411, ionic-team/stencil#2429, ionic-team/stencil#4076 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Rendering `<ion-content fullscreen="true">` in an Angular Universal project will result in a javascript heap exception and the browser tab timing out. `forceUpdate` is not a compatible API with pre-rendering and results in calling itself indefinitely. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Updates the fullscreen implementation of `ion-content` to only call `forceUpdate` and related functionality when running in a browser environment. - `<ion-content fullscreen="true">` is compatible with Angular Universal ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Dev-build: `7.0.6-dev.11683653232.1ddc5840` ✅
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
SSR not working after upgrading to angular 16, even in ionic starter app. After starting dev server and opening the app, the page loads until the server throws out of memory.
With a production build server throws "NotYetImplemented" error and returns only original index.html file without rendered page.
Expected Behavior
SSR should work with angular 16.
Steps to Reproduce
OR
Code Reproduction URL
https://github.com/WDrzewiecki/ionic-ssr
Ionic Info
Ionic:
Ionic CLI : 7.1.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.0.5
@angular-devkit/build-angular : 16.0.0
@angular-devkit/schematics : 16.0.0
@angular/cli : 16.0.0
@ionic/angular-toolkit : 9.0.0
Capacitor:
Capacitor CLI : 5.0.1
@capacitor/android : not installed
@capacitor/core : 5.0.1
@capacitor/ios : not installed
Utility:
cordova-res : 0.15.4
native-run : 1.7.2
System:
NodeJS : v18.16.0 (/usr/local/bin/node)
npm : 9.5.1
OS : macOS Unknown
Additional Information
No response
The text was updated successfully, but these errors were encountered: