You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the offline database implementation. When I start streaming changes, the latest key present in the offline database is fetched and incremented in RealtimeDatabase.GetLatestKey() method and returned as I use StreamingOptions.LatestOnly. The returned string is used in the startAt="<latest-key>" query parameter.
But when the latest key is something like -NBatwr2n20T2uW3aKlZ, I get an error as the last character Z will be made \ and it can't be used just like that in the query part. This is the exception data I get:
Url: https://<project-id>-default-rtdb.firebaseio.com/<path>/.json?orderBy="$key"&startAt="-NBatwr2n20T2uW3aKl\"
Request Data:
Response: {
"error" : "Constraint key field must be a valid key name"
}
Did you implement the .indexIsOn in your FIrebase? Think it is needed for special qerrys
Firebase automatically indexes its children based on keys. So, no need to specify it explicitly. But, anyway, I tried it just now and it doesn't seem to work.
I am using the offline database implementation. When I start streaming changes, the latest key present in the offline database is fetched and incremented in RealtimeDatabase.GetLatestKey() method and returned as I use StreamingOptions.LatestOnly. The returned string is used in the startAt="<latest-key>" query parameter.
But when the latest key is something like -NBatwr2n20T2uW3aKlZ, I get an error as the last character Z will be made \ and it can't be used just like that in the query part. This is the exception data I get:
Url: https://<project-id>-default-rtdb.firebaseio.com/<path>/.json?orderBy="$key"&startAt="-NBatwr2n20T2uW3aKl\"
Request Data:
Response: {
"error" : "Constraint key field must be a valid key name"
}
I referred to the best answer under this stackoverflow question, but no method suggested there worked.
The text was updated successfully, but these errors were encountered: