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.

    Error Running Magic Mirror on Google Compute

    Scheduled Pinned Locked Moved Troubleshooting
    8 Posts 3 Posters 3.1k 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.
    • O Offline
      onetwankyfive
      last edited by onetwankyfive

      I want to run MM2 on google compute engine jessie so multiple clients can access it as a website… I seem to have it running minus the ip whitelist isn’t working…

      i pasted
      ipWhitelist: ["::fff:0.0.0.0/1", "::fff:128.0.0.0/2", "::fff:192.0.0.0/3", "::fff:224.0.0.0/4", "127.0.0.1", "::ffff:127.0.0.1", "::1"],

      into the config… It runs the node serveronly fine , but displays
      This device is not allowed to access your mirror.
      Please check your config.js or config.js.sample to change this.

      admin@magicmirror:~/MagicMirror$ node serveronly/
      Starting MagicMirror: v2.1.0
      Loading config ...
      WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Object # 
      has no method 'accessSync'
      Loading module helpers ...
      No helper found for module: updatenotification.
      No helper found for module: helloworld.
      All module helpers loaded.
      Starting server op port 8080 ... 
      Server started ...
      Sockets connected & modules started ...
      Ready to go! Please point your browser to: http://localhost:8080
      Access denied to IP address: my.home.ip.here
      

      any ideas or is there any way to disable whitelisting completely?

      1 Reply Last reply Reply Quote 0
      • D Offline
        d3r
        last edited by

        Apologies for bumping an old topic but I have the same issue here. I flashed a new sd card this weekend and set up MM2 again. My MM2 works fine in normal mode(electron) but if I get this error when running only the server.

        WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Object # has no method 'accessSync'
        

        @onetwankyfive Were you able to get around this problem?

        bheplerB 1 Reply Last reply Reply Quote 0
        • bheplerB Offline
          bhepler Module Developer @d3r
          last edited by bhepler

          @d3r This whitelist configuration is a bit dependent upon your network. If you have a router that assigns a different IP address, then this won’t work. For example, my Netgear Nighthawk router assigns IP addresses in the 10.0.0.X range, which are not covered by this whitelist. You’ll need to add values that represent your specific network. Otherwise, you can use [ ] to allow everyone to see your mirror interface.

          In windows, open up a command prompt by clicking on the Start Button and then typing cmd in the search bar. Click on the first result and you’ll get a command prompt. Enter ipconfig and it will respond with your IP address. Take that IP address and add it to your whitelist value in your config.js. If you want to authorize every machine on your network, replace the final value in that ip address with 0 and add “/24”. In my case, it’s 10.0.0.0/24. In most other networks, it will be 192.168.0.0/24. That should allow any device on your local network the ability to view the Mirror by browsing to its IP address.

          If you’re using Ubuntu or some other flavor of UNIX, ctrl+alt+t will get you a command prompt. The command in UNIX is ifconfig, not ipconfig. Don’t ask, because I don’t know why.

          1 Reply Last reply Reply Quote 0
          • D Offline
            d3r
            last edited by d3r

            @bhepler Hey, thanks for your reply. I don’t see how changing the whitelist would do anything since the whitelist is located in the config and the config can’t be loaded in server only. I could be mistaken. I think my issue is a bit different. I should have expanded more. I’m on a pi3 and I’m running the code on the same pi.
            This is when I run node server only:

            :~/MagicMirror $ node serveronly
            Starting MagicMirror: v2.1.1
            Loading config ...
            ***WARNING! Could not load config file. Starting with default configuration. Error found: TypeError: Object # has no method 'accessSync'***
            Loading module helpers ...
            No helper found for module: updatenotification.
            No helper found for module: helloworld.
            All module helpers loaded.
            Starting server on port 8080 ...
            Starting server op port 8080 ...
            Server started ...
            Sockets connected & modules started ...
            
            Ready to go! Please point your browser to: http://localhost:8080
            

            and when I run npm start it does find the config which I find very strange.

            ~/MagicMirror $ npm start
            
            > magicmirror@2.1.1 start /home/drpi1/MagicMirror
            > sh run-start.sh
            
            Starting MagicMirror: v2.1.1
            Loading config ...
            Loading module helpers ...
            No helper found for module: alert.
            No helper found for module: clock.
            No helper found for module: calendar_monthly.
            Initializing new module helper ...
            Module helper loaded: calendar
            Initializing new module helper ...
            Module helper loaded: MMM-Wunderlist-Enhanced
            Initializing new module helper ...
            Module helper loaded: MMM-GarminActivities
            No helper found for module: MMM-doomsDay.
            Initializing new module helper ...
            Module helper loaded: newsfeed
            Initializing new module helper ...
            Module helper loaded: MMM-WunderGround
            Initializing new module helper ...
            Module helper loaded: MMM-Strava
            Initializing new module helper ...
            Module helper loaded: MMM-Remote-Control
            No helper found for module: MMM-iFrameReload.
            No helper found for module: MMM-iFrame.
            Initializing new module helper ...
            Module helper loaded: MMM-Readfile
            No helper found for module: MMM-Carousel.
            All module helpers loaded.
            Starting server on port 8080 ...
            Starting server op port 8080 ...
            Server started ...
            Connecting socket for: calendar
            Starting node helper for: calendar
            Connecting socket for: MMM-Wunderlist-Enhanced
            Connecting socket for: MMM-GarminActivities
            Starting node helper for: MMM-GarminActivities
            Connecting socket for: newsfeed
            Starting module: newsfeed
            Connecting socket for: MMM-WunderGround
            MMM-WunderGround helper started ...
            Connecting socket for: MMM-Strava
            Starting module: MMM-Strava
            Connecting socket for: MMM-Remote-Control
            Starting node helper for: MMM-Remote-Control
            Connecting socket for: MMM-Readfile
            Staring module helper: MMM-Readfile
            Sockets connected & modules started ...
            Launching application.
            
            bheplerB 1 Reply Last reply Reply Quote 0
            • bheplerB Offline
              bhepler Module Developer @d3r
              last edited by bhepler

              @d3r That’s really curious. Because I do not have that problem with node serveronly.

              node serveronly
              Starting MagicMirror: v2.1.1
              Loading config ...
              Loading module helpers ...
              No helper found for module: alert.
              Initializing new module helper ...
              Module helper loaded: updatenotification
              No helper found for module: clock.
              No helper found for module: MMM-Globe.
              All module helpers loaded.
              Starting server on port 8080 ... 
              Starting server op port 8080 ... 
              Server started ...
              Connecting socket for: updatenotification
              Sockets connected & modules started ...
              
              Ready to go! Please point your browser to: http://localhost:8080
              

              It looks like you are running two different mirrors on that box. The list of modules loaded in each case is different. I think you’re logged in as different users, so the ~ folder is going to point to different spots.

              What do you get in return when you run ls -lh /home/?

              D 1 Reply Last reply Reply Quote 0
              • D Offline
                d3r @bhepler
                last edited by

                @bhepler said in Error Running Magic Mirror on Google Compute:

                @d3r That’s really curious. Because I do not have that problem with node serveronly.

                I used to run node serveronly fine too. Then last week my sd card starting showing signs that it would die soon. So, I flashed raspbian on a new sd card and started fresh.

                ~ $ ls -lh /home/
                total 4.0K
                drwxr-xr-x 32 drpi1 drpi1 4.0K May 22 14:59 drpi1
                

                I have the default pi user deleted for security reasons. That’s the only thing I did different on this card.
                I think the list is different because it fails to load the config in node serveronly so the modules that are supposed to run do not.

                bheplerB 1 Reply Last reply Reply Quote 0
                • bheplerB Offline
                  bhepler Module Developer @d3r
                  last edited by bhepler

                  @d3r Well, there goes that theory.
                  At this point, all I can think of is a permissions problem. What does ls -lh ~/MagicMirror/config get you?

                  D 1 Reply Last reply Reply Quote 0
                  • D Offline
                    d3r @bhepler
                    last edited by

                    @bhepler

                    :~ $ ls -lh ~/MagicMirror/config
                    total 24K
                    -rw-r--r-- 1 drpi1 drpi1 7.7K May 21 18:00 configglobetest.js
                    -rw-r--r-- 1 drpi1 drpi1 8.3K May 22 16:42 config.js
                    -rw-r--r-- 1 drpi1 drpi1 1.6K May 21 02:28 config.js.sample
                    

                    I

                    1 Reply Last reply Reply Quote 0
                    • 1 / 1
                    • First post
                      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