Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

No Firebase App '[DEFAULT]' has been created #1588

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

Closed
D4rkMindz opened this issue Nov 25, 2024 · 0 comments
Closed

No Firebase App '[DEFAULT]' has been created #1588

D4rkMindz opened this issue Nov 25, 2024 · 0 comments

Comments

@D4rkMindz
Copy link

Reproduction

not possible since nuxt template is not working properly

Steps to reproduce the bug

  1. Create a composable "useRecord" that uses useCollection or useDocument
  2. use this composable in any setup function

Expected behavior

The function useDocument returns the document ref properly without displaying the error "No Firebase App '[DEFAULT]' has been created - call initializeApp() first (app/no-app)."

Actual behavior

"No Firebase App '[DEFAULT]' has been created - call initializeApp() first (app/no-app)." is displayed.

Additional information

I debugged a little (like many hours) and found out, that it would work as expected if:

  • the method "_useFirestoreRef" would call "docOrCollectionRef.firestore.app" instead of "useFirebaseApp()" for "getInitialValue()"
  • the method "addPendingPromise" would call "dataSource.firestore.app" instead of "useFirebaseApp()" for "const app = useFirebaseApp()"
    This adjustments were made in the dist folder in the file vuefire/dist/index.mjs

The retrieval of the default app (getApp()) does not seem to work if called from a composable. The selected app name does not seem to be used (if custom app names are used).

@vuejs vuejs locked and limited conversation to collaborators Nov 25, 2024
@posva posva converted this issue into discussion #1589 Nov 25, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant