Skip to content

Firebase App named '[DEFAULT]' already exists (app/duplicate-app). #54

Open
@arhoy

Description

HI, I have done the steps below but run into the following error when I try to sign in or register.

Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app).
▶ 2 stack frames were collapsed.
new Firebase
C:/Users/arhoy/OneDrive/Desktop/web-development/playground/gatsby/react-gatsby-firebase-authentication/src/components/Firebase/firebase.js:76
  73 |            }
  74 | 
  75 |            // merge auth and db user
> 76 |            authUser = {
  77 |              uid: authUser.uid,
  78 |              email: authUser.email,
  79 |              emailVerified: authUser.emailVerified,
View compiled
getFirebase
C:/Users/arhoy/OneDrive/Desktop/web-development/playground/gatsby/react-gatsby-firebase-authentication/src/components/Firebase/firebase.js:104
  101 |   messages = () => this.db.ref('messages');
  102 | }
  103 | 
> 104 | let firebase;
  105 | 
  106 | function getFirebase(app, auth, database) {
  107 |   if (!firebase) {
View compiled
(anonymous function)
C:/Users/arhoy/OneDrive/Desktop/web-development/playground/gatsby/react-gatsby-firebase-authentication/src/components/layout.js:1
> 1 | import React, { Component, Fragment } from 'react';
  2 | 
  3 | import Navigation from './Navigation';
  4 | import getFirebase, { FirebaseContext } from './Firebase';

I am not sure what I am doing wrong, I have set up my ENV variables from Firebase and all that.

Thank you

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions