Cannot save records to Firebase
See original GitHub issueVersion info
DEBUG: Ember : 2.5.1
DEBUG: Ember Data : 2.6.0
DEBUG: Firebase : 3.0.4
DEBUG: EmberFire : 2.0.0
DEBUG: jQuery : 2.2.4
Test case
Steps to reproduce
Try saving a new record to Firebase
Expected behavior
I should be able to create new records using emberfire
Actual behavior
Getting this error:
Uncaught TypeError: _firebase.default is not a constructor
Not sure if the following part of the guide is still relevant? https://www.firebase.com/docs/web/libraries/ember/guide.html#section-ember-add-firebase
If I change my adapter to look something like this:
import config from '../config/environment';
import Firebase from 'firebase';
import FirebaseAdapter from 'emberfire/adapters/firebase';
export default FirebaseAdapter.extend({
firebase: Firebase.initializeApp(config.firebase)
});
Then I get a little farther along but an error is thrown inside Firebase.js inside generateIdForRecord
method. firebase.js:72 Uncaught TypeError: this._ref.push is not a function
I have tried to find answers without any luck so help is very much appreciated.
Issue Analytics
- State:
- Created 7 years ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Saving Data | Firebase Realtime Database - Google
Stay organized with collections Save and categorize content based on your preferences. This document covers the four methods for writing data to your...
Read more >Unable to save new data in firebase - Stack Overflow
I am trying to save new data in firebase under a node Visitors . i have already set some rules on that node....
Read more >[Solved] Why can't I save and retrieve data from Firebase?
So try this: when the photo is taken, set a variable (not a list… let's keep this simple) to the green photo block....
Read more >Cannot save records to Firebase · Issue #388 - GitHub
I ran into the same issue. The adapter configuration in the current docs is out of date. It should look like this now:...
Read more >Adding data | Firestore - Google Cloud
import { doc, setDoc } from "firebase/firestore"; // Add a new document in collection "cities" await setDoc(doc(db, "cities", "LA"), { name: "Los Angeles",...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@andrewevans I think your issue might have to do with the new Firebase default security rules. The new defaults require users to be authenticated in order to read or write data. You will probably need to change your rules or authenticate in order to avoid your error.
Similar issue. I have application.js as stated above and my environment.js as stated above, and I get this error, even though the data is exactly the values that firebase provided:
firebase.js:186 Error: permission_denied at /posts/-KKv2I2d18Dn6CTBXKsn: Client doesn't have permission to access the desired data.