firebase-realtime-database

what causes “permission denied”-message with FIREBASE and FLUTTER

强颜欢笑 提交于 2020-01-15 12:25:29
问题 I've got the error 'W/SyncTree(31625): Listen at /address failed: DatabaseError: Permission denied' while sending a request to firebase with an anonymous firebase user and without fancy firebase database rules :) . ..and i want to find out what causes this message. EDIT: error is the same with an existing user, means user signIn seems to work but accessing database not. What i've done so far: Set up firebase (including adding google_service.json, dependencies in pubspec.yaml) - works so far

Firebase AndroidChat release build error

陌路散爱 提交于 2020-01-15 12:08:32
问题 I implemented a new chat feature for our app using the Firebase androidchat as a template. Everything is working great, no error whatsoever, until I try the release build. *com.firebase.client.FirebaseException: Failed to bounce to type* There's one similar question in stackoverflow but it appears the guy managed to fix it by correcting spelling errors within his class. I have none of those and like I said, dev build has no errors. Here is my class: public class Chat { private String message;

Firebase AndroidChat release build error

时光总嘲笑我的痴心妄想 提交于 2020-01-15 12:07:41
问题 I implemented a new chat feature for our app using the Firebase androidchat as a template. Everything is working great, no error whatsoever, until I try the release build. *com.firebase.client.FirebaseException: Failed to bounce to type* There's one similar question in stackoverflow but it appears the guy managed to fix it by correcting spelling errors within his class. I have none of those and like I said, dev build has no errors. Here is my class: public class Chat { private String message;

Firebase rule that works like a filter [duplicate]

跟風遠走 提交于 2020-01-15 11:57:07
问题 This question already has answers here : Restricting child/field access with security rules (3 answers) Closed 3 years ago . When using .read with a true rule on the Users node, I give access to some authenticated user read every user listed on that tree. I need just some of then. I need some rule that works like a filter. So on getting User/ path, this authenticated user will get an users array of only those that have permission path like this $uid > permission > auth.uid = true . { "rules":

How can we integrate Firebase Hosting with Firebase Realtime Database / Storage?

落花浮王杯 提交于 2020-01-15 10:28:58
问题 Now that Firebase provides Web Hosting services, how can we integrate Firebase Hosting with Firebase Realtime Database and Firebase Storage? 回答1: Firebase Hosting is static hosting for your web app.So you can use HTML, CSS, JavaScript. JavaScript Code: <script src="https://www.gstatic.com/firebasejs/3.5.0/firebase.js"></script> <script> // Initialize Firebase // TODO: Replace with your project's customized code snippet var config = { apiKey: "<API_KEY>", authDomain: "<PROJECT_ID>.firebaseapp

flutter get inserted id from Firebase

风流意气都作罢 提交于 2020-01-15 10:26:30
问题 I'm doing an app in flutter (ecommerce) when there is no cart created or opened I must create an order and get the id to add products, but I can not get the id of the order created Future<void> createOrder() async { Order order = new Order('Guatemala', new DateTime.now().toString(), '${widget.userId}-0', 0, widget.userId); var orderRs =_database.reference().child("orders").push().set(order.toJson()); } _orderList = new List(); _orderQuery = _database .reference() .child("orders")

Vue set Firebase data using Key

孤者浪人 提交于 2020-01-15 10:21:51
问题 I'm having trouble with a Vue Method that both pushes a new deal to one Firebase ref and sets data in another. The issues lies when the method sets data. My current method is unable to get the key of deal that it is writing to the dealsRef in order to save it in the dealsRel. Firebase Refs: // Firebase reference to deals const dealsRef = db.ref('deals'); // Firebase reference to deal "relations" const dealsRel = db.ref('dealsRel'); Method: addDeal() { // Push new Deal to Firebase dealsRef

Retrieve Boolean array from Firebase

倖福魔咒の 提交于 2020-01-15 07:46:32
问题 Retrieving a Boolean array from a snapshot from Firebase gives me 0's and 1's. What is the best way to store an Boolean array from Firebase to an array in my project? This is my code: func loadUpInformation() { print("loading data") let user = FIRAuth.auth()?.currentUser let userID = FIRAuth.auth()?.currentUser?.uid ref = FIRDatabase.database().reference() ref.child("users").child(userID!).observeSingleEvent(of: .value, with: { (snapshot) in if !snapshot.exists() { return } if let

android firebase database Invalid token in path

百般思念 提交于 2020-01-15 06:28:30
问题 I did the base64 utf-8 encoding of the email. Because it is a database key. However, the following problems arise. I need help. setValue at /user/aW1hZ2VfNTk1NkBuYXZlci5jb20= failed: DatabaseError: Invalid token in path databaseReference.child("user").child(util.getBase64encode(email)).setValue(userModel) help me... 回答1: In my case, the encoded string was having a new line at the end. Using Base64.NO_WRAP as mentioned by @Arvin in this answer worked as a solution. My encoding function now

android firebase database Invalid token in path

青春壹個敷衍的年華 提交于 2020-01-15 06:28:16
问题 I did the base64 utf-8 encoding of the email. Because it is a database key. However, the following problems arise. I need help. setValue at /user/aW1hZ2VfNTk1NkBuYXZlci5jb20= failed: DatabaseError: Invalid token in path databaseReference.child("user").child(util.getBase64encode(email)).setValue(userModel) help me... 回答1: In my case, the encoded string was having a new line at the end. Using Base64.NO_WRAP as mentioned by @Arvin in this answer worked as a solution. My encoding function now