ottomated / CrewLink-server

Voice Relay server for CrewLink.
GNU General Public License v3.0
694 stars 444 forks source link

Heroku deployment crashing #130

Open strikerthedj opened 3 years ago

strikerthedj commented 3 years ago

Tried to deploy crewlink following the heroku button on this github and it causes the app to crash. Tried doing so in a fresh account as well with the same error.

Here is the error code I get. Application error An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command

Any thoughts on how to fix?

strikerthedj commented 3 years ago

Here is the error I get from the logs

at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=newcrewlink-18.herokuapp.com request_id=6fa29fc4-289a-4d50-aaf5-230f3f74a4bf fwd="100.42.22.13" dyno= connect= service= status=503 bytes= protocol=https

bthulse commented 3 years ago

I am also see this error. Full log


2020-12-31T03:52:04.990003+00:00 heroku[web.1]: Process exited with status 1
2020-12-31T03:52:05.062608+00:00 heroku[web.1]: State changed from starting to crashed
2020-12-31T03:52:05.066072+00:00 heroku[web.1]: State changed from crashed to starting
2020-12-31T03:52:08.591791+00:00 heroku[web.1]: Starting process with command `node dist/index.js`
2020-12-31T03:52:12.127746+00:00 app[web.1]: 2020-12-31T03:52:12+0000 <error> You must set the ADDRESS environment variable.
2020-12-31T03:52:12.210881+00:00 heroku[web.1]: Process exited with status 1
2020-12-31T03:52:12.507727+00:00 heroku[web.1]: State changed from starting to crashed
2020-12-31T03:52:17.107582+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=squirrel-crew-test.herokuapp.com request_id=f6e85491-2b7d-4b78-9ed7-ef04306925f8 fwd="173.48.23.227" dyno= connect= service= status=503 bytes= protocol=https
2020-12-31T03:52:17.478050+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=squirrel-crew-test.herokuapp.com request_id=8058229c-3517-4b17-811f-9ef6a62c5359 fwd="173.48.23.227" dyno= connect= service= status=503 bytes= protocol=https
2020-12-31T03:55:16.087325+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=squirrel-crew-test.herokuapp.com request_id=1a847321-a2b9-4cbd-96d7-67bd426623a3 fwd="173.48.23.227" dyno= connect= service= status=503 bytes= protocol=https
2020-12-31T03:55:16.293296+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=squirrel-crew-test.herokuapp.com request_id=8cbd41bc-3415-40f2-b39d-d4b925d09a4d fwd="173.48.23.227" dyno= connect= service= status=503 bytes= protocol=https```
strikerthedj commented 3 years ago

@bthulse This is fixed with pull request #119.

I have forked it over to here for easy deployment. Just hit deploy to Heroku.

bthulse commented 3 years ago

Found a workaround. If this variable can't be set automatically, the setup instructions should get updated with the following steps:

  1. Deploy app normally
  2. Go to your deployed app through the Heroku Dashboard and click on "Settings"
  3. Look for the "Config Vars" section and click on the "Reveal Config Vars" button
  4. In the Key field enter ADDRESS
  5. In the Value field add the url heroku assigned your app. You can find it in the Domains section of the Settings page, so just scroll down a bit.
  6. Click the Add Button. The app should restart on its own.
nathanparekh commented 3 years ago

@bthulse - that workaround is the only way to do it right now (other than using a fork, such as the one from #119).

119 should add automatic detection - mostly. It'll work for Heroku, but on some systems it'll end up showing the wrong address (if it's behind certain proxies).

118 will update the README with the workaround instructions, like you described.

At this point to do either we're waiting on one of the repo collaborators.

iinsanegaming commented 3 years ago

In settings you need to create a Config Vars -KEY= ADDRESS -VALUE= https://yourappsaddress.herokuapp.com/

jgroffen commented 3 years ago

Hello folks, I just rebased #119 so it'll work with the new client versions. You'll need to redeploy your server if it's based off my fork (here).