Skip to content
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

Crashes on Heroku, error code H10 #1589

Closed
aaronbannin opened this issue Apr 22, 2016 · 19 comments
Closed

Crashes on Heroku, error code H10 #1589

aaronbannin opened this issue Apr 22, 2016 · 19 comments

Comments

@aaronbannin
Copy link

Just deployed to Heroku and I'm getting this crash error:

2016-04-22T01:31:53.925057+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=gemparseservertest.herokuapp.com request_id=63645159-2ce4-44ba-aa3f-344790b58a46 fwd="73.71.103.1" dyno= connect= service= status=503 bytes=
2016-04-22T01:31:55.206156+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=gemparseservertest.herokuapp.com request_id=4a0ed7ae-c0a3-48bf-ad25-bdce23f6edf2 fwd="73.71.103.1" dyno= connect= service= status=503 bytes=
2016-04-22T01:32:17.138695+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=gemparseservertest.herokuapp.com request_id=6d86e071-6315-44c3-8046-f6f35b7ab28e fwd="73.71.103.1" dyno= connect= service= status=503 bytes=
2016-04-22T01:33:14.268016+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=gemparseservertest.herokuapp.com request_id=81f44885-3e42-40e5-8231-d0895e8359fa fwd="73.71.103.1" dyno= connect= service= status=503 bytes=
2016-04-22T01:33:55.180903+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=gemparseservertest.herokuapp.com request_id=e067c524-f43f-4a94-a515-71aa6b46af15 fwd="73.71.103.1" dyno= connect= service= status=503 bytes=
2016-04-22T01:40:34.827054+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=gemparseservertest.herokuapp.com request_id=aaa44123-7f18-46a5-870c-0f66c323544e fwd="73.71.103.1" dyno= connect= service= status=503 bytes=
2016-04-22T01:40:35.848889+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=gemparseservertest.herokuapp.com request_id=6a3bc5a2-919d-411a-a680-38586186abc9 fwd="73.71.103.1" dyno= connect= service= status=503 bytes=

I was following the instructions here:
https://devcenter.heroku.com/articles/deploying-a-parse-server-to-heroku

After I forked the repo and connected to Heroku in the "Connect to Github" section, it crashed immediately.

Last commit from forked repo: 6e9529f81c081d5967aa0ba5126e25591cd528f2
Exposes the loggerAdapter as log to Cloud Functions and Triggers (#1565)

Any other information I can provide?

@aaronbannin
Copy link
Author

Here is the build log.
I'm not too familiar with Heroku or Node, so any help in hunting would be really appreciated.

-----> Using set buildpack heroku/nodejs
-----> Node.js app detected
-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NPM_CONFIG_PRODUCTION=true
       NODE_ENV=production
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  >=4.3
       engines.npm (package.json):   unspecified (use default)

       Resolving node version >=4.3 via semver.io...
       Downloading and installing node 5.10.1...
       Using default npm version: 3.8.3
-----> Restoring cache
       Loading 2 from cacheDirectories (default):
       - node_modules
       - bower_components (not cached - skipping)
-----> Building dependencies
       Pruning any extraneous modules
       Installing node modules (package.json)
-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)
-----> Build succeeded!
       ├── babel-polyfill@6.7.4
       ├── babel-runtime@6.6.1
       ├── bcrypt-nodejs@0.0.3
       ├── body-parser@1.15.0
       ├── colors@1.1.2
       ├── commander@2.9.0
       ├── deepcopy@0.6.1
       ├── express@4.13.4
       ├── intersect@1.0.1
       ├── lodash@4.11.1
       ├── lru-cache@4.0.1
       ├── mailgun-js@0.7.10
       ├── mime@1.3.4
       ├── mongodb@2.1.16
       ├── multer@1.1.0
       ├── parse@1.8.3
       ├── parse-server-fs-adapter@1.0.0
       ├── parse-server-push-adapter@1.0.4
       ├── parse-server-s3-adapter@1.0.1
       ├── parse-server-simple-mailgun-adapter@1.0.0
       ├── redis@2.5.3
       ├── request@2.72.0
       ├── tv4@1.2.7
       ├── winston@2.2.0
       ├── winston-daily-rotate-file@1.0.1
       └── ws@1.1.0

-----> Discovering process types
       Procfile declares types     -> (none)
       Default types for buildpack -> web
-----> Compressing...
       Done: 20.3M
-----> Launching...
       Released v13
       https://gemparseservertest.herokuapp.com/ deployed to Heroku

@aaronbannin
Copy link
Author

Jumped on the machine (heroku bash) and tried building manually with node ./bin/parse-server. Here is the error:

~ $ node ./bin/parse-server
module.js:341
    throw err;
    ^

Error: Cannot find module '../lib/cli/parse-server'
    at Function.Module._resolveFilename (module.js:339:15)
    at Function.Module._load (module.js:290:25)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
    at Object.<anonymous> (/app/bin/parse-server:3:1)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Function.Module.runMain (module.js:447:10)

@aaronbannin
Copy link
Author

From what I can tell, the desired module is in ../src/cli/parse-server, not ../lib/cli/. Perhaps I'm doing something wrong? I'm not entirely sure who/where is calling that dir to test.

@flovilmart
Copy link
Contributor

That's because the lib folder is not under version control and you're deploying a fork of the repo directly to heroku, which is not the preferred way to deploy parse-server. Heroku recommendes using parse-server-example. Please look at the recommended deployment in the documentation (README and wiki)

@aaronbannin
Copy link
Author

Thanks a ton, deploying parse-server-example fixed it!

@arkangelx
Copy link

Hey guys, im having a similar problem after deploying the parse-server ago. trying to login/ signup and I keep getting this

2016-04-23T21:20:33.968881+00:00 heroku[router]: at=info method=POST path="/parse/1/login" host=intense-hollows-60991.herokuapp.com request_id=5b792331-09c2-49b1-aa4c-48bd18f8f161 fwd="94.11.105.106" dyno=web.1 connect=1ms service=4ms status=403 bytes=466

@aaronbannin
Copy link
Author

That seems very different from the problem I was facing. Do you have the output from heroku logs? It seems like a config issue, have you had any success searching for 'heroku 403 error' or the like?

@arkangelx
Copy link

Yes from the heroku logs

2016-04-23T22:25:04.118548+00:00 heroku[router]: at=info method=POST path="/parse/1/users" host=intense-hollows-60991.herokuapp.com request_id=e546e91e-e45b-4e1d-a2c0-2bf7bd77ff1c fwd="94.11.105.106" dyno=web.1 connect=0ms service=8ms status=403 bytes=466

I can’t pinpoint any issues with the config as I have an android app that points to the same endpoints and that works

On 24 Apr 2016, at 00:50, aaronbannin notifications@github.com wrote:

That seems very different from the problem I was facing. Do you have the output from heroku logs? It seems like a config issue, have you had any success searching for 'heroku 403 error' or the like?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #1589 (comment)

@aaronbannin
Copy link
Author

Have you double checked your API keys? A 403 seems to imply a permissions issue.

What does the log look like for a successful transaction from your Android app?

@flovilmart
Copy link
Contributor

The request URL seems off with /parse/1, is that your mountPath?

@arkangelx
Copy link

Parse.serverURL = 'https://intense-hollows-60991.herokuapp.com/parse/' https://intense-hollows-60991.herokuapp.com/parse/'

I didn’t add that manually. I believe that come from Parse.User sdk.

On 24 Apr 2016, at 20:45, Florent Vilmart notifications@github.com wrote:

The request URL seems off with /parse/1, is that your mountPath?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #1589 (comment)

@flovilmart
Copy link
Contributor

I just checked the SDK and there don't seem to be any places where the SDK would add a trailing 1 to your server URL... If you run a query, does the path look the same?

@arkangelx
Copy link

Hmm.. Please could you have a look @ this

http://www.mobileparadigm.co.uk/urls/cft_access/services/cft/ http://www.mobileparadigm.co.uk/urls/cft_access/services/cft/

view source and click the ft_main.js

you will find

Parse.User.signUp(username, password, { ACL: new Parse.ACL() }, {
success: function(user) {
new ManageTodosView();
self.undelegateEvents();
delete self;
},
etc

I havne’t appended anything to the serverUrl

On 24 Apr 2016, at 20:51, Florent Vilmart notifications@github.com wrote:

I just checked the SDK and there don't seem to be any places where the SDK would add a trailing 1 to your server URL... If you run a query, does the path look the same?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #1589 (comment)

@flovilmart
Copy link
Contributor

Seems that you're using an outdated version of parse.js, can you try with 1.6.14? I tried injecting the code into your app and still face an unauthorized error...

@arkangelx
Copy link

and example is
2016-04-24T19:51:22.109760+00:00 heroku[router]: at=info method=POST path="/parse/classes/BibleStudy" host=intense-hollows-60991.herokuapp.com request_id=8352a1e7-1729-4283-aac6-87fd073c3006 fwd="94.11.105.106" dyno=web.1 connect=1ms service=1285ms status=200 bytes=2324

On 24 Apr 2016, at 20:27, aaronbannin notifications@github.com wrote:

Have you double checked your API keys? A 403 seems to imply a permissions issue.

What does the log look like for a successful transaction from your Android app?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #1589 (comment)

@arkangelx
Copy link

I tried that version and I get TypeError: Parse.Collection is undefined..Looked @ the source code for both versions and everything to do with Parse Backbone is non existent in 1.6.14, even parse-lastest

On 24 Apr 2016, at 21:04, Florent Vilmart notifications@github.com wrote:

1.6.14

@celikmustafa89
Copy link

THIS SOLUTION IS FOR GO

When you deploy an app through heroku, it does not allow you to specify the port number.
In other words, you can not specify your web service's port number as 8000 or something else, heroku decides the port number in runtime.
so, you can not use the following code:

    log.Fatal(http.ListenAndServe(":8000", router))

What you can do is, getting the runtime port of heroku.
In short, just use the following code:

    log.Fatal(http.ListenAndServe(":" + os.Getenv("PORT"), router))

@chowdhuryshakur
Copy link

Thanks a ton, deploying parse-server-example fixed it!

How you did this? Can you explain little bit. I am facing this problem also.

@aaronbannin
Copy link
Author

@chowdhuryshakur that was 4 years ago, but looks like this guidance helped:

Please look at the recommended deployment in the documentation (README and wiki)

Not sure what the current deployment and docs look like.

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

6 participants