Title: angularfire2@5.0.0-rc.7.0-next Change Detection Irregularities · Issue #1583 · angular/angularfire · GitHub
Open Graph Title: angularfire2@5.0.0-rc.7.0-next Change Detection Irregularities · Issue #1583 · angular/angularfire
X Title: angularfire2@5.0.0-rc.7.0-next Change Detection Irregularities · Issue #1583 · angular/angularfire
Description: I'm experiencing a reproducible change detection issue with angularfire2@5.0.0-rc.7.0-next, where the first emissions from snapshotChanges() and valueChanges() are not triggering Angular change detection appropriately. https://stackblitz...
Open Graph Description: I'm experiencing a reproducible change detection issue with angularfire2@5.0.0-rc.7.0-next, where the first emissions from snapshotChanges() and valueChanges() are not triggering Angular change det...
X Description: I'm experiencing a reproducible change detection issue with angularfire2@5.0.0-rc.7.0-next, where the first emissions from snapshotChanges() and valueChanges() are not triggering Angular change...
Mail addresses
jamesdaniels@google.com
Opengraph URL: https://github.com/angular/angularfire/issues/1583
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"angularfire2@5.0.0-rc.7.0-next Change Detection Irregularities","articleBody":"\u003c!--\r\n\r\nIMPORTANT! YOU MUST FOLLOW THESE INSTRUCTIONS OR YOUR ISSUE WILL BE CLOSED.\r\n\r\nThank you for contributing to the Angular and Firebase communities!\r\n\r\nHave a usage question?\r\n=======================\r\nWe get lots of those and we love helping you, but GitHub is not the best place for them and they will be closed. Here are some resources to get help:\r\n\r\n- Go through the Developer's Guide: https://github.com/angular/angularfire2#developer-guide\r\n\r\nIf the official documentation doesn't help, try asking through our officially supported channels:\r\n\r\n- Firebase Google Group: https://groups.google.com/forum/#!forum/firebase-talk\r\n- Stack Overflow: https://stackoverflow.com/questions/tagged/angular (include the firebase and angularfire tags, too!)\r\n\r\n*Please avoid double posting across multiple channels!*\r\n\r\nThink you found a bug?\r\n=======================\r\nYeah, we're definitely not perfect! Please use the bug report template below and include a minimal repro when opening the issue.\r\n\r\nHave a feature request?\r\n========================\r\nGreat, we love hearing how we can improve our products! Remove the template below and\r\nprovide an explanation of your feature request. Provide code samples if applicable. Try to\r\nthink about what it will allow you to do that you can't do today? How will it make current\r\nworkarounds straightforward? What potential bugs and edge cases does it help to avoid?\r\n\r\n-->\r\n\r\nI'm experiencing a reproducible change detection issue with `angularfire2@5.0.0-rc.7.0-next`, where the first emissions from `snapshotChanges()` and `valueChanges()` are not triggering Angular change detection appropriately.\r\n\r\n\u003chttps://stackblitz.com/edit/angular-nkqyhq>\r\n\r\nAs demonstrated in the StackBlitz example above, the first values emitted by AngularFireDatabase `valueChanges()` Observables are being populated as expected, but UI is not redrawing automatically (unless triggered manually, or by something else). Subsequent `valueChanges()` emissions appear to trigger change detection as expected, reproducible in the above example by navigating away from and back to the example routed component.\r\n\r\nThis issue first appears with the merging of #1454 (commit e343f137).\r\n\r\nI haven't had a chance to dig into it, but this behavior appears to be related to the new `FirebaseZoneScheduler`; the current implementation of the `keepUnstableUntilFirst()` method in particular has me a bit puzzled.\r\n\r\n\u003chttps://github.com/angular/angularfire2/blob/master/src/core/angularfire2.ts#L25-L33>\r\n\r\n### 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. -->\r\n\r\n**Angular:** 5.2.10\r\n\r\n```\r\n% ng --version\r\n\r\n _ _ ____ _ ___\r\n / \\ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|\r\n / △ \\ | '_ \\ / _` | | | | |/ _` | '__| | | | | | |\r\n / ___ \\| | | | (_| | |_| | | (_| | | | |___| |___ | |\r\n/_/ \\_\\_| |_|\\__, |\\__,_|_|\\__,_|_| \\____|_____|___|\r\n |___/\r\n\r\nAngular CLI: 1.7.4\r\nNode: 9.11.1\r\nOS: darwin x64\r\nAngular: 5.2.10\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... http, language-service, platform-browser\r\n... platform-browser-dynamic, router\r\n\r\n@angular/cdk: 5.2.5\r\n@angular/cli: 1.7.4\r\n@angular/flex-layout: 5.0.0-beta.14\r\n@angular/material: 5.2.5\r\n@angular-devkit/build-optimizer: 0.3.2\r\n@angular-devkit/core: 0.3.2\r\n@angular-devkit/schematics: 0.3.2\r\n@ngtools/json-schema: 1.2.0\r\n@ngtools/webpack: 1.10.2\r\n@schematics/angular: 0.3.2\r\n@schematics/package-update: 0.3.2\r\ntypescript: 2.6.2\r\nwebpack-bundle-analyzer: 2.11.1\r\nwebpack: 3.11.0\r\n```\r\n\r\n**Firebase:** 4.12.1\r\n\r\n**AngularFire:** 5.0.0-rc.7.0-next\r\n\r\n**Browser:** Chrome OS v66.0.3359.139\r\n\r\n**Operating system:** macOS Sierra v10.12.6\r\n\r\n### How to reproduce these conditions\r\n\r\n**Failing test unit, Plunkr, or JSFiddle demonstrating the problem**\r\n\r\n\u003c!-- \r\nProvide a failing test unit, or create a minimal, complete, and \r\nverifiable example (http://stackoverflow.com/help/mcve) using either \r\nPlunker (http://plnkr.co/) or JSFiddle (https://jsfiddle.net/).\r\n-->\r\n\r\n\u003chttps://stackblitz.com/edit/angular-nkqyhq>\r\n\r\n**Steps to set up and reproduce**\r\n\r\n\u003c!-- detailed instructions to run your minimal repro or to recreate the environment -->\r\n\r\n1. Create a component which injects `AngularFireDatabase`\r\n1. Subscribe to `valueChanges()` Observable\r\n1. Interpolate value change in template (will not display first result from Observable)\r\n\r\n### Debug output\r\n\r\n** Errors in the JavaScript console **\r\n\r\nNone.\r\n\r\n** Output from `firebase.database().enableLogging(true);` **\r\n\r\nNot sure how to enable this.\r\n\r\n** Screenshots **\r\n\r\nN/A\r\n\r\n### Expected behavior\r\n\r\nFirst value emitted from `AngularFireDatabase.valueChanges()` Observable consistently triggers change detection.\r\n\r\n### Actual behavior\r\n\r\nFirst value emitted from `AngularFireDatabase.valueChanges()` Observable does not consistently trigger change detection.","author":{"url":"https://github.com/byrondover","@type":"Person","name":"byrondover"},"datePublished":"2018-04-27T09:06:49Z","url":"https://github.com/angular/angularfire/issues/1583"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9972438a-4bb5-8421-01d6-3121559ad4fa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 81F4:FDE63:22A5191:2DB89FA:6B036015 |
| html-safe-nonce | 0ed93b7cbf18b89d01a8315259a62e627990fb473bd70f45790f147d2f92e697 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MUY0OkZERTYzOjIyQTUxOTE6MkRCODlGQTo2QjAzNjAxNSIsInZpc2l0b3JfaWQiOiI1Mzg4MDcxNzAxOTQ5MTQ1MTA5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 351ba5963ac788593acb5a7dcd55188269014c16eea901c4bee28b5da0cb2d4f |
| hovercard-subject-tag | issue:318332387 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angularfire/1583/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9fb035c50f84121e5b06bdd4fc5ba88bea8472e207e18168974f192f4178f9da/angular/angularfire/issues/1583 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9fb035c50f84121e5b06bdd4fc5ba88bea8472e207e18168974f192f4178f9da/angular/angularfire/issues/1583 |
| og:image:alt | I'm experiencing a reproducible change detection issue with angularfire2@5.0.0-rc.7.0-next, where the first emissions from snapshotChanges() and valueChanges() are not triggering Angular change det... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | byrondover |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angularfire git https://github.com/angular/angularfire.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49453413 |
| octolytics-dimension-repository_nwo | angular/angularfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49453413 |
| octolytics-dimension-repository_network_root_nwo | angular/angularfire |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width