Skip to content

query returns nothing and started printing "UserInfo={error={"code":1,"message":"Internal server error."}, NSLocalizedDescription" #3135

Closed
@aksinhagit

Description

@aksinhagit

Issue Description

[DELETE EVERYTHING ABOVE THIS LINE BEFORE SUBMITTING YOUR ISSUE]

When doing a query again the username it return correct object and all the username. But when started query against the GeoPoint it gives following error and no values.

The Class variable has : username, location member.
[i.e Query through the GeoLocation] It give Error and return no objects.

To cross check when query against the username. It worked fine.

Error msg.

2016-11-28 22:57:54.227 ParseStarterProject-Swift[75946:665166] [Error]: {"code":1,"message":"Internal server error."} (Code: 1, Version: 1.12.0)
Error: Error Domain=Parse Code=1 "{"code":1,"message":"Internal server error."}" UserInfo={error={"code":1,"message":"Internal server error."}, NSLocalizedDescription={"code":1,"message":"Internal server error."}, code=1} [error: {"code":1,"message":"Internal server error."}, NSLocalizedDescription: {"code":1,"message":"Internal server error."}, code: 1]
2016-11-28 22:57:54.241 ParseStarterProject-Swift[75946:665171] [Error]: {"code":1,"message":"Internal server error."} (Code: 1, Version: 1.12.0)
Error: Error Domain=Parse Code=1 "{"code":1,"message":"Internal server error."}" UserInfo={error={"code":1,"message":"Internal server error."}, NSLocalizedDescription={"code":1,"message":"Internal server error."}, code=1} [error: {"code":1,"message":"Internal server error."}, NSLocalizedDescription: {"code":1,"message":"Internal server error."}, code: 1]

1.why query on Location is not working ?
2. For testing Hardcoded the latitude and longitude but still the query return nothing.

   var query = PFQuery(className:"riderRequest")
   //query.whereKey("username", equalTo:"user1")         <<< Query against username : Working
   query.whereKey("location", nearGeoPoint:PFGeoPoint(latitude:-37, longitude:12))           <<< Query against Location : Not Working     

    var contents = [PFObject]()

    do {

    contents = try query.findObjects()

    print("List of Objects")

    print(contents)

    } catch _ {

    print("Error : No Objects")

    }

##Describe your issue in as much detail as possible.

var query = PFQuery(className:"riderRequest")
//query.whereKey("username", equalTo:"user1") <<< Query against username : Working

But query against GeoPoint is giving Above Error

query.whereKey("location", nearGeoPoint:PFGeoPoint(latitude:location.latitude, longitude:location.longitude)) <<< Query against Location : Not Working

Steps to reproduce

Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable.

  1. query.whereKey("location", nearGeoPoint:PFGeoPoint(latitude:location.latitude, longitude:location.longitude))

Expected Results

Lists of Object based on Location

Actual Outcome

No Ojects Returned

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : Parse Dash 1.0.18, Server version: 2.1.6
    • Operating System: MacOs
    • Hardware: [FILL THIS OUT]
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): Heroku
  • Database

    • MongoDB version: MangoDB
    • Storage engine: [FILL THIS OUT]
    • Hardware: [FILL THIS OUT]
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [FILL THIS OUT]

Logs/Trace

You can turn on additional logging by configuring VERBOSE=1 in your environment.

[FILL THIS OUT]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions