Skip to content

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

Closed

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]

Activity

  1. steven-supersolid commented on Nov 29, 2016

    @steven-supersolid
    Contributor

    It looks like you are using parse-server version 2.1.6.
    Want to try with a more recent version such as 2.2.25?
    Also, please can you post a server log by setting VERBOSE=1

  2. aksinhagit commented on Nov 29, 2016

    @aksinhagit
    Author

    Thanks Steven.

    How to update the Parse Version to 2.2.25 ?
    Where to set the VERBOSE=1 ?

    Following is the command using

    parse-dashboard --appId myAppId --masterKey myMasterKey --serverURL "https://temp.herokuapp.com/parse" --appName myapp
    The dashboard is now available at http://0.0.0.0:4040/

  3. aksinhagit commented on Nov 30, 2016

    @aksinhagit
    Author

    Hi Steven,
    I have updated to parse 2.2.25 and it started working.

    Is there any recent fix for Geo Query which was broken in 2.1.6 ?

  4. steven-supersolid commented on Nov 30, 2016

    @steven-supersolid
    Contributor

    I'm not sure as did not work on any geo stuff myself but you could take a look at release notes for past releases: https://github.com/ParsePlatform/parse-server/releases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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