Skip to content

Can not save or query from cloud code  #4419

Closed

Description

@monajafi

After changing my DNS cloud code can not write or query to database the error in verbose mode is:
I've changed my serverUrl this I think is related to nginx and ssl configuration. have you experienced same error already?

0|parse-wr | verbose: RESPONSE from [POST] /parse/classes/Trip: {
0|parse-wr |   "status": 201,
0|parse-wr |   "response": {
0|parse-wr |     "objectId": "JUW8KIpyCK",
0|parse-wr |     "createdAt": "2017-12-08T11:05:56.741Z"
0|parse-wr |   },
0|parse-wr |   "location": "http://********.ir/parse/classes/Trip/JUW8KIpyCK"
0|parse-wr | } status=201, objectId=JUW8KIpyCK, createdAt=2017-12-08T11:05:56.741Z, location=http://*********.ir/parse/classes/Trip/JUW8KIpyCK
1|parse-wr | verbose: REQUEST for [POST] /parse/functions/driveRequest: {
1|parse-wr |   "riderLongitude": 49.187789261341095,
1|parse-wr |   "riderLatitude": 30.716097895513627,
1|parse-wr |   "tripId": "JUW8KIpyCK"
1|parse-wr | } method=POST, url=/parse/functions/driveRequest, x-real-ip=1.2.3.4, x-forwarded-for=1.2.3.4, x-nginx-proxy=true, host=psappco.ir, connection=upgrade, content-length=94, x-parse-session-token=r:72ae786ff94369a24ea262be3fa5e032, x-parse-application-id=********, x-parse-client-version=a1.16.3, x-parse-app-build-version=2, x-parse-app-display-version=1.0.2, x-parse-os-version=7.0, user-agent=Parse Android SDK 1.16.3 (ir.***********.psapp/2) API Level 24, x-parse-installation-id=ccacc4fa-68ed-44cf-bf99-04a4457a9629, content-type=application/json, accept-encoding=gzip, riderLongitude=49.187789261341095, riderLatitude=30.716097895513627, tripId=JUW8KIpyCK
1|parse-wr | error: Failed running cloud function driveRequest for user lPHtBbLm7D with:
1|parse-wr |   Input: {"riderLongitude":49.187789261341095,"riderLatitude":30.716097895513627,"tripId":"JUW8KIpyCK"}
1|parse-wr |   Error: {"code":141,"message":"Received an error with invalid JSON from Parse: <html>\r\n<head><title>400 Bad Request</title></head>\r\n<body bgcolor=\"white\">\r\n<center><h1>400 Bad Request</h1></center>\r\n<hr><center>nginx/1.10.3

my node version 9.2.0
npm version 5.5.6
parse server 2.7.1

Activity

  1. flovilmart commented on Dec 8, 2017

    @flovilmart
    Contributor

    You should check the serverURL options when you initialize parse server

  2. monajafi commented on Dec 8, 2017

    @monajafi
    Author

    Hi Mr.Vilmart
    I installed on ubuntu vps and after DNS change couldn't find the root cause of above error. also as you told I tweaked serverUrl by reading over here and internet. finally I decided to install everything on server from scratch. and we'll respond the result here.
    Also for push notification I've used firebase admin sdk in parse cloud code and firebase android messaging sdk in client side instead of parse push which gives more flexibility and is more stable than using ParseInstallation for querying users to send push, but I have to look for the load that sdk adds to android app

  3. stale commented on Sep 18, 2018

    @stale

    This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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