var config = { apiKey: "...", authDomain: "...", databaseURL: "...", storageBucket: "", }; firebase.initializeApp(config);
"firebase": "^3.0.2"
Uncaught Error: Firebase App named '[DEFAULT]' already exists.
Hey Frangeris,
It looks like you're trying to initialize the SDK multiple times (maybe in a loop or in multiple files?) You should only initialize it once for the app (assuming you're only connecting to one project). It will then be initialized and available everywhere
Hope this helps
Chris
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/f62fbc96-a85f-4147-8820-8462cfa24200%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brandon,
You can still create a ref any time you want. The equivalent to the old new Firebase(URL)
is firebase.database().ref(URL);
There’s no need to initialize everything each time you want one.
I’m not familiar enough with webpack/browserify to say if you need a shim or just to call the initializeApp()
in some initialization workflow, but this is the part that should be called exactly once.
☼, Kato
Housekeeping: Please create your own thread for tangentially related questions. This will make it easier for others to benefit from your questions by making them easier to search.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/d2f81fa1-2f30-44ec-9e92-686c2f600e57%40googlegroups.com.
firebase.app().delete().then(function() {
console.log("[DEFAULT] App is Gone Now");
});
firebase.initializeApp({
databaseURL: config.Firebase.databaseURL,
serviceAccount: {
projectId: config.Firebase.projectId,
clientEmail: config.Firebase.clientEmail,
privateKey: config.Firebase.privateKey
},
databaseAuthVariableOverride: {
uid: uidA
}
});
firebase.initializeApp({
databaseURL: config.Firebase.databaseURL,
serviceAccount: {
projectId: config.Firebase.projectId,
clientEmail: config.Firebase.clientEmail,
privateKey: config.Firebase.privateKey
},
databaseAuthVariableOverride: {
uid: uidB
}
});
--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/a6dd90eb-b908-4994-aac4-064dbd3a3212%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/7brZ2WqVcsc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-tal...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/CAGcMwsAN-psyTRBbqrdqxpHaC3574wQ6YeFL5-FCfjr8u-xHuA%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-talk+unsubscribe@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/a6dd90eb-b908-4994-aac4-064dbd3a3212%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Firebase Google Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/firebase-talk/7brZ2WqVcsc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to firebase-talk+unsubscribe@googlegroups.com.