MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Deploying to heroku troubleshooting

    Troubleshooting
    4
    12
    5266
    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.
    • D
      denalove last edited by

      I am having a bit of trouble after deploying to heroku. The mirror runs great on my localhost but on heroku the weather shows “Loading…”. I know it has something to do with the API. Can anyone help me? Also I installed the mm-music-player and again it runs great locally but when I deploy it to heroku it makes my whole screen black. I commented out the code on the config file and then it runs fine again.

      1 Reply Last reply Reply Quote 0
      • KirAsh4
        KirAsh4 Moderator last edited by KirAsh4

        Um, not to sound ignorant, but … what’s ‘heroku’ ?

        Guess I could look it up. It looks like it’s a cloud based application host. So I have to again point at the information posted on the main project page, where we point out that MagicMirror² is proven to run on Raspberry Pi versions 2 and 3, using the Rasbian OS. The installation script and necessary applications are all proven to run on that. Anything else and unfortunately it’s a total unknown. Chances are you are the first to do that on Heroku, and as such, you’re going to have to do some digging and figure it out. Using anything else, and there is no guarantee that any of the necessary pieces are in place, or that they can actually run on that platform.

        Having said that, I would start by looking at your log file (pm2 logs) or pull up the code through a browser from a different machine and look at the console output, check for error messages.

        A Life? Cool! Where can I download one of those from?

        1 Reply Last reply Reply Quote 0
        • G
          gndimitro last edited by

          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
            dmcinnes Module Developer last edited by

            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 Reply Quote 0
            • D
              dmcinnes Module Developer last edited by

              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
                gndimitro @dmcinnes last edited by

                @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 Reply Quote 0
                • D
                  dmcinnes Module Developer @gndimitro last edited by

                  @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 Reply Quote 0
                  • G
                    gndimitro @dmcinnes last edited by

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

                    1 Reply Last reply Reply Quote 0
                    • G
                      gndimitro @dmcinnes last edited by

                      @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
                        gndimitro @dmcinnes last edited by

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

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 1 / 2
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy