Open monajafi opened 6 years ago
Can you update parse-server to the latest version?
Hi mr flovilmart I've installed parse-server-example on ubuntu server also mongodb is on the same machine I fear of losing data but I have to try already it was working just aftet updating nginx and changing dns on bind9 , reinstalling ssl certificate and rebooting system this error happened I really get stuck on this i will try and respond here Thanks
Should i update parse-server-push-adapter seperately or parse server update will update that too?
Hi Mr Vilmart I've updated parse-server and parse-server-push-adapter to the latest version but still same error happened. I doubted on GCM api key and senderId also nginx configuration. I am getting really mad because my customer getting mad the project was running already now stopped because of this error. please help me
This happened after I changed my ubuntu server DNS here is my nginx sites-enabled/default
You should probably revert back to a previous version of your configuration. It's unlikely unrelated to parse-server itself.
Can you check your nginx logs to see what call would make that error? Did you configure your serverURL
properly?
This error comes from Parse.Push.send method as following
Parse.Push.send({
where: pushQuery,
data: payload
}, { success: function() {
console.log("#### PUSH OK");
}, error: function(error) {
console.log("#### PUSH ERROR" + error.message);
},useMasterKey:true});
response.success('success');
about serverUrl every function like Object saving Querying in parse and parse dashboard are working just push is not working also this warning is shown after running cloud code
WARNING, Unable to connect to 'http/localhost:1337/parse'. Cloud code and push notifications may be unavailable!
this is my index.js serverUrl:
serverURL: process.env.SERVER_URL || 'http/localhost:1337/parse'
and nginx config:
location /parse/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost:1337/parse/;
proxy_ssl_session_reuse off;
proxy_set_header Host $http_host;
proxy_redirect off;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
Hi I've found the root cause of 400 Bad Request. I wrote a simple query and object sample code in cloud code which can not run by this error:
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://psappco.ir/parse/classes/Trip/JUW8KIpyCK"
0|parse-wr | } status=201, objectId=JUW8KIpyCK, createdAt=2017-12-08T11:05:56.741Z, location=http://psappco.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=5.215.157.80, x-forwarded-for=5.215.157.80, x-nginx-proxy=true, host=psappco.ir, connection=upgrade, content-length=94, x-parse-session-token=r:72ae786ff94369a24ea262be3fa5e032, x-parse-application-id=f94ca623-4b36-4f0b-8705-228eefa7e4e0, 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.psappco.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
this already reported here too without proper response: https://github.com/parse-community/parse-server/issues/2190 my node version 9.2.0 npm version 5.5.6 parse server 2.7.1
Hi After successful push send the following error prevents push to be sent:
This happened after I changed my ubuntu server DNS here is my nginx sites-enabled/default
should I add something related to push adapter in nginx ,I 've activated ssl using lets encrypt. nginx version: nginx/1.10.3 (Ubuntu) parse-server version 2.3.8 cloud code which I've used is:
And ParseServer index.js: