No Firebase App '[DEFAULT]' has been created #1589
              
                Unanswered
              
          
                  
                    
                      D4rkMindz
                    
                  
                
                  asked this question in
                Questions and Help
              
            Replies: 1 comment 1 reply
-
| Is there any suggestion regarding a pull request? I'm not that deep into the understanding of vuefire to actually pull of such a adjustment | 
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Reproduction
not possible since nuxt template is not working properly after setup according to README.md
Steps to reproduce the bug
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)."
Stacktrace
please note that the line at Module.useRecord [as default] (./composables/useRecord/useRecord.composable.ts:50:40) is referring to the steps to reproduce.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:
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).
The following error also occurs in the server log:
Error Log
WARN [Vue warn]: inject() can only be used inside setup() or functional components. at ref=Ref< undefined > > at ], ids: [Array], accessCache: [Object: null prototype] {}, renderCache: [], components: null, directives: null, propsOptions: [Array], emitsOptions: null, emit: [Function: bound emit], emitted: null, propsDefaults: [Object: null prototype] {}, inheritAttrs: false, ctx: [Object], data: {}, props: [Object], attrs: {}, slots: [Object], refs: {}, setupState: {}, setupContext: [Object], suspense: null, suspenseId: 0, asyncDep: null, asyncResolved: false, isMounted: false, isUnmounted: false, isDeactivated: false, bc: null, c: null, bm: null, m: null, bu: null, u: null, um: null, bum: null, da: null, a: null, rtg: null, rtc: null, ec: null, sp: null }, r: RefImpl { dep: [Dep], __v_isRef: true, __v_isShallow: false, _rawValue: undefined, _value: undefined }, k: undefined, f: false }, scopeId: null, slotScopeIds: null, children: null, component: null, suspense: null, ssContent: null, ssFallback: null, dirs: null, transition: null, el: null, anchor: null, target: null, targetStart: null, targetAnchor: null, staticCount: 0, shapeFlag: 4, patchFlag: 0, dynamicProps: null, dynamicChildren: null, appContext: null, ctx: { uid: 9, vnode: { __v_isVNode: true, __v_skip: true, type: [Object], props: [Object], key: null, ref: null, scopeId: null, slotScopeIds: null, children: [Object], component: [Circular *1], suspense: null, ssContent: null, ssFallback: null, dirs: null, transition: null, el: null, anchor: null, target: null, targetStart: null, targetAnchor: null, staticCount: 0, shapeFlag: 36, patchFlag: 0, dynamicProps: null, dynamicChildren: null, appContext: null, ctx: [Object] }, type: { name: 'RouterView', inheritAttrs: false, props: [Object], compatConfig: [Object], setup: [Function: setup] }, parent: { uid: 8, vnode: [Object], type: [Object], parent: [Object], appContext: [Object], root: [Object], next: null, subTree: [Object], effect: null, update: null, job: null, scope: [EffectScope], render: [Function (anonymous)], proxy: [Object], exposed: [Object], exposeProxy: null, withProxy: null, provides: [Object ], ids: [Array], accessCache: [Object: null prototype] {}, renderCache: [], components: null, directives: null, propsOptions: [Array], emitsOptions: null, emit: [Function: bound emit], emitted: null, propsDefaults: [Object: null prototype] {}, inheritAttrs: false, ctx: [Object], data: {}, props: [Object], attrs: {}, slots: {}, refs: {}, setupState: {}, setupContext: [Object], suspense: null, suspenseId: 0, asyncDep: null, asyncResolved: false, isMounted: false, isUnmounted: false, isDeactivated: false, bc: null, c: null, bm: null, m: null, bu: null, u: null, um: null, bum: null, da: null, a: null, rtg: null, rtc: null, ec: null, sp: null }, appContext: { app: [Object], config: [Object], mixins: [Array], components: [Object], directives: [Object], provides: [Object: null prototype], optionsCache: [WeakMap], propsCache: [WeakMap], emitsCache: [WeakMap] }, root: { uid: 0, vnode: [Object], type: [Object], parent: null, appContext: [Object], root: [Circular *2], next: null, subTree: null, effect: null, update: null, job: null, scope: [EffectScope], render: [Function: NOOP], proxy: [Object], exposed: {}, exposeProxy: null, withProxy: null, provides: [Object ], ids: [Array], accessCache: [Object: null prototype] {}, renderCache: [], components: null, directives: null, propsOptions: [Array], emitsOptions: null, emit: [Function: bound emit], emitted: null, propsDefaults: [Object: null prototype] {}, inheritAttrs: undefined, ctx: [Object], data: {}, props: {}, attrs: {}, slots: {}, refs: {}, setupState: [Object], setupContext: [Object], suspense: null, suspenseId: 0, asyncDep: null, asyncResolved: false, isMounted: false, isUnmounted: false, isDeactivated: false, bc: null, c: null, bm: null, m: null, bu: null, u: null, um: null, bum: null, da: null, a: null, rtg: null, rtc: null, ec: [Array], sp: [Array], devtoolsRawSetupState: [Object] }, next: null, subTree: { __v_isVNode: true, __v_skip: true, type: [Object], props: [Object], key: null, ref: null, scopeId: null, slotScopeIds: null, children: [Object], component: null, suspense: null, ssContent: [Object], ssFallback: [Object], dirs: null, transition: null, el: null, anchor: null, target: null, targetStart: null, targetAnchor: null, staticCount: 0, shapeFlag: 160, patchFlag: 0, dynamicProps: null, dynamicChildren: null, appContext: null, ctx: [Object] }, effect: null, update: null, job: null, scope: EffectScope { detached: true, _active: true, effects: [], cleanups: [], _isPaused: false, parent: undefined }, render: [Function (anonymous)], proxy: { name: [Getter/Setter], route: [Getter/Setter], getRouteBaseName: [Function: bound ], resolveRoute: [Function: bound ], localePath: [Function: bound ], localeRoute: [Function: bound ], localeLocation: [Function: bound ], switchLocalePath: [Function: bound ], localeHead: [Function: bound ] }, exposed: null, exposeProxy: null, withProxy: null, provides: Object > { [Symbol(router view depth)]: [ComputedRefImpl], [Symbol(router view location matched)]: [ComputedRefImpl], [Symbol(router view location)]: [ComputedRefImpl] }, ids: [ '0-', 0, 1 ], accessCache: [Object: null prototype] {}, renderCache: [], components: null, directives: null, propsOptions: [ [Object], [Array] ], emitsOptions: null, emit: [Function: bound emit], emitted: null, propsDefaults: [Object: null prototype] {}, inheritAttrs: false, ctx: { name: [Getter/Setter], route: [Getter/Setter], getRouteBaseName: [Function: bound ], resolveRoute: [Function: bound ], localePath: [Function: bound ], localeRoute: [Function: bound ], localeLocation: [Function: bound ], switchLocalePath: [Function: bound ], localeHead: [Function: bound ] }, data: {}, props: { route: undefined, name: 'default' }, attrs: {}, slots: { default: [Function] }, refs: {}, setupState: {}, setupContext: { attrs: [Getter], slots: [Getter], emit: [Getter], expose: [Function: expose] }, suspense: null, suspenseId: 0, asyncDep: null, asyncResolved: false, isMounted: false, isUnmounted: false, isDeactivated: false, bc: null, c: null, bm: null, m: null, bu: null, u: null, um: null, bum: null, da: null, a: null, rtg: null, rtc: null, ec: null, sp: null } } route= { fullPath: '/map', hash: '', query: {}, name: 'map___en', path: '/map', params: {}, matched: [ { path: '/map', redirect: undefined, name: 'map___en', meta: [Object], aliasOf: undefined, beforeEnter: undefined, props: [Object], children: [], instances: {}, leaveGuards: Set(0) {}, updateGuards: Set(0) {}, enterCallbacks: {}, components: [Object] } ], meta: { layout: 'map' }, redirectedFrom: undefined, href: '/map' } ... > at at at > at > at at at at atBeta Was this translation helpful? Give feedback.
All reactions