-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Unable to connect to the Parse API" error thrown when trying to call a Cloud function with a Parse Query. #817
Comments
@gfosco you worked on previous issues. Can you help resolve this one. |
Can you provide the code for your function? (or the whole cloud code file...) |
Discussed over email, problem is the script is overwriting the Parse global which definitely breaks everything. |
I am using self hosted parse-server and not able to use cloud functions since I have enabled HTTPS, if I revert it back to HTTP it works as expected. Also he problem is only with those cloud function which have Parse.Query, if i create a function simply return "Hello" as response it works on both HTTP and HTTPS. I am getting following error message when run a cloud function which have Parse.Query code. { can anyone tell me how can I fix this? |
I am also facing the same issue. Any pointers with that ? w3care25, did you end up fixing it ? |
I have the same problem!! Any way to solve this?? |
+1 |
@chandanthakur You need to add process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; in you instance file of parse server if you are running into similar issue |
@ckarmy You need to create an instance with SSL something like below: _var privateKey = fs.readFileSync( 'path to ssl key ( .key ) file' ); https.createServer({ Don't forgot to add var https = require('https'); |
@w3care25 adding in the |
If you have configured everything correctly. You may need to restart your server after adding this line. If you are still having this after server restart, Could you please share you instance file code ( after replcing your confidential credentails with dummy details)? |
@w3care25 I have restarted the server but I am still getting the same results.
Hitting the sample Thank you very much for your help. |
backup you instance file and try following code
Make sure you are not accessing you sever with https (SSL enabled). If you need to access your server with https then you will have to add following
and remove
|
@w3care25 Im hosting this on heroku. Wouldn't |
You can use Heroku credentials here |
@willyyang were you able to fix your issue ? |
@w3care25 I'm looking for another alternative still because I don't to buy a certificate |
Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!
-[X] You've met the prerequisites.
-[X] You're running the latest version of Parse Server.
-[X] You've searched through existing issues. Chances are that your issue has been reported or resolved before.
Environment Setup
Running Parse Server on Localhost.
Downloaded code from Amazon Elastic Beanstalk
Steps to reproduce
Running any cloud function with a query. Normal cloud function works well. Called using node script.
Logs/Trace
I found other issue #651 (comment) which is currently closed. However, even after following the steps and setting up serverURL problem doesn't resolve. XHR failed with status 0.
The text was updated successfully, but these errors were encountered: