Quickstart-unity: If a Query Rule exist, permission is always denied

Created on 29 Aug 2019  路  3Comments  路  Source: firebase/quickstart-unity

Please fill in the following fields:

Unity editor version: 2018.3.7f1
Firebase Unity SDK version: 6.2.2
Firebase plugins in use (Auth, Database, etc.): Auth, Database
Platform you are using the Unity editor on (Mac, Windows, or Linux): Windows
Platform you are targeting (iOS, Android, and/or desktop): Android

Please describe the issue here:

See Title.
Trying to query using:
fDatabase.RootReference.Child("users").LimitToFirst(3).GetValueAsync().ContinueWith(task => { if (task.IsFaulted) { Debug.Log(task.Result.Value); } else if (task.IsCompleted) { Debug.Log(task.Result.Value); } });

Rules:
{ "rules": { ".read": "query.limitToFirst <= 30" } }

Database:
/users
-------/{uid}
-------/{uid}
-------/{uid}

The rules work if I use Node.js and write:
var ref = firebase.database().ref("users"); ref.limitToFirst(1).once('value').then(function(snapshot){ console.log(snapshot.val()); });

Is it not possible to use Query Rules with Unity?

bug

All 3 comments

This is certainly odd. I would expect those rules to work with the database regardless of which client implementation you're using. I've been able to reproduce the issue on my end and I'm going to need to dig around a bit more to figure out what's going on.

Okey cool, we'll work around this for now :)

Hi @SeanLangre

This should be fixed with 6.6.0
Please let us know if the problem still occurs.

Was this page helpful?
0 / 5 - 0 ratings