Comments (17)
On firebase web, you check if already initialized with:
if (!firebase.apps.length) {
firebase.initializeApp({});
}
from polycasts.
Environment:
Ubuntu 16,04
Node: v7.5.0
Firebase tools: 3.4.0
Google Chrome 56.0.2924.87
Clues:
Something in my browser messing it up, It worked in incognito... >_>
from polycasts.
Does CTRL+F5 actually clear the cache before reloading? Try opening DevTools, then right-click the refresh button, and choose "Empty cache and hard reload". http://superuser.com/questions/220179/how-can-i-do-a-cache-refresh-in-google-chrome
from polycasts.
the issue is due to calling the initialize method of firebase more than multiple times . me had this same issue . and i could fix it by restricting the initialize method call more than once . make the firebase configurations in one class and make it as singleton class .
from polycasts.
This happens if you leave out or misspell an import. It also seems to happen if the name starts with "main" as in "main-page" or "main-view" for polymer elements. Not sure why, but I was able to take the exact same file, and rename it to "view-main" and it started working.
from polycasts.
I had a similar error. My imports were:
<script src="/__/firebase/4.0.0/firebase-app.js"></script>
<script src="/__/firebase/4.0.0/firebase-auth.js"></script>
<script src="/__/firebase/4.0.0/firebase-database.js"></script>
<script src="/__/firebase/4.0.0/firebase-messaging.js"></script>
<script src="/__/firebase/init.js"></script>
<!-- AngularJS -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.min.js"></script>
<!-- Firebase -->
<script src="https://www.gstatic.com/firebasejs/3.6.6/firebase.js"></script>
<!-- AngularFire -->
<script src="https://cdn.firebase.com/libs/angularfire/2.3.0/angularfire.min.js"></script>
<!-- app script -->
<script src="app.js"></script>
I changed the firebase.js cdn to 4.0.0 and it fixed the "Firebase app [DEFAULT] already exists" error.
from polycasts.
Duplicate imports, might be looping (I had some issues right now with it too, (again)) but it went away after double checking everything. (you also get the error message if you load polymer in the same document as polymerfire
from polycasts.
It gave me that error too when missing importing things, (was doing polycast #58 and forgot to bower install iron-icons and was giving me very vague errors like poster)
from polycasts.
Nevermind, I have no idea, stuck at same thing, around the last steps at the tutorial I broke mine aswell, trouble figuring it out
from polycasts.
trying to figure this out, so far I narrowed it down to notes.html
If I comment out
<!-- <link rel="import" href="bower_components/polymerfire/firebase-query.html"> -->
<!-- <link rel="import" href="bower_components/paper-input/paper-input.html"> -->
<!-- <link rel="import" href="bower_components/paper-icon-button/paper-icon-button.html"> -->
<!-- <link rel="import" href="bower_components/iron-icons/iron-icons.html"> -->
I don't get errors
from polycasts.
@RStyrman I can't reproduce your symptoms (no errors for me using original code from ep58-firebase-db-demo). Can you provide details about your environment and steps to reproduce? Here's my info for comparison:
Steps
- Run the following commands:
git clone https://github.com/Polymer/polycasts.git
cd polycasts/ep58-firebase-db-demo
bower i
firebase serve
- Open Chrome 56 to http://localhost:5000, click SIGN IN, login, add a note, and verify it looks similar to this screenshot:
- Open console in DevTools, and verify there are no warnings/errors.
Environment
- macOS Sierra 10.12
- Chrome 56.0.2924.87 (64-bit)
- node 7.6.0
firebase-tools
3.4.0
from polycasts.
works for me now too.. I must have messed something up
from polycasts.
something is up, so I got the error again, firebase serve second time (I did get it to work on first try)
from polycasts.
I really don't know what's going on, I tried disabling all my extensions and I refresh the cache by using ctrl + f5, it works in incognito and not in non incognito
from polycasts.
your right, it didn't me 🐌
from polycasts.
I was having the exact same problem. Following RStyrman, I removed some of the imports which helped me figure out that the error was that I didn't have paper-input installed in the bower_components directory. It makes no sense to me why that gave me a "firebase app already exists" error, but installing paper-input (bower install --save PolymerElements/paper-input) fixed the error.
The demo is all working now. I'm sure that exact thing isn't everyone's problem, but I guess the bigger lesson is that error does not necessarily have anything to do with firebase.
from polycasts.
Right-clicking on the browser's refresh icon and selecting "hard refresh and clear cache" is what solved my problem with this error. Try running your app on incognito or using the refresh before jumping to some of the conclusions on here. I spent at least forty minutes going through every file before doing the refresh.
from polycasts.
Related Issues (15)
- ep46 with app-route: category not updating on page refresh HOT 2
- Example 46 not working
- Missing qoutes on two way binding
- Polymer-micro throws an exception HOT 4
- policasts#25 convienet-page don't work
- define thunk behavior with polymer 2.0 classes HOT 4
- [ep59-firebase-messaging] How to save tokens from multiple devices w/o overwriting? HOT 3
- What happened to Polycasts? HOT 1
- No more polycasts? HOT 1
- Uncaught (in promise) DOMException: Registration failed - push service error
- 'ep06-simple-app' app not working properly on mobile chrome, but working nicely on mobile Safari, both case are on iphone 5. HOT 3
- ep14-reusable-elements HOT 1
- Wrong import href in `ep17-theming` HOT 3
- polymer-starter-kit: npm install build error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polycasts.