-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
matchesQuery on relation query always finds zero objects #1014
Comments
same problem here - parse server 2.1.6,
|
Thanks @flovilmart! The only difference I can find is I will test today to see if adding a condition to my relation query makes it work. |
@jgaull I added the restrictions to make sure I'd get the proper subset. |
@flovilmart I added Thanks for the help! Let me know if you have an idea for something else to test. |
uhm... Do you have ACL, class level permissions or anything else set? If you run the query as master, what does it do? Does the object structure match what you have in the app in terms of relation, key etc... Can you show me the schema as well? |
ACL is default for _User object, public read and only the user has write. I am running the query as master using |
and the related objects are _Users ? |
Correct |
I really can't reproduce the error. Can you dump me the _SCHEMA collection from mongoDB? |
TBH, I'm out of ideas now, are you running it in Cloud Code? Parse.Cloud.useMasterKey() don't work, you have to pass {useMasterKey: true} to your |
Thanks @flovilmart! I tried {useMasterKey: true} and there was no change. |
on which classes do you do your queries? |
Sorry, definitely should have included that info. I'm using the "members" relation in Group to query for UserWeeklyStats in one place and Rides in another. Both find zero objects. |
Does the relation query itself returns some values? Can you try to split the query in 2? relationQuery first, get the objects and do a containedIn? ThatMs tough as I can't reproduce the issue at all... |
I have tested splitting the query into two pieces. Both work independently as expected. One thought I had was that, since this is my dev DB, some _Users have been deleted at various points during development. The relation probably still holds a reference to those deleted _Users. Is it possible that that's causing the query to break? |
Tried deleting objects in the middle, and it behaves correctly, so the deletion doesn't seem to be the problem. |
Can you set VERBOSE=1 on heroku (https://devcenter.heroku.com/articles/config-vars), and make a gist with the request logs ?? the interesting lines should be similar to:
|
Does that look familiar? #1036 (comment) |
Thanks @flovilmart! I imported using the Parse migration tool from the beginning so I don't think I'm experiencing the same issue. |
I see that there is the startOfWeek parameter too in the query, does removing it solves the issue? |
Removing startOfWeek does not solve the issue. This log is the query without startOfWeek. This log is a the same issue when querying for Ride objects. |
We identified the issue, and working on a fix. |
Nice work! Thanks so much for your help! |
You should thank @gfosco ! the was the brains :) |
Any chance this has snuck back into 2.3.6? matchesKeyInQuery is always returning an empty set. |
We usually don't remove tests, in order to prevent regressions. Can you open a new issue as it's been closed a while ago? |
The same issue. MatchesQuery works in Swift but not in JS. |
Environment Setup
parse-server 2.1.6, Heroku, MongoLab, iOS SDK 1.12.0
Steps to reproduce
This works correctly in hosted Parse. I also manually double-checked the db and can confirm this should find more than zero objects.
Logs/Trace
This error is showing up on the iOS side. May or may not be related:
[Error]: Response status code was unacceptable: 403 (Code: 1, Version: 1.12.0)
The text was updated successfully, but these errors were encountered: