• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Deploying to heroku troubleshooting

Scheduled Pinned Locked Moved Troubleshooting
12 Posts 4 Posters 7.6k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    gndimitro
    last edited by Aug 8, 2016, 8:51 AM

    can you post what you did to setup MagicMirror on heroku? I want to do the same thing, but I’m not 100% sure what I need to change, thanks!

    1 Reply Last reply Reply Quote 0
    • D Offline
      dmcinnes Module Developer
      last edited by Aug 9, 2016, 12:58 AM

      I imagine it should work since it’s a node app. I haven’t tried it myself but creating a procfile that runs node serveronly may be enough:
      https://devcenter.heroku.com/articles/getting-started-with-nodejs#define-a-procfile

      G 1 Reply Last reply Aug 9, 2016, 1:11 AM Reply Quote 0
      • D Offline
        dmcinnes Module Developer
        last edited by Aug 9, 2016, 1:03 AM

        Oh actually read to the end of your post :) Looks like the music module runs the player on the server side (on the heroku dyno) which is what’s likely failing. You can run heroku logs -a <your appname> to see any error messages.

        1 Reply Last reply Reply Quote 0
        • G Offline
          gndimitro @dmcinnes
          last edited by Aug 9, 2016, 1:11 AM

          @dmcinnes yeah that’s what I thought but I’m having issues with that, it seems to fail at:
          016-08-09T00:38:56.941069+00:00 app[web.1]: Ready to go! Please point your browser to: http://localhost:8080
          2016-08-09T00:39:37.042725+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
          2016-08-09T00:39:37.042725+00:00 heroku[web.1]: Stopping process with SIGKILL
          2016-08-09T00:39:37.194692+00:00 heroku[web.1]: Process exited with status 137

          D 1 Reply Last reply Aug 9, 2016, 3:10 AM Reply Quote 0
          • D Offline
            dmcinnes Module Developer @gndimitro
            last edited by Aug 9, 2016, 3:10 AM

            @gndimitro Ah! Heroku needs to tell your app which port to run on. An update to config.js to take the environment’s PORT value into account may do the trick:

              port: process.env.PORT || 8080,
            
            G 4 Replies Last reply Aug 9, 2016, 7:21 AM Reply Quote 0
            • G Offline
              gndimitro @dmcinnes
              last edited by Aug 9, 2016, 7:21 AM

              @dmcinnes Thanks! That worked, now I have different issues but it’s live on heroku now. :)

              1 Reply Last reply Reply Quote 0
              • G Offline
                gndimitro @dmcinnes
                last edited by Aug 9, 2016, 7:41 AM

                @dmcinnes Actually it’s giving me an odd error in the dev console, it’s saying “process is not defined” and then that breaks my config file so the app is running but not working correctly, do you have any ideas?

                1 Reply Last reply Reply Quote 0
                • G Offline
                  gndimitro @dmcinnes
                  last edited by Aug 9, 2016, 7:44 AM

                  @dmcinnes I changed my port value to port: process.env.PORT, just for heroku.

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    gndimitro @dmcinnes
                    last edited by Aug 9, 2016, 5:36 PM

                    @dmcinnes So I found a solution! I changed a line in server.js to server.listen(process.env.PORT || config.port); and that seemed to work, it didn’t break my config file

                    D 1 Reply Last reply Aug 11, 2016, 12:31 AM Reply Quote 0
                    • D Offline
                      dmcinnes Module Developer @gndimitro
                      last edited by Aug 11, 2016, 12:31 AM

                      @gndimitro awesome!

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        7/12
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy