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

APPLICATION ERROR WHILE DEPLOYING ON HEROKU #25

Open
faizalkhan99 opened this issue Aug 21, 2022 · 1 comment
Open

APPLICATION ERROR WHILE DEPLOYING ON HEROKU #25

faizalkhan99 opened this issue Aug 21, 2022 · 1 comment

Comments

@faizalkhan99
Copy link

It give this when i run this command heroku logs --tail

heroku link: https://murmuring-harbor-89689.herokuapp.com/

$ heroku logs --tail
2022-08-21T19:06:06.906140+00:00 heroku[router]: at=info method=GET path="/" host=murmuring-harbor-89689.herokuapp.com request_id=68785752-e055-43c9-a27c-c79141036ad9 fwd="106.215.91.46" dyno=web.1 connect=0ms
service=10014ms status=500 bytes=404 protocol=https
2022-08-21T19:09:54.000000+00:00 app[api]: Build started by user [email protected]
2022-08-21T19:10:12.836716+00:00 app[api]: Deploy f54b5a3a by user [email protected]
2022-08-21T19:10:12.836716+00:00 app[api]: Release v8 created by user
[email protected]
2022-08-21T19:10:13.000000+00:00 app[api]: Build succeeded
2022-08-21T19:10:13.541563+00:00 heroku[web.1]: Restarting
2022-08-21T19:10:13.557563+00:00 heroku[web.1]: State changed from up
to starting
2022-08-21T19:10:14.247280+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2022-08-21T19:10:14.471883+00:00 heroku[web.1]: Process exited with status 143
2022-08-21T19:10:15.642067+00:00 heroku[web.1]: Starting process with
command npm start
2022-08-21T19:10:17.430610+00:00 app[web.1]:
2022-08-21T19:10:17.430624+00:00 app[web.1]: > [email protected] start
2022-08-21T19:10:17.430624+00:00 app[web.1]: > node app.js
2022-08-21T19:10:17.430625+00:00 app[web.1]:
2022-08-21T19:10:17.850003+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2022-08-21T19:10:17.850018+00:00 app[web.1]: designed for a production environment, as it will leak
2022-08-21T19:10:17.850019+00:00 app[web.1]: memory, and will not scale past a single process.
2022-08-21T19:10:17.869597+00:00 app[web.1]: Server has started on port: 40787
2022-08-21T19:10:17.956857+00:00 heroku[web.1]: State changed from starting to up
2022-08-21T19:10:19.618539+00:00 app[web.1]: /app/node_modules/mongodb/lib/db.js:331
2022-08-21T19:10:19.618553+00:00 app[web.1]: throw new error_1.MongoAPIError(database names cannot contain the character '${invalidChars[i]}');
2022-08-21T19:10:19.618554+00:00 app[web.1]: ^
2022-08-21T19:10:19.618554+00:00 app[web.1]:
2022-08-21T19:10:19.618555+00:00 app[web.1]: MongoAPIError: database names cannot contain the character '/'
2022-08-21T19:10:19.618556+00:00 app[web.1]: at validateDatabaseName (/app/node_modules/mongodb/lib/db.js:331:19)
2022-08-21T19:10:19.618556+00:00 app[web.1]: at new Db (/app/node_modules/mongodb/lib/db.js:87:9)
2022-08-21T19:10:19.618557+00:00 app[web.1]: at MongoClient.db (/app/node_modules/mongodb/lib/mongo_client.js:210:20)
2022-08-21T19:10:19.618557+00:00 app[web.1]: at _setClient (/app/node_modules/mongoose/lib/connection.js:859:58)
2022-08-21T19:10:19.618557+00:00 app[web.1]: at /app/node_modules/mongoose/lib/connection.js:814:7
2022-08-21T19:10:19.618557+00:00 app[web.1]: at /app/node_modules/mongodb/lib/utils.js:425:9
2022-08-21T19:10:19.618558+00:00 app[web.1]: at /app/node_modules/mongodb/lib/mongo_client.js:137:17
2022-08-21T19:10:19.618558+00:00 app[web.1]: at connectCallback (/app/node_modules/mongodb/lib/operations/connect.js:29:9)
2022-08-21T19:10:19.618558+00:00 app[web.1]: at /app/node_modules/mongodb/lib/operations/connect.js:81:9
2022-08-21T19:10:19.618559+00:00 app[web.1]: at /app/node_modules/mongodb/lib/sdam/topology.js:203:73 {
2022-08-21T19:10:19.618559+00:00 app[web.1]: [Symbol(errorLabels)]: Set(0) {}
2022-08-21T19:10:19.618559+00:00 app[web.1]: }
2022-08-21T19:10:19.745148+00:00 heroku[web.1]: Process exited with status 1
2022-08-21T19:10:19.986802+00:00 heroku[web.1]: State changed from up
to crashed
2022-08-21T19:10:19.989996+00:00 heroku[web.1]: State changed from crashed to starting
2022-08-21T19:10:22.170074+00:00 heroku[web.1]: Starting process with
command npm start
2022-08-21T19:10:24.018460+00:00 app[web.1]:
2022-08-21T19:10:24.018470+00:00 app[web.1]: > [email protected] start
2022-08-21T19:10:24.018470+00:00 app[web.1]: > node app.js
2022-08-21T19:10:24.018471+00:00 app[web.1]:
2022-08-21T19:10:24.517338+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2022-08-21T19:10:24.517357+00:00 app[web.1]: designed for a production environment, as it will leak
2022-08-21T19:10:24.517358+00:00 app[web.1]: memory, and will not scale past a single process.
2022-08-21T19:10:24.541406+00:00 app[web.1]: Server has started on port: 51174
2022-08-21T19:10:24.597181+00:00 heroku[web.1]: State changed from starting to up
2022-08-21T19:10:26.279172+00:00 app[web.1]: /app/node_modules/mongodb/lib/db.js:331
2022-08-21T19:10:26.279179+00:00 app[web.1]: throw new error_1.MongoAPIError(database names cannot contain the character '${invalidChars[i]}');
2022-08-21T19:10:26.279180+00:00 app[web.1]: ^
2022-08-21T19:10:26.279180+00:00 app[web.1]:
2022-08-21T19:10:26.279181+00:00 app[web.1]: MongoAPIError: database names cannot contain the character '/'
2022-08-21T19:10:26.279182+00:00 app[web.1]: at validateDatabaseName (/app/node_modules/mongodb/lib/db.js:331:19)
2022-08-21T19:10:26.279182+00:00 app[web.1]: at new Db (/app/node_modules/mongodb/lib/db.js:87:9)
2022-08-21T19:10:26.279182+00:00 app[web.1]: at MongoClient.db (/app/node_modules/mongodb/lib/mongo_client.js:210:20)
2022-08-21T19:10:26.279183+00:00 app[web.1]: at _setClient (/app/node_modules/mongoose/lib/connection.js:859:58)
2022-08-21T19:10:26.279183+00:00 app[web.1]: at /app/node_modules/mongoose/lib/connection.js:814:7
2022-08-21T19:10:26.279183+00:00 app[web.1]: at /app/node_modules/mongodb/lib/utils.js:425:9
2022-08-21T19:10:26.279184+00:00 app[web.1]: at /app/node_modules/mongodb/lib/mongo_client.js:137:17
2022-08-21T19:10:26.279184+00:00 app[web.1]: at connectCallback (/app/node_modules/mongodb/lib/operations/connect.js:29:9)
2022-08-21T19:10:26.279185+00:00 app[web.1]: at /app/node_modules/mongodb/lib/operations/connect.js:81:9
2022-08-21T19:10:26.279185+00:00 app[web.1]: at /app/node_modules/mongodb/lib/sdam/topology.js:203:73 {
2022-08-21T19:10:26.279185+00:00 app[web.1]: [Symbol(errorLabels)]: Set(0) {}
2022-08-21T19:10:26.279186+00:00 app[web.1]: }
2022-08-21T19:10:26.402581+00:00 heroku[web.1]: Process exited with status 1
2022-08-21T19:10:26.467952+00:00 heroku[web.1]: State changed from up
to crashed
2022-08-21T19:10:31.665423+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=murmuring-harbor-89689.herokuapp.com request_id=b062a4bf-63b1-45aa-996c-245cf20ff23c fwd="106.215.91.46" dyno= connect= service= status=503 bytes= protocol=https
2022-08-21T19:11:54.606959+00:00 heroku[web.1]: State changed from crashed to starting
2022-08-21T19:11:56.794254+00:00 heroku[web.1]: Starting process with
command npm start
2022-08-21T19:11:58.568969+00:00 app[web.1]:
2022-08-21T19:11:58.568982+00:00 app[web.1]: > [email protected] start
2022-08-21T19:11:58.568983+00:00 app[web.1]: > node app.js
2022-08-21T19:11:58.568983+00:00 app[web.1]:
2022-08-21T19:11:59.064076+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2022-08-21T19:11:59.064082+00:00 app[web.1]: designed for a production environment, as it will leak
2022-08-21T19:11:59.064083+00:00 app[web.1]: memory, and will not scale past a single process.
2022-08-21T19:11:59.091496+00:00 app[web.1]: Server has started on port: 4334
2022-08-21T19:11:59.135507+00:00 heroku[web.1]: State changed from starting to up
2022-08-21T19:12:00.853108+00:00 app[web.1]: /app/node_modules/mongodb/lib/db.js:331
2022-08-21T19:12:00.853119+00:00 app[web.1]: throw new error_1.MongoAPIError(database names cannot contain the character '${invalidChars[i]}');
2022-08-21T19:12:00.853120+00:00 app[web.1]: ^
2022-08-21T19:12:00.853120+00:00 app[web.1]:
2022-08-21T19:12:00.853121+00:00 app[web.1]: MongoAPIError: database names cannot contain the character '/'
2022-08-21T19:12:00.853121+00:00 app[web.1]: at validateDatabaseName (/app/node_modules/mongodb/lib/db.js:331:19)
2022-08-21T19:12:00.853121+00:00 app[web.1]: at new Db (/app/node_modules/mongodb/lib/db.js:87:9)
2022-08-21T19:12:00.853122+00:00 app[web.1]: at MongoClient.db (/app/node_modules/mongodb/lib/mongo_client.js:210:20)
2022-08-21T19:12:00.853122+00:00 app[web.1]: at _setClient (/app/node_modules/mongoose/lib/connection.js:859:58)
2022-08-21T19:12:00.853123+00:00 app[web.1]: at /app/node_modules/mongoose/lib/connection.js:814:7
2022-08-21T19:12:00.853123+00:00 app[web.1]: at /app/node_modules/mongodb/lib/utils.js:425:9
2022-08-21T19:12:00.853123+00:00 app[web.1]: at /app/node_modules/mongodb/lib/mongo_client.js:137:17
2022-08-21T19:12:00.853124+00:00 app[web.1]: at connectCallback (/app/node_modules/mongodb/lib/operations/connect.js:29:9)
2022-08-21T19:12:00.853124+00:00 app[web.1]: at /app/node_modules/mongodb/lib/operations/connect.js:81:9
2022-08-21T19:12:00.853125+00:00 app[web.1]: at /app/node_modules/mongodb/lib/sdam/topology.js:203:73 {
2022-08-21T19:12:00.853125+00:00 app[web.1]: [Symbol(errorLabels)]: Set(0) {}
2022-08-21T19:12:00.853126+00:00 app[web.1]: }
2022-08-21T19:12:01.000005+00:00 heroku[web.1]: Process exited with status 1
2022-08-21T19:12:01.091455+00:00 heroku[web.1]: State changed from up to crashed
2022-08-21T19:12:04.276976+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=murmuring-harbor-89689.herokuapp.com request_id=c9e8baf3-610f-4252-b8f8-ef768b92ee18 fwd="106.215.91.46" dyno= connect= service= status=503 bytes= protocol=https
2022-08-21T19:11:36.000000+00:00 app[api]: Build started by user fk******@gmail.com
I did everything

updated URI(s) // Authorized JavaScript origins & Authorized redirect URIs

updated links in app.js

added Procfile

mongoDB atlas connected

package.json looks like this

{
  "name": "secrets",
  "version": "1.0.0",
  "description": "",
  "main": "app.js",
  "scripts": {
    "start": "node app.js"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "engines": {
    "node": "16.15.1"
  },
  "dependencies": {
    "bcrypt": "^5.0.1",
    "dotenv": "^16.0.1",
    "ejs": "^3.1.8",
    "express": "^4.18.1",
    "express-session": "^1.17.3",
    "md5": "^2.3.0",
    "mongoose": "^6.5.2",
    "mongoose-encryption": "^2.1.2",
    "mongoose-findorcreate": "^3.0.0",
    "passport": "^0.6.0",
    "passport-google-oauth20": "^2.0.0",
    "passport-local": "^1.0.0",
    "passport-local-mongoose": "^7.1.2"
  }
}

tried deleting everything and restarting everything. But NOTHING WORKED.

It still gives "application error"

What am I missing here?

@WEB-L00P
Copy link

WEB-L00P commented Sep 4, 2022

Dont try hosting on heroku as it is shutting dow soon!

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