Open somq opened 5 years ago
@somq thanks for reporting. Do you mind to open a pr with a failing test case?
@davimacedo Can you guide me through the steps please?
If I (dumbly) clone the repo, install mongo-db-runner and run npm run test
, test complains that masterkey is missing etc...
Sure. Make sure that you are using Node.js >= 10 and try the following steps:
$ git clone https://github.com/parse-community/parse-server
$ cd parse-server # go into the clone directory
$ npm install # install all the node dependencies
$ npm run test # run tests
I believe this has already been addressed as of 3.3.0.
https://github.com/parse-community/parse-server/pull/5286
We might have to update the documentation since you can't use nearSphere and count but use $geoWithin and count. This should be transformed thanks to the PR.
Issue Description
On parse-server > 3.0.0, when querying a Class with a Geopoint filtered with $nearSphere and a count operator, mongodb returns an errors which is returned as an
internal server error
by parse-server.Queries
parse-server >= 3.3.0 with
count=1&where={...$nearSphere...
error isMongoError: radius must be a non-negative number
(example query)parse-server >= 3.3.0 with
count=1&where={...$nearSphere...
error iserror: Uncaught internal server error.can't parse extra field: $maxDistance: 0.002525890376357666
(example query)parse-server > 3.0.0 & < 3.3.0 With count=1&where={...$nearSphere... error is
$nearSphere is not allowed inside of a $match aggregation expression
(example query)Works with 3.0.0
Steps to reproduce
Note: This (example query) with a
count=1
in front of thewhere=...
Expected Results
What's in the doc: https://docs.parseplatform.org/rest/guide/#counting-objects
Actual Outcome
Environment Setup
Server
Database
Logs/Trace
Additonal notes:
Related to #5285?