René's URL Explorer Experiment


Title: Version 5.4.2 breaks Angular Universal server rendering · Issue #2341 · angular/angularfire · GitHub

Open Graph Title: Version 5.4.2 breaks Angular Universal server rendering · Issue #2341 · angular/angularfire

X Title: Version 5.4.2 breaks Angular Universal server rendering · Issue #2341 · angular/angularfire

Description: Version info Angular: 9.0.4 Firebase: 7.9.3 AngularFire: 5.4.2 Other (e.g. Ionic/Cordova, Node, browser, operating system): How to reproduce these conditions Have an Angular Universal app that does an AngularFire query on page load. When...

Open Graph Description: Version info Angular: 9.0.4 Firebase: 7.9.3 AngularFire: 5.4.2 Other (e.g. Ionic/Cordova, Node, browser, operating system): How to reproduce these conditions Have an Angular Universal app that does...

X Description: Version info Angular: 9.0.4 Firebase: 7.9.3 AngularFire: 5.4.2 Other (e.g. Ionic/Cordova, Node, browser, operating system): How to reproduce these conditions Have an Angular Universal app that does...

Opengraph URL: https://github.com/angular/angularfire/issues/2341

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Version 5.4.2 breaks Angular Universal server rendering","articleBody":"### Version info\r\n\r\n\u003c!-- What versions of the following libraries are you using? Note that your issue may already\r\nbe fixed in the latest versions. --\u003e\r\n\r\n**Angular:**\r\n9.0.4 \r\n\r\n**Firebase:**\r\n7.9.3\r\n\r\n**AngularFire:**\r\n5.4.2\r\n\r\n**Other (e.g. Ionic/Cordova, Node, browser, operating system):**\r\n\r\n### How to reproduce these conditions\r\n\r\nHave an Angular Universal app that does an AngularFire query on page load. When you do this, you will see that `isStable` from the Angular `ApplicationRef` is immediately set to `true` at the moment of the database call.\r\n\r\nThis is a problem because it means the server response is sent back to the client BEFORE the data from the database is actually used to update the page (i.e. the server view does not contain the data even though it is returned).\r\n\r\nThis issue does not exist with Firebase `7.6.2` and AngularFire `5.3.0`. It only exists with Fireabase `7.9.3` and AngularFire `5.4.2`.\r\n\r\n**Failing test unit, Plunkr, or JSFiddle demonstrating the problem**\r\n\r\nN/A - I have this issue on a private repo, but have tested enough to confirm it almost certainly is an issue for anyone with this setup.\r\n\r\n**Steps to set up and reproduce**\r\n\r\nDo the following:\r\n\r\n1. Create an Angular Universal app with Angular 9+ and AngularFire `7.9.3`.\r\n2. In the `ngOnInit()` page lifecycle hook of any page, perform an AngularFire query. It can be any query\r\n3. Have a console.log() right after the AngularFire query completes and data is returned\r\n4. Add this code to the constructor of the page:\r\n\r\n```\r\nconstructor(ref: ApplicationRef) {\r\n  ref.isStable(isStable =\u003e console.log('isStable = ' + isStable);\r\n}\r\n```\r\n\r\nWhen you do this and load the app, you will see that `isStable` is set to true BEFORE the console.log from step 3 is executed. This means the server view is returned before we have a chance to do anything with the data coming back from AngularFire.\r\n\r\n**Sample data and security rules**\r\n\r\nN/A - issue not related to data or security rules\r\n\r\n### Debug output\r\n\r\n** Errors in the JavaScript console **\r\n\r\nN/A - there is no error, it is just that the data isn't included in the server view\r\n\r\n** Output from `firebase.database().enableLogging(true);` **\r\n\r\nN/A - related to firestore, not the realtime database\r\n\r\n** Screenshots **\r\n\r\nN/A - this is not a visual issue\r\n\r\n### Expected behavior\r\n\r\nThe expected behavior is that the Angular `ApplicationRef.isStable` is not set to true until after all async is complete AND the sync code that immediately follows the async code is complete.\r\n\r\n### Actual behavior\r\n\r\nThe actual behavior is that immediately when the AngularFire query is run, `isStable` is set to true and the server response immediately returns.\r\n","author":{"url":"https://github.com/jeffwhelpley","@type":"Person","name":"jeffwhelpley"},"datePublished":"2020-03-02T20:47:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/2341/angularfire/issues/2341"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:bc23b974-5224-8d5a-c3ef-dbe139268103
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBE1C:E2061:C26AD0:FEFAB3:6A5B074E
html-safe-nonce900494bc850f9a4f975eaea3761011d5db5051eaaaf77edd45ca6f67176884c7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRTFDOkUyMDYxOkMyNkFEMDpGRUZBQjM6NkE1QjA3NEUiLCJ2aXNpdG9yX2lkIjoiNTQ2NTQ3MjQxMTM4NTkyMzQwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf99cadec5905f809825329018e9d27ba46ab7804ceb1b860d4690f4504d0160d
hovercard-subject-tagissue:574238447
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angularfire/2341/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3d694db9e3b880d90c8e94c88b077932e257cfae81090a7f8f3c337080a1f826/angular/angularfire/issues/2341
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3d694db9e3b880d90c8e94c88b077932e257cfae81090a7f8f3c337080a1f826/angular/angularfire/issues/2341
og:image:altVersion info Angular: 9.0.4 Firebase: 7.9.3 AngularFire: 5.4.2 Other (e.g. Ionic/Cordova, Node, browser, operating system): How to reproduce these conditions Have an Angular Universal app that does...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejeffwhelpley
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
go-importgithub.com/angular/angularfire git https://github.com/angular/angularfire.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id49453413
octolytics-dimension-repository_nwoangular/angularfire
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49453413
octolytics-dimension-repository_network_root_nwoangular/angularfire
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angularfire/issues/2341#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangularfire%2Fissues%2F2341
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangularfire%2Fissues%2F2341
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangularfire
Reloadhttps://github.com/angular/angularfire/issues/2341
Reloadhttps://github.com/angular/angularfire/issues/2341
Reloadhttps://github.com/angular/angularfire/issues/2341
Please reload this pagehttps://github.com/angular/angularfire/issues/2341
angular https://github.com/angular
angularfirehttps://github.com/angular/angularfire
Notifications https://github.com/login?return_to=%2Fangular%2Fangularfire
Fork 2.2k https://github.com/login?return_to=%2Fangular%2Fangularfire
Star 7.8k https://github.com/login?return_to=%2Fangular%2Fangularfire
Code https://github.com/angular/angularfire
Issues 294 https://github.com/angular/angularfire/issues
Pull requests 20 https://github.com/angular/angularfire/pulls
Discussions https://github.com/angular/angularfire/discussions
Actions https://github.com/angular/angularfire/actions
Projects https://github.com/angular/angularfire/projects
Security and quality 0 https://github.com/angular/angularfire/security
Insights https://github.com/angular/angularfire/pulse
Code https://github.com/angular/angularfire
Issues https://github.com/angular/angularfire/issues
Pull requests https://github.com/angular/angularfire/pulls
Discussions https://github.com/angular/angularfire/discussions
Actions https://github.com/angular/angularfire/actions
Projects https://github.com/angular/angularfire/projects
Security and quality https://github.com/angular/angularfire/security
Insights https://github.com/angular/angularfire/pulse
Version 5.4.2 breaks Angular Universal server renderinghttps://github.com/angular/angularfire/issues/2341#top
https://github.com/jeffwhelpley
jeffwhelpleyhttps://github.com/jeffwhelpley
on Mar 2, 2020https://github.com/angular/angularfire/issues/2341#issue-574238447
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.