René's URL Explorer Experiment


Title: Firebase API called outside injection context - missing details on how to fix this · Issue #3629 · angular/angularfire · GitHub

Open Graph Title: Firebase API called outside injection context - missing details on how to fix this · Issue #3629 · angular/angularfire

X Title: Firebase API called outside injection context - missing details on how to fix this · Issue #3629 · angular/angularfire

Description: I am using the "^19.0.0" version of this package with newly created angular application using ng new (angular 19). Note that I have chosen options to enable ssr while creating the angular app using ng new. Now, a simple code like: import...

Open Graph Description: I am using the "^19.0.0" version of this package with newly created angular application using ng new (angular 19). Note that I have chosen options to enable ssr while creating the angular app using...

X Description: I am using the "^19.0.0" version of this package with newly created angular application using ng new (angular 19). Note that I have chosen options to enable ssr while creating the angular...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Firebase API called outside injection context - missing details on how to fix this","articleBody":"I am using the `\"^19.0.0\"` version of this package with newly created angular application using `ng new` (angular 19).\n \nNote that I have chosen options to enable ssr while creating the angular app using `ng new`.\n\nNow, a simple code like:\n\n```typescript\nimport { Component, OnInit } from '@angular/core';\nimport { RouterOutlet } from '@angular/router';\nimport { AsyncPipe, JsonPipe } from '@angular/common';\nimport { Observable } from 'rxjs';\nimport { Firestore, doc, docData } from '@angular/fire/firestore';\n\n@Component({\n  selector: 'app-root',\n  imports: [RouterOutlet, AsyncPipe, JsonPipe],\n  template: `\n    \u003cdiv>\n      Data from Firestore:\n      \u003cpre>{{ item$ | async | json }}\u003c/pre>\n    \u003c/div>\n  `,\n  styleUrl: './app.component.scss'\n})\nexport class AppComponent implements OnInit {\n  title = 'bla';\n  item$: Observable\u003cany> | undefined;\n\n  constructor(private firestore: Firestore) {}\n\n  ngOnInit(): void {\n    this.item$ = this.getDocument('test/BnKno4vcZKHqXrRbyFye');\n  }\n\n  getDocument(path: string): Observable\u003cany> {\n    const documentReference = doc(this.firestore, path);\n    return docData(documentReference);\n  }\n}\n```\ngive the following warnings (but the code is working):\n```\nCalling Firebase APIs outside of an Injection context may destabilize your application leading to subtle change-detection and hydration bugs. Find more at https://github.com/angular/angularfire/blob/main/docs/zones.md\nFirebase API called outside injection context: docData\nFirebase API called outside injection context: docData\n```\n**If angular fire could elaborate this error a bit saying what we have to do to fix this, that would be very nice.**","author":{"url":"https://github.com/vajahath","@type":"Person","name":"vajahath"},"datePublished":"2025-02-25T13:43:33Z","url":"https://github.com/angular/angularfire/issues/3629"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:14ac5008-a05e-202b-34fd-b6ade8303afa
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8F66:293912:3305AD2:4364606:6B03600B
html-safe-nonce7d1edba505bf1653e1c1269c58250dd58a931b78d96d5b9afa53e75e51da4420
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjY2OjI5MzkxMjozMzA1QUQyOjQzNjQ2MDY6NkIwMzYwMEIiLCJ2aXNpdG9yX2lkIjoiNDIxNjU4NTAxNjUyMTc0NDM5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf2398b9d72a39a2382f9768e40203784d682c8b1e0b2bcb9741422c590bdab81
hovercard-subject-tagissue:2878446119
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/3629/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ae66e20136ad58a4b30517f6cb0ad8e6a2e44b8373c431d12111eaa456f7671e/angular/angularfire/issues/3629
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ae66e20136ad58a4b30517f6cb0ad8e6a2e44b8373c431d12111eaa456f7671e/angular/angularfire/issues/3629
og:image:altI am using the "^19.0.0" version of this package with newly created angular application using ng new (angular 19). Note that I have chosen options to enable ssr while creating the angular app using...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevajahath
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/angular/angularfire/issues/3629#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangularfire%2Fissues%2F3629
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangularfire%2Fissues%2F3629
Sign uphttps://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/3629
Reloadhttps://github.com/angular/angularfire/issues/3629
Reloadhttps://github.com/angular/angularfire/issues/3629
angularhttps://github.com/angular
angularfirehttps://github.com/angular/angularfire
Codehttps://github.com/angular/angularfire
Issues162 (162)https://github.com/angular/angularfire/issues
Pull requests5 (5)https://github.com/angular/angularfire/pulls
Discussionshttps://github.com/angular/angularfire/discussions
Actionshttps://github.com/angular/angularfire/actions
Projectshttps://github.com/angular/angularfire/projects
Security and qualityhttps://github.com/angular/angularfire/security
Insightshttps://github.com/angular/angularfire/insights
https://github.com/angular/angularfire
New issuehttps://github.com/login?return_to=https://github.com/angular/angularfire/issues/3629
New issuehttps://github.com/login?return_to=https://github.com/angular/angularfire/issues/3629
#3721https://github.com/angular/angularfire/pull/3721
Firebase API called outside injection context - missing details on how to fix thishttps://github.com/angular/angularfire/issues/3629#top
#3721https://github.com/angular/angularfire/pull/3721
Fixed!Resolved in a current release.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22Fixed!%22
comp: docsDocumentation.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20docs%22
comp: zonesChange detection / zone.js / zoneless.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20zones%22
type: choreMaintenance with no user-facing behavior change.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22type%3A%20chore%22
version: current (v17+)Targets the current modular API (v17+).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22version%3A%20current%20(v17%2B)%22
21.0.0-rc.1https://github.com/angular/angularfire/milestone/29
https://github.com/vajahath
vajahathhttps://github.com/vajahath
on Feb 25, 2025https://github.com/angular/angularfire/issues/3629#issue-2878446119
https://github.com/google-oss-bot
google-oss-bothttps://github.com/google-oss-bot
on Feb 25, 2025https://github.com/angular/angularfire/issues/3629#issuecomment-2682027278
https://github.com/rgant
rganthttps://github.com/rgant
on Feb 25, 2025https://github.com/angular/angularfire/issues/3629#issuecomment-2682127018
https://github.com/angular/angularfire/blob/main/docs/zones.md#logginghttps://github.com/angular/angularfire/blob/main/docs/zones.md#logging
Firebase APIs outside of an Injection context #3607https://github.com/angular/angularfire/issues/3607
Firebase API called outside injection context #3605https://github.com/angular/angularfire/issues/3605
"Warning: Firebase API called outside injection context" on non-async functions #3611https://github.com/angular/angularfire/issues/3611
Calling Firebase validatePassword outside of an Injection context #3614https://github.com/angular/angularfire/issues/3614
Inject() must be called from an injection context such as a constructor in AngularFirestoreDoc after upgrading to Angular v19 #3621https://github.com/angular/angularfire/issues/3621
https://github.com/rgant/brainfry/blob/35b5607c2e9186f5a46ff7adfae486cd1737d8df/src/app/core/firebase-app.provider.ts#L6https://github.com/rgant/brainfry/blob/35b5607c2e9186f5a46ff7adfae486cd1737d8df/src/app/core/firebase-app.provider.ts#L6
https://github.com/vajahath
vajahathhttps://github.com/vajahath
on Feb 25, 2025https://github.com/angular/angularfire/issues/3629#issuecomment-2682405254
https://github.com/davidbusuttil
davidbusuttilhttps://github.com/davidbusuttil
on Mar 20, 2025https://github.com/angular/angularfire/issues/3629#issuecomment-2738574298
armando-navarrohttps://github.com/armando-navarro
completedhttps://github.com/angular/angularfire/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#3721https://github.com/angular/angularfire/pull/3721
on Jul 22, 2026https://github.com/angular/angularfire/issues/3629#event-28298532005
armando-navarrohttps://github.com/armando-navarro
on Jul 22, 2026https://github.com/angular/angularfire/issues/3629#event-28298532021
docs(zones): show how to keep AngularFire calls in an injection conte…https://github.com/angular/angularfire/commit/56d3eab6de824a0a08532a57a9fe5904df707d17
56d3eabhttps://github.com/angular/angularfire/commit/56d3eab6de824a0a08532a57a9fe5904df707d17
armando-navarrohttps://github.com/armando-navarro
comp: docsDocumentation.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20docs%22
comp: zonesChange detection / zone.js / zoneless.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20zones%22
Fixed!Resolved in a current release.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22Fixed!%22
type: choreMaintenance with no user-facing behavior change.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22type%3A%20chore%22
version: current (v17+)Targets the current modular API (v17+).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22version%3A%20current%20(v17%2B)%22
on Jul 25, 2026https://github.com/angular/angularfire/issues/3629#event-28470471855
armando-navarrohttps://github.com/armando-navarro
21.0.0-rc.1https://github.com/angular/angularfire/milestone/29
on Oct 1, 2026https://github.com/angular/angularfire/issues/3629#event-32219571257
Sign up for freehttps://github.com/signup?return_to=https://github.com/angular/angularfire/issues/3629
Sign in to commenthttps://github.com/login?return_to=https://github.com/angular/angularfire/issues/3629
Fixed!Resolved in a current release.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22Fixed!%22
comp: docsDocumentation.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20docs%22
comp: zonesChange detection / zone.js / zoneless.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22comp%3A%20zones%22
type: choreMaintenance with no user-facing behavior change.https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22type%3A%20chore%22
version: current (v17+)Targets the current modular API (v17+).https://github.com/angular/angularfire/issues?q=state%3Aopen%20label%3A%22version%3A%20current%20(v17%2B)%22
21.0.0-rc.1https://github.com/angular/angularfire/milestone/29
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.