Skip to content

Cloud Code Unable To Connect #1807

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

Closed
seeya opened this issue May 16, 2016 · 5 comments
Closed

Cloud Code Unable To Connect #1807

seeya opened this issue May 16, 2016 · 5 comments

Comments

@seeya
Copy link

seeya commented May 16, 2016

I'm getting this error when I try to call a cloud function which uses Parse function. I'm not sure whether it's the masterkey that is causing this problem. Anyone manage to solve this? I've tried a lot of solutions but didn't work.

{
  "code": 141,
  "error": {
    "code": 100,
    "message": "XMLHttpRequest failed: \"Unable to connect to the Parse API\""
  }
}
@drew-gross
Copy link
Contributor

drew-gross commented May 16, 2016

This indicates a network issue. Make sure your internet is connected and you have set the Server URL correctly.

@seeya
Copy link
Author

seeya commented May 18, 2016

I've set the serverURL in this format
serverURL: http://{publicip}:port/parse
Using the sdks I'm able to create new data. However not with the cloud code.

@drew-gross
Copy link
Contributor

try serverURL: http://localhost:port/parse

@seeya
Copy link
Author

seeya commented May 18, 2016

I referred to the parse-server-example codes and I think I found the problem.
I had 2 instances of ParseServer created in the same file which may have caused the problem.
Once I removed one, I was able to use the cloud code functions.
Is there a way to run multiple instances of cloud code within the same express server?

@drew-gross
Copy link
Contributor

Yep that would be the problem. Unfortunately there is no way to run multiple instances of cloud code on the save server, due to the use of global variables inside the Parse SDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants