Title: Synchronous Firestore functions such as `where` and `doc` warn about the injection context although the zone wrapper does nothing for them · Issue #3841 · angular/angularfire · GitHub
Open Graph Title: Synchronous Firestore functions such as `where` and `doc` warn about the injection context although the zone wrapper does nothing for them · Issue #3841 · angular/angularfire
X Title: Synchronous Firestore functions such as `where` and `doc` warn about the injection context although the zone wrapper does nothing for them · Issue #3841 · angular/angularfire
Description: Calling where, orderBy, query, collection, doc, increment or a similar function from @angular/fire/firestore outside an injection context prints "Calling Firebase APIs outside of an Injection context may destabilize your application", pl...
Open Graph Description: Calling where, orderBy, query, collection, doc, increment or a similar function from @angular/fire/firestore outside an injection context prints "Calling Firebase APIs outside of an Injection conte...
X Description: Calling where, orderBy, query, collection, doc, increment or a similar function from @angular/fire/firestore outside an injection context prints "Calling Firebase APIs outside of an Injection ...
Opengraph URL: https://github.com/angular/angularfire/issues/3841
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Synchronous Firestore functions such as `where` and `doc` warn about the injection context although the zone wrapper does nothing for them","articleBody":"\nCalling `where`, `orderBy`, `query`, `collection`, `doc`, `increment` or a similar function from `@angular/fire/firestore` outside an injection context prints \"Calling Firebase APIs outside of an Injection context may destabilize your application\", plus a per-call line at `LogLevel.VERBOSE`. Building a query inside a `switchMap` is the usual way to hit it (#3611, #3607).\n\nThese functions only build or compare values. They take no callback, return no Promise or Observable, and schedule no timer, promise callback or event listener, so the zone wrapper has nothing to do for them and the warning is a false alarm. `@angular/fire/firestore/lite` wraps the same functions.\n\n### Proposal\n\nRe-export these functions unwrapped, as #3613 already does for `arrayUnion`, `arrayRemove`, `serverTimestamp`, `average` and `count`:\n\n- Query and reference builders: `where`, `orderBy`, `limit`, `limitToLast`, `startAt`, `startAfter`, `endAt`, `endBefore`, `and`, `or`, `query`, `collection`, `collectionGroup`, `doc`, `documentId`.\n- Field values: `increment`, `deleteField`, `vector`, `sum`.\n- Comparators: `refEqual`, `queryEqual`, `snapshotEqual`, `aggregateFieldEqual`, `aggregateQuerySnapshotEqual`.\n- Firestore's own `setLogLevel`.\n\n`getFirestore`, `initializeFirestore`, `connectFirestoreEmulator`, `writeBatch` and the persistent cache index functions stay wrapped, because they register an event listener or start the Firestore client.\n\nAdd specs that record every task each unwrapped function schedules, so a Firebase release that adds asynchronous work to one of them fails CI.\n\n### What changes for apps\n\nNo export or type changes. The functions above stop printing the injection-context warning. In a zone.js app, a call made inside an injection context but outside the Angular zone no longer triggers a change detection pass that had nothing to update.\n\n","author":{"url":"https://github.com/armando-navarro","@type":"Person","name":"armando-navarro"},"datePublished":"2026-11-07T00:59:57Z","url":"https://github.com/angular/angularfire/issues/3841"}
| 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:2d619084-5a92-e7ad-65da-314a7a4d52a7 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 88A6:224815:2D26839:3BCB956:6B036002 |
| html-safe-nonce | e3e6210aa92b53c749a98f014d457c3b98316752d061a3da9485949ef50a77f6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OEE2OjIyNDgxNToyRDI2ODM5OjNCQ0I5NTY6NkIwMzYwMDIiLCJ2aXNpdG9yX2lkIjoiMjA1NzQwMDM2MTQ4Mzk4NDg5OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 492d5994b80febca09ee570fcb635a76bcc06d80bd5db9188a6856881bc08437 |
| hovercard-subject-tag | issue:6253427072 |
| 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/3841/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5805ebbdd278fcbf2c6019dd431dba92bdf482623c57363e404966943282ab06/angular/angularfire/issues/3841 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5805ebbdd278fcbf2c6019dd431dba92bdf482623c57363e404966943282ab06/angular/angularfire/issues/3841 |
| og:image:alt | Calling where, orderBy, query, collection, doc, increment or a similar function from @angular/fire/firestore outside an injection context prints "Calling Firebase APIs outside of an Injection conte... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | armando-navarro |
| 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