Skip to content

Unable to connect to Parse API #199

Description

@david-koch-pro

Here is my server configuration. (index.js)
screen-shot-2016-05-24-at-10 54 37

And here is my cloud code. (/cloud/main.js)
screen-shot-2016-05-24-at-11 01 44

For testing, I run this command.

screen-shot-2016-05-24-at-11 05 31

Then I got this message.
{"code":141,"error":"XMLHttpRequest failed: "Unable to connect to the Parse API""}

I tried all reference of Git about this problem but couldn't fix this problem. Please help me.......

Activity

  1. KasparasMasiukas commented on May 24, 2016

    @KasparasMasiukas

    Have you configured your process.env.SERVER_URL variable?

  2. david-koch-pro commented on May 24, 2016

    @david-koch-pro
    Author

    I don't know how to set process.env.SERVER_URL. I thought it would be set automatically.

  3. david-koch-pro commented on May 24, 2016

    @david-koch-pro
    Author

    And I could get server log and it was running well.

  4. KasparasMasiukas commented on May 24, 2016

    @KasparasMasiukas

    Have you looked at .ebextensions/app.config file? Myself I run parse-server on Heroku, I set my environmental variables by using external module - https://www.npmjs.com/package/dotenv

  5. david-koch-pro commented on May 24, 2016

    @david-koch-pro
    Author

    .ebextensions/app.config
    screen-shot-2016-05-24-at-11 24 35

  6. david-koch-pro commented on May 24, 2016

    @david-koch-pro
    Author

    I already set environmental variables. Can you show me how to use external module?

  7. KasparasMasiukas commented on May 24, 2016

    @KasparasMasiukas

    If it still doesn't work, I don't know how to help. Perhaps somebody with Elastic Beanstalk expertise will.

  8. david-koch-pro commented on May 24, 2016

    @david-koch-pro
    Author

    Please teach me how to use "dotenv". It might be able to help me.

  9. KasparasMasiukas commented on May 24, 2016

    @KasparasMasiukas

    Please read the instructions on the page I've sent you. I cannot explain any better than that.

  10. david-koch-pro commented on May 24, 2016

    @david-koch-pro
    Author

    Thank you Kasparas42180
    Anybody else? Please help me

  11. stalehard commented on May 26, 2016

    @stalehard

    I have same problem. I use amazon EB as hosting. To fix problem i restart application, but problem again repeated.

    Logs:
    ParseError { code: 100, message: 'XMLHttpRequest failed: "Unable to connect to the Parse API"' }

  12. jeffhuangtw commented on Jul 28, 2016

    @jeffhuangtw

    You may check the document here:
    http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/ebextensions-optionsettings.html

    Example .ebextensions/options.config
    option_settings:

    • option_name: SERVER_URL
      value: 'YOUR_SERVER_URL'
  13. added a commit that references this issue on Jan 1, 2017
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